isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isOpera=isOpera5=window.opera && isDOM //Opera 5+
isOpera6=isOpera && window.print //Opera 6+
isOpera7=isOpera && document.readyState //Opera 7+
isMSIE=document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+
isMSIE5=isDOM && isMSIE //MSIE 5+
isNetscape4=document.layers //Netscape 4.*
isMozilla=isDOM && navigator.appName=="Netscape" //Mozilla или Netscape 6.*



var MenuHLColor = "#91C8FF"; 

function HiLightA(Obj)
{
OldCl = Obj.style.backgroundColor;
Obj.style.backgroundColor = MenuHLColor;
Obj.style.color = 'white';
}


function popChk(URL) 
{
WndW=500;
WndH=350;
H=screen.availHeight/2-WndH/2;
W=screen.availWidth/2-WndW/2;
OpenWin = this.open(URL, "ExpressWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width="+WndW+",height="+WndH+",left="+W+",top="+H);
}



function RestoreHiLightA(Obj)
{
Obj.style.backgroundColor = OldCl;
}


function Go( Ref ) 
{
 window.location.replace(Ref);
}


function checkMaxInput(form) {
if (form.reason.value.length > maxLen) 
form.reason.value = form.reason.value.substring(0, maxLen);
}

function changeProp() {
 var args=arguments,d=document,i,j,id=args[0],o=getObjectByID(id),s,ao,v,x;
 d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o"; 
 ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)) { 
  s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
 x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
 if(s) eval(s+"=v"); }
}

function getObjectByID(id,o) {
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function changePropRestore() {
 var d=document,x; if(d.$cpe) { for(i=0; i<d.$cpe.length; i++) { x=d.$cpe[i];
 if(x.v=="") x.v=""; eval("x."+x.n+"=x.v"); } d.$cpe=null; }
}





