function Is() {
   var agent = navigator.userAgent.toLowerCase();
   this.major = parseInt(navigator.appVersion);
   this.minor = parseFloat(navigator.appVersion);
   this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
   this.nsold = (this.ns && (this.major < 4));
   this.ns4b = (this.ns && (this.minor < 4.04));
   this.ns4 = (this.ns && (this.major >= 4));
   this.ie = (agent.indexOf("msie") != -1);
   this.ieold = (this.ie && (this.major < 4));
   this.ie4 = (this.ie && (this.major >= 4));
   this.op = (agent.indexOf("opera") != -1);
}

var is = new Is();
var mon = new Array();
var moff = new Image();
moff.src = "i/d/m_norm.gif";
var loaded = true;

for(i=1;i<=6;i++){
 mon[i] = new Image();
 mon[i].src = "i/d/m0" + i + ".gif";
}

function cc(id) {
 if (loaded){
  if(document.images){
   document.images["menu"].src = mon[id].src;
  }
 }
}

function rc() {
 if (loaded){
  if(document.images){
   document.images["menu"].src = moff.src;
  }
 }  
}

obj = new Object();
oldobj = new Object();

function bcc(obj){
 oldobj = obj;
 old = obj.style.backgroundColor;
 obj.style.backgroundColor = "#cdc762";
 oldb = obj.style.border;
 obj.style.border = "1 solid #9d9732";
}

function brc(){
 oldobj.style.backgroundColor = old;
 oldobj.style.border = oldb;
}

function openme(url){
  h = 300;
  w = 400;
  window.name = 'father';
  urls = "download.php?what=pdf&id=" + url ;
 // myWin.document.write(urls);
  title = 'Соглашение на закачку .PDF файлов';
  myWin = window.open('','','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,width='+w+',height='+h);
  myWin.document.write("<html><head><title>"+title+"</title>");
  myWin.document.write("\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">");
  myWin.document.write("\n</head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
  myWin.document.write("\n<input type=button onClick=\"window.close();\" value=\"1\">");
  myWin.document.write("\n<form target=\"father\" action=\"download.php\" method=POST><input type=hidden value=1 name=id><input type=submit></form>");
  myWin.document.write("\n</body></html>");
  myWin.document.close();
}


