function gotonext(theid,theuid,thename){
	//this.document.location.href='index.asp?stype=prod_show&pdid='+theid
	this.document.location.href='products_detail.asp?pdid='+theid+'&puid='+theuid+'&'+thename+'.htm'
}

function gotopage(thelink,theid,thevalue){
	this.document.location.href=thelink+'?Page='+theid+thevalue
}

function gotopage2(thelink,theid){
	var myvalue;

	this.document.location.href=thelink+'?Page='+theid+thevalue
}


function gocart(thevalue){
	window.open("../cart.asp?otype=insert&id="+thevalue,"","width=10,height=10,top=800,left=1024")
	//this.document.location.href="cart.asp?otype=insert&id="+thevalue
	//history.go(1);
}

function changeme(theid){
	//mylength=new Array();
	var mylength;
	mylength=eval("document.getElementById('"+theid+"')");
	//alert(mylength.length);
	//alert(eval("document.getElementById('"+theid+"').length"));
	eval("document.getElementById('"+theid+"').innerHTML='<font color=red>Selected</font>'");
	//alert(eval("document.getElementById('"+theid+"').innerHTML"));
}

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
	zBox=document.createElement("div");
	zBox.style.position="absolute";
	document.body.appendChild(zBox);
} else if (document.all && !zBox) {
	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
	zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
	zBox=new Layer(maxW);
	zBox.style=zBox;
	}
zLink=zlink;
doZoom();
}

function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
	zBox.document.open();
	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
	zBox.document.close();
	} else {
	zBox.style.border="2px solid #999999";
	zBox.style.left=toX+zPct*(fromX-toX);
	zBox.style.top=toY+zPct*(fromY-toY);
	zBox.style.width=maxW*(1-zPct);
	zBox.style.height=maxH*(1-zPct);
	}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",60);
else {
	zBox.style.visibility='hidden';
	zStep=0;
	if (zLink && !zNew) location.href=zLink.href;
	else if (zLink && zNew) {
		var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars,resizable');
		zNew=null;
		}
	}
}

function high(which2){
	theobject=which2;theobject.filters.alpha.opacity=0
	highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
	clearInterval(highlighting)
	which2.filters.alpha.opacity=100
}
function highlightit(cur2){
	if (cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=15
	else if(window.highting)
		clearInterval(highlighting)
}
