// JavaScript Document







//////////////////product zooming

function zoom(imgSrc,prodid) {

	adWidth = 600;

	adHeight = 450;

	leftPos = screen.width/2 - adWidth/2;

	topPos = screen.height/2 - adHeight/2 - 60;

	var windowVar;

	var windowAttributes = "width=" + adWidth + ",height=" + adHeight + ",toolbar=0,menubar=0,scrollbars=0,resizable=0,status=0,location=0,directories=0,copyhistory=0,left=" + leftPos + ",top=" + topPos + ""

	handle = "ShodaiRW";

	url = "/cgi-bin/eCart/Zoom.asp?src=" + imgSrc + "&prodid=" + prodid + "";

	window.open(url, handle, windowAttributes);

}





	var gAutoPrint = true; // Flag for whether or not to automatically call the print function

	function printerFriendly()

	{

		if (document.getElementById != null)

		{

			var html = '<HTML>\n<HEAD>\n';

	

			if (document.getElementsByTagName != null)

			{

				var headTags = document.getElementsByTagName("head");

				if (headTags.length > 0)

					html += headTags[0].innerHTML;

					html += "<style type=\"text/css\">\n<!--\n@import url(\"http://www.shodai-inc.com/style.css\");\n-->\n</style>"

			}

			

			html += '\n</HE' + 'AD>\n<BODY>\n';

			

			var printReadyElem = document.getElementById("printReady");

			

			if (printReadyElem != null)

			{

					html += printReadyElem.innerHTML;

			}

			else

			{

				alert("Could not find the printReady section in the HTML");

				return;

			}

				

			html += '\n</BO' + 'DY>\n</HT' + 'ML>';

			

			var printWin = window.open("","printerFriendly");

			printWin.document.open();

			printWin.document.write(html);

			printWin.document.close();

			if (gAutoPrint)

				printWin.print();

		}

		else

		{

			alert("Sorry, the print ready feature is only available in modern browsers.");

		}

	}









////////////////////////// 	menu fxs  begin









function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);



function MM_findObj(n, d) { //v4.01

  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=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function P7_autoLayers() { //v1.4 by PVII

 var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0;

 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){

 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){

 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){

 if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false;

 for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}

 if(!f){p7c[a][p7c[a].length++]=args[k];}}}

}



function P7_hideDiv(evt) { //v1.3 by PVII

 var b,relT,mT=false; 

 if(document.layers){b=evt.target;if(b.p7aHide){

  b.visibility="hidden";}else{routeEvent(evt);}

 }else if(document.all&&!window.opera){b=event.srcElement;

  while(b!=null){if(b.tagName=="DIV" && b.p7ahD){mT=true;break;}b=b.parentElement;}

  if(!b.contains(event.toElement)){b.style.visibility="hidden";}

 }else if(document.getElementById){b=evt.currentTarget;relT=evt.relatedTarget;

  while(relT!=null){if(b==relT){mT=true;break;}

  relT=relT.parentNode;}if(!mT){b.style.visibility="hidden";}}

}



function P7_autoHide() { //v1.3 by PVII

 var i,g,args=P7_autoHide.arguments;

 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){

  g.p7aHide=true;if(document.layers){

  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}

}











////////////////////////// 	end of menu fxs











function setClassName(src,newClassName) {

	src.className = newClassName;

}





function toggleDisplay(divId) {

	divStyle = document.getElementById(divId).style;

	if ( (divStyle.display == "block") || (divStyle.display == "") ) {

		divStyle.display = "none";

	} else {

		divStyle.display = "block";

	}

}



	

	function act(imgName) {

		if (document.images) {

			document [imgName].src = eval(imgName + "_on.src");

		}

	}

	

	function deact(imgName) {

		if (document.images) {

			document [imgName].src = eval(imgName + "_off.src");

		}

	}








