var lastbutton='top';
var LastRest = '';
var pos = 0;
var height = 0;
var offset = 0;
var NS4;
var IE4;
var NS6;
if (document.all) {
   IE4 = 1;
}
else if (document.layers) {
   NS4 = 1;
}
else if (document.getElementById) {
   NS6 = 1;
}

function P(menuName,on,Position,color,v) {
   if(on == 1) {
      if(window.document.images[menuName]) {
	 window.document.images[menuName].src = '/v_' + v + '_' + menuName + color + '.gif';
      }
   }
   if(top.loaded == 1) {
      try {
	 if(NS4) {
	    top.main3.chooseText(menuName,"NS4");
	    top.main1.document.layers["i220"].visibility = 'show';
	    LastRest = "i220";
	    height = top.main1.window.innerHeight;
	    offset = top.main1.window.pageYOffset;
	    pos = (height - (height - Position)) - window.pageYOffset + offset;
	    if (pos < offset) {
	       top.main1.document.layers["i220"].top = offset;
	       top.main1.document.layers["i220"].left = 7;
	    }
	    else {
	       if ((height + offset) - pos < 120) {
		  top.main1.document.layers["i220"].top = (height + offset) - 120;
		  top.main1.document.layers["i220"].left = 7;
	       }
	       else {
		  top.main1.document.layers["i220"].top = pos;
		  top.main1.document.layers["i220"].left = 7;
	       }
	    }
	 }
	 else if (NS6) {
	    top.main3.chooseText(menuName,"NS6");
	    top.main1.document.getElementById("i220").style.visibility = 'visible';
	    LastRest = "i220";
	    height = top.main1.window.innerHeight;
	    offset = top.main1.window.pageYOffset;
	    pos = (height - (height - Position)) - window.pageYOffset + offset;
	    if (pos < offset) {
	       top.main1.document.getElementById("i220").style.top = offset + "px";
	       top.main1.document.getElementById("i220").style.left = 7 + "px";
	    }
	    else {
	       if ((height + offset) - pos < 120) {
		  top.main1.document.getElementById("i220").style.top = ((height + offset) - 120) + "px";
		  top.main1.document.getElementById("i220").style.left = 7 + "px";
	       }
	       else {
		  top.main1.document.getElementById("i220").style.top = pos + "px";
		  top.main1.document.getElementById("i220").style.left = 7 + "px";
	       }
	    }
	 }
	 else {
	    top.main3.chooseText(menuName,"IE");
	    top.main1.document.all["i220"].style.visibility = 'visible';
	    LastRest = "i220";
	    height = top.main1.document.body.clientHeight;
	    offset = top.main1.document.body.scrollTop || top.main1.document.documentElement.scrollTop;
	    var thisScrollTop = document.body.scrollTop || document.documentElement.scrollTop;

	    pos = (height - (height - Position)) - thisScrollTop + offset;
	    if (pos < offset) {
	       top.main1.document.all["i220"].style.pixelTop = offset;
	       top.main1.document.all["i220"].style.pixelLeft = 7;
	    }
	    else {
	       if ((height + offset) - pos < 120) {
		  top.main1.document.all["i220"].style.pixelTop = (height + offset) - 120;
		  top.main1.document.all["i220"].style.pixelLeft = 7;
	       }
	       else {
		  top.main1.document.all["i220"].style.pixelTop = pos;
		  top.main1.document.all["i220"].style.pixelLeft = 7;
	       }
	    }
	 }
      }
      catch(e){}
   }
}

function C(menuName,on,color,v) {
   if(window.document.images[menuName]) {
      window.document.images[menuName].src = '/v_' + v + '_' + menuName + color + '.gif';
   }
   if(top.loaded == 1) {
      if(LastRest != "") {
	 try {
	    if(NS4) {
	       top.main1.document.layers["i220"].visibility = 'hide';
	    }
	    else if(NS6) {
	       top.main1.document.getElementById("i220").style.visibility = 'hidden';
	    }
	    else {
	       top.main1.document.all["i220"].style.visibility = 'hidden';
	    }
	 }
	 catch(e){}
      }
   }
}

function L(FileName,v) {
   top.loaded=0;
   //top.ur.document.images[0].src = '/v_' + v + '_' + FileName + '.gif';
}

function change(Name,No) {
   popUp(Name,false);
}

