var basepath='';function findID(id){if(document.all)return document.all[id];else return document.getElementById(id)}function base(){if(basepath==''){baser=document.getElementsByTagName('base')[0].href;bas=baser.replace(/http\:\/\//g,'');bas=bas.replace(/\//g,'');al=document.location.href;var reg=/\./;if(reg.test(baser)){als=al.replace(/http\:\/\//g,'');als=als.replace(/\/(.+)?/g,'');baseed='http://'+als+'/'}else{baseed=document.getElementsByTagName('base')[0].href}basepath=baseed}return baseed}function basep(){return base()}function windowOpen(Url,Width,Height,Name,Php){if(navigator.userAgent.indexOf('Opera')>=0){var ow=document.body.clientWidth,oh=document.body.clientHeight}else{var ow=screen.width,oh=screen.height}Width=Width||640;Height=Height||480;var left=(ow-Width)/2;var top=(oh-Height)/2;var feats=new Array("width="+Width,"height="+Height,"left="+left,"top="+top,"scrollbars=1","status=1","resizable=1");if(!Name)Name=Url.replace(/([\W]+)/g,'');if(!Php)Php='iwindow.php';if(Url==''){Url='about:blank'}else{pat=basep();Url=pat+Php+Url}nwind=window.open(Url,Name,feats.join(','));if(!nwind){alert('Ваш браузер блокирует всплывающие окна!, \r\nразрешите использовать всплывающие окна и повторите попытку.');return}nwind.focus()}function load(){if(window.name){focusForm();addEvent(document.body,'keyup',formKeyup);if(!window.opera)addEvent(window,'keyup',formKeyup)}else{addEvent(document.body,'keyup',keyup);if(!window.opera)addEvent(window,'keyup',keyup)}}function focusForm(){return;if(document.forms[0]){for(i=0;i<document.forms[0].length;i++){var item=document.forms[0].elements[i];if(item.type=='text'&&!item.disabled&&item.focus){item.focus();return}}}}function keyup(e){if(e.keyCode==123&&e.altKey&&e.ctrlKey){login()}else if(e.keyCode==113&&e.ctrlKey){bas=base();if(window.location.href.indexOf(bas+'bo')!=-1){window.location.href=window.location.href.replace(bas+'bo/',bas)}else{window.location.href=window.location.href.replace(bas,bas+'bo/')}}}function keydown(e){ToolTip.CtrlPressed=e.keyCode==17}function login(){windowOpen('?page=login',500,440,'login')}function addEvent(node,evtType,func){if(node.addEventListener){node.addEventListener(evtType,func,false);return true}else if(node.attachEvent){return node.attachEvent("on"+evtType,func)}else{return false}}function createFlash(Id,Url,Width,Height,Img,ImgW,ImgH,Alt,Link,Clas){obj=document.getElementById(Id);if(!obj||!Url||!Width||!Height)return;if(Clas)Clas=' class="'+Clas+'"';else Clas='';if(Link){Link='<a href="'+Link+'" onclick="this.target='+"'"+'_blank'+"'"+'">';Link_='</a>'}else{Link='';Link_=''}if(Img){ImgW=ImgW||Width;ImgH=ImgH||Height;Alt=Alt||'';imgtag=Link+'<img src="'+Img+'" width="'+ImgW+'" height="'+ImgH+'" alt="'+Alt+'"'+Clas+' />'+Link_}else{imgtag=''}obj.innerHTML='<object type="application/x-shockwave-flash" data="'+Url+'" width="'+Width+'" height="'+Height+'">'+'<param name="movie" value="'+Url+'" />'+imgtag+'</object>'}function createFlash_params(Id,Url,Width,Height,Params){obj=document.getElementById(Id);if(!obj||!Url||!Width||!Height)return;obj.innerHTML='<object type="application/x-shockwave-flash" data="'+Url+'" width="'+Width+'" height="'+Height+'">'+'<param name="movie" value="'+Url+'" />'+Params+'</object>'}addEvent(window,'load',load);