// JavaScript Documentfunction updateTotal(frm){ 	var x=0;		//alert(blar);	 if (frm.dvd.value){//		 alert("1");		 x+=frm.dvd.value*69.95;		 }	 if (frm.vhs.value){//			 alert("2");			 x+=frm.vhs.value*69.95;		 } 	if (frm.pal.value){//			 alert("3");			 x+=frm.pal.value*69.95;		 }//	 alert(frm.x_ship_to_state.value);	if (frm.x_ship_to_state.value=="IL"){			x+=x*.0775;		}	if (x!=0){			x+=4.95;		}					//  frm.x_amount.value=x.toFixed(2)frm.x_amount.value=CurrencyFormatted(x)}function CurrencyFormatted(amount){    var i = parseFloat(amount);    if(isNaN(i)) { i = 0.00; }    var minus = '';    if(i < 0) { minus = '-'; }    i = Math.abs(i);    i = parseInt((i + .005) * 100);    i = i / 100;    s = new String(i);    if(s.indexOf('.') < 0) { s += '.00'; }    if(s.indexOf('.') == (s.length - 2)) { s += '0'; }    s = minus + s;    return s;}// end of function CurrencyFormatted()<!-- /*Source: Webmonkey Code LibraryAuthor: Nadav SavioAuthor Email: nadav@wired.com*/// This next little bit of code tests whether the user accepts cookies.var WM_acceptsCookies = false;if(document.cookie == '') {    document.cookie = 'WM_acceptsCookies=yes'; // Try to set a cookie.    if(document.cookie.indexOf('WM_acceptsCookies=yes') != -1) {	WM_acceptsCookies = true;     }// If it succeeds, set variable} else { // there was already a cookie  WM_acceptsCookies = true;}function WM_setCookie (name, value, hours, path, domain, secure) {    if (WM_acceptsCookies) { // Don't waste your time if the browser doesn't accept cookies.	var not_NN2 = (navigator && navigator.appName 		       && (navigator.appName == 'Netscape') 		       && navigator.appVersion 		       && (parseInt(navigator.appVersion) == 2))?false:true;	if(hours && not_NN2) { // NN2 cannot handle Dates, so skip this part	    if ( (typeof(hours) == 'string') && Date.parse(hours) ) { // already a Date string		var numHours = hours;	    } else if (typeof(hours) == 'number') { // calculate Date from number of hours		var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();	    }	}	document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); // Set the cookie, adding any parameters that were specified.    }} // WM_setCookiefunction WM_readCookie(name) {	if(document.cookie == '') { // there's no cookie, so go no further	return '';     } else { // there is a cookie	var firstChar, lastChar;	var theBigCookie = document.cookie;	firstChar = theBigCookie.indexOf(name);	// find the start of 'name'	var NN2Hack = firstChar + name.length;	if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie	    firstChar += name.length + 1; // skip 'name' and '='	    lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').	    if(lastChar == -1) lastChar = theBigCookie.length;	    return unescape(theBigCookie.substring(firstChar, lastChar));	} else { // If there was no cookie of that name, return false.	    return '';	}    }	} // WM_readCookiefunction WM_killCookie(name, path, domain) {  var theValue = WM_readCookie(name); // We need the value to kill the cookie  if(theValue) {      document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie  }} // WM_killCookie//qString = '?pfprompt='+WM_readCookie('pfprompt')+'&unique='+(Math.floor(100000*Math.random()));function fillForm() {	dvd = (WM_readCookie('dvd')) !="" ? WM_readCookie('dvd') : 0;	vhs = (WM_readCookie('vhs')) != "" ? WM_readCookie('vhs') : 0;	pal = (WM_readCookie('pal')) !="" ? WM_readCookie('pal') : 0;	//alert( "My name is ");	document.form1.dvd.value = dvd;    document.form1.vhs.value = vhs;	document.form1.pal.value = pal; // fillForm}function orderbutton(product) {//	alert ("hi");//	var productnum = WM_readCookie(product);	var productnum = WM_readCookie(product)=="" ? 0 : parseInt(WM_readCookie(product));//	var productnum = 0;//	alert (productnum);	productnum++;//	alert (productnum);	WM_setCookie(product,productnum);}//premiershowcase code starts herefunction sameasAbove(frm) { 	 if (frm.same.click){	//	 alert("same");		  document.form1.x_first_name.value=document.form1.x_ship_to_first_name.value;		  document.form1.x_last_name.value=document.form1.x_ship_to_last_name.value;		  document.form1.x_address.value=document.form1.x_ship_to_address.value;		  document.form1.x_city.value=document.form1.x_ship_to_city.value;		  document.form1.x_state.value=document.form1.x_ship_to_state.value;		  document.form1.x_zip.value=document.form1.x_ship_to_zip.value;		  document.form1.x_phone.value=document.form1.x_ship_to_phone.value;		  document.form1.x_email.value=document.form1.x_ship_to_email.value;		 } 	}// from http://developer.apple.com/internet/webcontent/validation.html	function checkWholeForm(frm) {	//alert (frm.name);    var why = "";	why += check_ShipToFName(frm.x_ship_to_first_name.value);	why += check_ShipToLName(frm.x_ship_to_last_name.value);	why += check_BillToFName(frm.x_first_name.value);	why += check_BillToLName(frm.x_last_name.value);	why += check_ShipToAddress(frm.x_ship_to_address.value);	why += check_BillToAddress(frm.x_ship_to_address.value);	why += check_ShipToCity(frm.x_ship_to_city.value);	why += check_BillToCity(frm.x_ship_to_city.value);	why += check_ShipToState(frm.x_ship_to_state.value);	why += check_BillToState(frm.x_state.value);	why += check_ShipToZip(frm.x_ship_to_zip.value);	why += check_BillToZip(frm.x_zip.value);	why += check_ShipToEmail(frm.x_ship_to_email.value);	why += check_BillToEmail(frm.x_email.value);	why += check_Terms(frm.terms.value);    if (why != "") {       alert(why);       return false;    }else {return true;	}}// emailfunction check_ShipToEmail(strng) {var error="";if (strng == "") {   error = "You didn't enter a contact email address.\n";}    var emailFilter=/^.+@.+\..{2,3}$/;    if (!(emailFilter.test(strng))) {        error = "Please enter a valid contact email address.\n";    }    else {//test email for illegal characters       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/         if (strng.match(illegalChars)) {          error = "The contact email address contains illegal characters.\n";       }    }return error;    }function check_BillToEmail(strng) {var error="";if (strng == "") {   error = "You didn't enter a billing email address.\n";}    var emailFilter=/^.+@.+\..{2,3}$/;    if (!(emailFilter.test(strng))) {        error = "Please enter a valid billing email address.\n";    }    else {//test email for illegal characters       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/         if (strng.match(illegalChars)) {          error = "The billing email address contains illegal characters.\n";       }    }return error;    }// test namesfunction check_ShipToFName(strng) {var error="";if (strng == "") {   error = "Please enter a contact first name.\n";}return error;    }function check_ShipToLName(strng) {var error="";if (strng == "") {   error = "Please enter a contact last name.\n";}return error;    }function check_BillToFName(strng) {var error="";if (strng == "") {   error = "Please enter a billing frist name.\n";}return error;    }function check_BillToLName(strng) {var error="";if (strng == "") {   error = "Please enter a billing last name.\n";}return error;    }//check addressfunction check_ShipToAddress(strng) {var error="";if (strng == "") {   error = "Please enter a contact street address.\n";}else if (!((strng.search(/(a-z)+/))  && (strng.search(/(0-9)+/)))) {  error = "Please enter a valid contact street address.\n";  }return error;    }function check_BillToAddress(strng) {var error="";if (strng == "") {   error = "Please enter a billing street address.\n";}else if (!((strng.search(/(a-z)+/))  && (strng.search(/(0-9)+/)))) {  error = "Please enter a valid billing street address.\n";  }return error;    }// Check Cityfunction check_ShipToCity(strng) {var error="";if (strng == "") {   error = "Please enter a contact city.\n";}return error;    }function check_BillToCity(strng) {var error="";if (strng == "") {   error = "Please enter a billing city.\n";}return error;    }// check Statefunction check_ShipToState(strng) {var error="";if (strng == "") {   error = "Please enter a contact state.\n";}	var illegalChars = /[\W_(0-9)]/; // allow only letters if ((strng.length < 2) || (strng.length > 2)) {       error = "Please enter 2 digit mail code for the contact state.\n";    }	 else if (illegalChars.test(strng)) {      error = "The contact state contains illegal characters.\n";    }return error;    }function check_BillToState(strng) {var error="";if (strng == "") {   error = "Please enter a billing states.\n";}	var illegalChars = /[\W_(0-9)]/; // allow only letters if ((strng.length < 2) || (strng.length > 2)) {       error = "Please enter 2 digit mail code for the billing state.\n";    }	 else if (illegalChars.test(strng)) {      error = "The billing state contains illegal characters.\n";    }return error;    }// check zipfunction check_ShipToZip(strng) {var error="";if (strng == "") {   error = "Please enter a contact state.\n";}	var illegalChars = /[\W_(A-Z)(a-z)]/; // allow only letters if ((strng.length < 5) || (strng.length > 5)) {       error = "Please enter 5 digit contact zip code.\n";    }	 else if (illegalChars.test(strng)) {      error = "The contact zip code contains illegal characters.\n";    }return error;    }function check_BillToZip(strng) {var error="";if (strng == "") {   error = "Please enter a billing states.\n";}	var illegalChars = /[\W_(A-Z)(a-z)]/; // allow only numbers if ((strng.length < 5) || (strng.length > 5)) {       error = "Please enter 5 digit billing zip code.\n";    }	 else if (illegalChars.test(strng)) {      error = "The billing zip code contains illegal characters.\n";    }return error;    }// check agree to termsfunction check_Terms(string) {var error="";if (document.form1.terms.checked == false) {	error = "Please read and agree to the privacy policy and terms and conditions. \n";}return error;    }//Check to see if Netscape 4, if so, run functionif (document.layers){ self.location.href="detect.html";}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}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 MM_nbGroup(event, grpName) { //v6.0  var i,img,nbArr,args=MM_nbGroup.arguments;  if (event == "init" && args.length > 2) {    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();      nbArr[nbArr.length] = img;      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {        if (!img.MM_up) img.MM_up = img.src;        img.src = img.MM_dn = args[i+1];        nbArr[nbArr.length] = img;    } }  } else if (event == "over") {    document.MM_nbOver = nbArr = new Array();    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {      if (!img.MM_up) img.MM_up = img.src;      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);      nbArr[nbArr.length] = img;    }  } else if (event == "out" ) {    for (i=0; i < document.MM_nbOver.length; i++) {      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }  } else if (event == "down") {    nbArr = document[grpName];    if (nbArr)      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }    document[grpName] = nbArr = new Array();    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {      if (!img.MM_up) img.MM_up = img.src;      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;      nbArr[nbArr.length] = img;  } }}