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)
   {
      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 < 100)
	    {
	       top.main1.document.layers["i220"].top = (height + offset) - 100;
	       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;
	    top.main1.document.getElementById("i220").style.left = 7;
	 }
	 else
	 {
	    if ((height + offset) - pos < 100)
	    {
	       top.main1.document.getElementById("i220").style.top = (height + offset) - 100;
	       top.main1.document.getElementById("i220").style.left = 7;
	    }
	    else
	    {
	       top.main1.document.getElementById("i220").style.top = pos;
	       top.main1.document.getElementById("i220").style.left = 7;
	    }
	 }
      }
      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;
	 pos = (height - (height - Position)) - document.body.scrollTop + 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 < 100)
	    {
	       top.main1.document.all["i220"].style.pixelTop = (height + offset) - 100;
	       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;
	    }
	 }
      }
   }
}
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 != "")
      {
	 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';
	 }
      }
   }
}
function L(FileName,v)
{
   top.loaded=0;
   top.ur.document.images[0].src = '/v_' + v + '_' + FileName + '.gif';
}
function change(Name,No)
{
   popUp(Name,false);
}

