function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showHideLayers() { //v3.0
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

timedlayer = setTimeout("", 3)
clearTimeout(timedlayer)
function timedrestore() { //v3.0
	timedlayer = setTimeout("showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','hide','Layer7','','hide','Layer8','','hide')", 250)
}

function stoptime() { //v3.0
	clearTimeout(timedlayer)
}


var MaxFlash = 5;
var sButton;
var FlashCount = MaxFlash;

function ChangeButtonState(NewClass, sB) 
{
		
		sButton = sB;
		sButton.className = NewClass;
}


function CreateMenuItem(Name, URL, IsImg, IsSep, w, h) 
{
	if(IsImg==1)
	{
		document.write("<img name=miImg" + iBtn + " class=ImgBtnOff onmouseover=\"window.status='Click to go to the product`s home page';ChangeButtonState('ImgBtnUp', this);\" onmouseout=\"window.status='';ChangeButtonState('ImgBtnOff', this);\" onmousedown=\"ChangeButtonState('ImgBtnDown', this);\" onmouseup=\"ChangeButtonState('ImgBtnUp', this);\" onclick=\"MenuRedir('" + URL + "');\" border=0 src=\"" + Name + "\" width=" + w + " height=" + h + ">");
		if(!OP) document.images["miImg" + iBtn].style.height = h;
		iBtn++;
	}
	else
	{
		if(IsSep)
			document.write("<td width=100% class=BtnOffSep onmouseover=\"ChangeButtonState('BtnUp',this);\" onmouseout=\"window.status='';ChangeButtonState('BtnOffSep',this);\" onmouseup=\"ChangeButtonState('BtnUp',this);\" onmousedown=\"ChangeButtonState('BtnDown',this);\" onclick=\"MenuRedir('" + URL + "');\">" + Name + "</td>");
		else
		document.write("<td width=100% class=BtnOff onmouseover=\"ChangeButtonState('BtnUp',this);\" onmouseout=\"window.status='';ChangeButtonState('BtnOff',this);\" onmouseup=\"ChangeButtonState('BtnUp',this);\" onmousedown=\"ChangeButtonState('BtnDown',this);\" onclick=\"MenuRedir('" + URL + "');\">" + Name + "</td>");
	}
}

function MenuRedir(NewURL) 
{
	if(sButton.className!="BtnDis") 
	{
		DestURL = NewURL;
		FlashSelection();
	}
}

function FlashSelection() 
{
	if(sButton.className=="BtnOff")
		sButton.className="BtnUp";

	if(sButton.className=="BtnDown") 
	{
			//PlaySound();
		sButton.className="BtnUp";
	} 
	else
	if(sButton.className=="BtnUp")
		sButton.className="BtnDown";
		else
		if(sButton.className=="ImgBtnDown")
			sButton.className="ImgBtnUp";
		else
			if(sButton.className=="ImgBtnUp")
				sButton.className="ImgBtnDown";

	/*if(FlashCount>0) {
			window.setTimeout("FlashSelection()", 75);
			FlashCount--;
	} 
	else 
	{
		FlashCount = MaxFlash;
		var curClass = sButton.className;
		if(curClass.substr(0,3)=="Img")
			sButton.className = "ImgBtnOff";
		else
			sButton.className = "BtnOff";
		location.href = DestURL;
	}*/
		location.href = DestURL;
}

function DoOpenWindow(url,iwidth,iheight)
{
	window.open(url,"_blank","height="+iheight+",width="+iwidth+",status=yes,toolbar=no,menubar=no,location=no");
}

function DoOpenWindow1(url,iwidth,iheight)
{
	window.open(url,"_blank","height="+iheight+",width="+iwidth+",status=no,toolbar=no,menubar=no,location=no");
}


