isNav = false;
isIE = false;

if (navigator.appName.indexOf("Microsoft") != -1)
{
	isIE = true;
}
else
{
	if (parseInt(navigator.appVersion) >= 5)
	{
		isIE = true;
	}
	else
	{
		isNav = true;
	}
}

if (isNav)
{
	setxs="show";
	setxh="hide";
}
else
{
	setxs="visible";
	setxh="hidden";
}

function getWidth()
{
	if (isNav)
	{
		return window.innerWidth
	} 
	else
	{
		return document.body.clientWidth
	}
}

function getScale()
{
	var scale;	
	scale = getWidth()
	if (scale <= 756)
	{
		scale=756;
	}
	centx = (scale - 756)/2
	centx = Math.floor(centx) 
	return centx;
}

function givecenter()
{
	var scale0 = getScale() + 31;

	if(isNav)
	{
		document.layer00.moveTo(scale0,65)
	}
	else
	{
		document.all.layer00.style.pixelLeft =scale0;
	}
}

/* color change code begin */

function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}

/* color change code end */

function givelayer()
{
	var scale0 = getScale() + 400;

	morex=" onmouseover=this.style.visibility="+"'"+setxs+"'"+" onmouseout=this.style.visibility="+"'"+setxh+"'"

	document.write("<span id=layer00 style=position:absolute;left:"+scale0+";top:62px;width:90;visibility:"+setxh+morex+">");
	document.write("<table width=81 cellpadding=0 cellspacing=0 border=0><tr><td height=20> </td></tr></table>");
	document.write("<table id=ignore width=140 cellpadding=2 cellspacing=1 border=0 bgcolor=#616662 onMouseover=changeto('64A9D7') onMouseout=changeback('EEEEEE')>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=22 class=link01>ASHTRAY</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=23 class=link01>BADGE</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=25 class=link01>FRIDGE MAGNET</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=26 class=link01>KEY CHAINS</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=27 class=link01>METAL ORNAMENT</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=28 class=link01>PHOTO FRAME</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=29 class=link01>POLY ORNAMENT</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=30 class=link01>SPOON</a></td></tr>");
	document.write("<tr><td bgcolor=EEEEEE>　 <a href=product.asp?sortid=31 class=link01>OTHER</a></td></tr>");
	document.write("</table></span>");
}