
b_about0 = new Image();

b_about0.src = "https://mmm1118.verio-web.com/shojid/images/nav_about.gif";

b_about1 = new Image();

b_about1.src = "https://mmm1118.verio-web.com/shojid/images/nav_about-on.gif";

b_contact0 = new Image();

b_contact0.src = "https://mmm1118.verio-web.com/shojid/images/nav_contact.gif";

b_contact1 = new Image();

b_contact1.src = "https://mmm1118.verio-web.com/shojid/images/nav_contact-on.gif";

b_cart0 = new Image();

b_cart0.src = "https://mmm1118.verio-web.com/shojid/images/nav_shop.gif";

b_cart1 = new Image();

b_cart1.src = "https://mmm1118.verio-web.com/shojid/images/nav_shop-on.gif";

var Navs = ["about", "contact", "cart"];

var clicked;

var platformName = navigator.platform;
var bName = navigator.appName;
var bType;

if (bName.indexOf("Netscape") != -1) {
	bType = "NS4";
} else { 
	bType="IE4";
}

//	To use different CSS for Netscape and IE
//if(platformName.indexOf("Win") != -1 && bType=="NS4")
if(document.all)
{
	document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"https://mmm1118.verio-web.com/shojid/scripts/styleIE.css\">");
} 
else 
{
	document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"https://mmm1118.verio-web.com/shojid/scripts/styleNS.css\">");
}


function mouseOver(Name, No)
{
	if (document.images && (document[Name]))
	{
		document[Name].src = eval("b_" + Name + No + ".src");
	}

}

function mouseOut(Name, No)
{
	if(document.images && (document[Name]))
	{
		document[Name].src = eval("b_" + Name + No + ".src");
	}
}

function ShipBill(a)
{
	var myf = a.form;
	if(myf.different_address.checked)
	{
		for(var index = 0; index < 8; index++)
		{
			myf.elements[(index + 9)].value = myf.elements[index].value;
		}
		myf.cc_name.value = myf.ShipName.value;
	}
	else
	{
		for(var index = 9; index < 17; index++)
		{
			myf.elements[index].value = "";
		}
		myf.cc_name.value = "";
	}
}

function ccName(a)
{
	var myf = a.form;
	myf.cc_name.value = myf.bill_to_name.value;
}

function enlargeImage(a, b)
{
	var url = b;
	window.open(url, a, "menubar=no, resizable=no, scrollbars=no, status=yes, height=510, width=460, toolbar=no");
}

function getSKU(formNum, link, a)
{	
	//var sku = document.forms[formNum].SKU.value;
	//var num = document.forms[formNum].Option.options[document.forms[formNum].Option.selectedIndex].value;
	document.location = "http://www.shojidecor.com/upgrade.html";
	//alert("upc=" + sku + "-" + num);
	if(a)
	{
		window.close();
	}
	return false;
}

function openNew_win(url, winname)
{
	new_win = window.open(url,"winname","width=425, height=375, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes");
	new_win.location.href = url;
}

function checkForm()
{
		if (document.e_mail.mail_from.value.length >0) 
		{
			i=document.e_mail.mail_from.value.indexOf("@")
			j=document.e_mail.mail_from.value.indexOf(".",i)
			k=document.e_mail.mail_from.value.indexOf(",")
			kk=document.e_mail.mail_from.value.indexOf(" ")
			jj=document.e_mail.mail_from.value.lastIndexOf(".")+1
			len=document.e_mail.mail_from.value.length

			if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3)) 
			{
		
			} 
			else
			 {
				alert("Please enter a valid email address. " + document.e_mail.mail_from.value + " is not a valid Email Address.")
				document.e_mail.mail_from.select();
				return false;
			}
		}
		else
		{
			alert("Please enter your email address.")
			document.e_mail.mail_from.focus();
			return false;
		}
		if( myf.subject.value == 0)
		{
			alert("Please enter Subject");
			document.e_mail.subject.focus();
			return false;
		}
		if( myf.mail_body.value == 0)
		{
			alert("Please enter Comments");
			document.e_mail.mail_body.focus();
			return false;
		}
}


function fill_shipping()
{



	if ((document.billing.usebilling != undefined) && (document.billing.usebilling.checked == false))
	{ 
		document.billing.ShipFirst.value ="";
		document.billing.ShipMiddle.value ="";
		document.billing.ShipLast.value ="";
		document.billing.ShipCompany.value ="";
    		document.billing.ShipAddress.value ="";
		document.billing.ShipAddress2.value ="";
    		document.billing.ShipCity.value ="";
    		document.billing.ShipState.value = document.billing.State.options[0].value; 
    		document.billing.ShipZip.value ="";
    		document.billing.ShipPhone.value =""; 
	}
	else
	{ 
		document.billing.ShipFirst.value = document.billing.First.value;
		document.billing.ShipMiddle.value = document.billing.Middle.value;
		document.billing.ShipLast.value = document.billing.Last.value;
		document.billing.ShipCompany.value= document.billing.Company.value;
    		document.billing.ShipAddress.value = document.billing.Address.value;
		document.billing.ShipAddress2.value = document.billing.Address2.value;
    		document.billing.ShipCity.value = document.billing.City.value;
    		document.billing.ShipState.value = document.billing.State.value; 
    		document.billing.ShipZip.value = document.billing.Zip.value;
    		document.billing.ShipPhone.value = document.billing.Phone.value;
	}
}
