//<!-- Include Code v3.17 - All rights reserved -->
var BU='http://www.ercva.com/p.pl?a=10001132326380';
var _ud="undefined";var IT="";var olt=false;var img=new Image();var na=(navigator.appName=="Netscape");if(typeof ACTION!=_ud){IT+="&x="+escape(ACTION);ACTION='';}else var ACTION='';if(typeof AMOUNT!=_ud){IT+="&xa="+escape(AMOUNT);AMOUNT='';}else var AMOUNT='';if(typeof ORDERID!=_ud){IT+="&oc="+escape(ORDERID);ORDERID='';}else var ORDERID='';if(typeof MEMBERID!=_ud)BU+="&m="+escape(MEMBERID);if(typeof DOCUMENTGROUP!=_ud)BU+="&c="+escape(DOCUMENTGROUP);if(typeof DOCUMENTNAME!=_ud)BU+="&b="+escape(DOCUMENTNAME);else if(document.title.length>0)BU+="&b="+escape(document.title);var itDate=new Date();IT+="&d="+escape(itDate.toGMTString());IT+="&n="+escape(parseInt(itDate.getTimezoneOffset()/60));var ecl='';if(typeof EXCL!=_ud)ecl=EXCL;function gcpn(x){var z=location.search;var i=z.indexOf("?"+x+"=");var j=z.indexOf("&"+x+"=");if((i==0)||(j>-1)){var k=(i==0)?0:j;var l=z.indexOf('&',k+1);return z.substring(k+2+x.length,(l>-1)?l:z.length);}return '';}function getFileName(x){return (x.substring(x.lastIndexOf("/")+1,x.length));}function gh(x){var i=x.host.indexOf(":");return (i>=0)?x.host.substring(0,i):x.host;}function gpr(x){var y=x.protocol;var i=y.indexOf(":");return (i>=0)?y:y+":";}function gp(x){var y=x.pathname;var i=y.indexOf("/");return (i==0)?y:"/"+y;}function mxDmnRGXP(v){return new RegExp(mxRgXpStr(v),"i");}function mxR(e,_x,_y,_z){i=0;while(e.indexOf(_x)>=0){i++;e=e.replace(_y,_z);if(i>50)break;}return e;}function mxRgXpStr(e){e=mxR(e," "," ","");e=mxR(e,"\*\.","\\*\\.","\*");e=mxR(e,",\*",",\\*","|");e=mxR(e,"*","*","");e=mxR(e,",",",","|^");e=mxR(e,".","\\.",";");e=mxR(e,";",";","\\.");return e;}function exitLink(x){if(gh(location)==gh(x))return true;var pt =(typeof DOMAINS!=_ud)?mxDmnRGXP(DOMAINS):mxDmnRGXP(gh(location));a=(ACTION=='')?"":"&x="+escape(ACTION);xa=(AMOUNT=='')?"":"&xa="+escape(AMOUNT);ln=escape(x.href);if(pt.test(gh(x)))return true;if(na)setTimeout("img.src=BU+xa+a+'&el='+ln;",1);else img.src=BU+xa+a+'&el='+ln;return true;}function oco(x){var rv=true;if(x.oc)rv=x.oc();fn=getFileName(x.pathname);if(fn!=""){var pt=new RegExp("\\..?html?|\\.asp|\\.cfm|\\.jsp|\\.cgi|\\.php[3-4]?|\\.pl|\\.taf|\\.tml|\\.dll|\\.vm|\\.mv|jsessionid","i");if((!pt.test(fn))&&(fn.indexOf(".")!= -1)){if(((ecl.length>0)&&(!mxDmnRGXP(ecl).test(x.pathname)))||(ecl.length == 0)){a=(ACTION=='')?"":"&x="+escape(ACTION);xa=(AMOUNT=='')?"":"&xa="+escape(AMOUNT);fn=gpr(x)+"//"+gh(x)+gp(x);if(na)setTimeout("img.src=BU+xa+a+\"&fn=\"+escape(fn);",1);else img.src=BU+xa+a+"&fn="+escape(fn);}}else exitLink(x);}else exitLink(x);return rv;}function olo(){if(olt)ool();var ln=document.links.length;for(var i=0;i<ln;i++){if(document.links[i].onclick)document.links[i].oc=document.links[i].onclick;eval("document.links[i].onclick=function(){return oco(this);}");}}ns=(navigator.appName.substring(0,9)=="Microsoft");if(((window.screen)||((new Array()).toSource)||((new Array()).shift&&ns))&& (navigator.userAgent.indexOf('Mac')<0)){if(window.onload){ool=window.onload;olt=true;}window.onload=olo;}function _e(){_rf(false);return true;}_rf(true);function _rf(_d){t="";r=document.referrer;if((navigator.userAgent.indexOf('Mac')>=0)&&(navigator.userAgent.indexOf('MSIE 4')>=0))r=document.referrer;else if(_d){window.e=window.onerror;window.onerror=_e;if(document.location!=top.location){r=top.document.referrer;t=top.location.href;}}else IT+="&nr=t";window.onerror=window.e;if(r.length>0)IT+="&e="+escape(r);if(t.length>0)IT+="&t="+escape(t);BU+="&f="+escape(document.location);document.cookie="itc=t";IT+="&g="+escape(na?navigator.language:navigator.userLanguage);IT+="&h="+escape((navigator.javaEnabled()?'Y':'N'));IT+="&j="+escape(screen.width+'x'+screen.height);IT+="&k="+escape((ns)?screen.colorDepth:screen.pixelDepth);IT+="&l="+((document.cookie.indexOf("itc=")>=0)?"true":"false");if((typeof CAMPAIGN!=_ud)&&(CAMPAIGN!=''))IT+="&cp="+escape(CAMPAIGN);if((typeof CMPPARM!=_ud)&&(CMPPARM!=''))IT+="&cp="+escape(gcpn(CMPPARM));if((typeof PROMO!=_ud)&&(PROMO!=''))IT+="&scp="+escape(PROMO);if((typeof PROMOPARM!=_ud)&&(PROMOPARM!=''))IT+="&scp="+escape(gcpn(PROMOPARM));img.src=BU+IT;if(!na||(parseInt(navigator.appVersion)<5))document.write("<\!--");}
//<!-- End of Include Code -->


function setDescription(desc, id) {
	if (document.all.productDescription) {
		if (desc && (desc.length > 0)) {
			productDescription.innerHTML = desc;
		}
	}
	
	if (document.all.productImage) {
		if (!id || id == 'blank') {
			document.all.productImage.src = "/imagelibrary/blank.gif";
			if (document.all['flash']) {
				document.all['flash'].style.visibility = 'visible';
			}
		} else {
			document.all.productImage.src = "/imagelibrary/product/" + id + "/160x200.gif";
			if (document.all['flash']) {
				document.all['flash'].style.visibility = 'hidden';
			}
		}
	}
}

function preload() {
  if (!document.images) return;
  var ar = new Array();
  var arguments = preload.arguments;
  for (var i = 0; i < arguments.length; i++) {
    ar[i] = new Image();
    ar[i].src = arguments[i];
  }
}

function updatePrompt() {
	if (document.all) {
		var list;

		if (document.all.JobContact_contactMethod) {
			list = document.all.JobContact_contactMethod;
		} else if (document.all.ContactRequest_contactMethod) {
			list = document.all.ContactRequest_contactMethod;
		}
		var label = list.options[list.selectedIndex].text;
		
		if (label != 'Email') {
			label += ' #';
		}
		document.all.contactPrompt.innerHTML = label;
	}
}

function updateContent(divName, newContent) {
	if (document.all) {
		if (document.all[divName]) {
			document.all[divName].innerHTML = newContent;
		}
	}
}

function updateImage(imgName, newURL) {
	if (document.all) {
		if (document.all[imgName]) {
			document.all[imgName].src = newURL;
		}
	}
}


function updateTruckImage() {

	var f = document.forms['productForm'];	

	if (f['product_style'].value == 'Welded Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/weldShelfCart.gif";
	} else if (f['product_style'].value == 'Ergonomic Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/ergoTruck.gif";
	} else if (f['product_style'].value == 'Heavy Duty Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/hdShelfTruck.gif";
	} else if (f['product_style'].value == 'Order Picking Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/orderPicker.gif";
	} else if (f['product_style'].value == 'Super Heavy Duty Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/xhdShelfTruck.gif";
	} else if (f['product_style'].value == 'Multi Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/multiShelf.gif";
	} else if (f['product_style'].value == 'Merchandise Collector')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/mercCollector.gif";
	} else if (f['product_style'].value == 'Deep Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/6inDeepShelf.gif";
	}
}

function updatePlatformImage() {

	var f = document.forms['productForm'];	

	if (f['product_style'].value == 'Cushion Loaded Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/cushPlatform.gif";
	} else if (f['product_style'].value == 'Ergonomic Work Height Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/ergoWorkHeight.gif";
	} else if (f['product_style'].value == 'Heavy Duty Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/hdPlatform.gif";
	} else if (f['product_style'].value == 'High Deck Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/highDeck.gif";
	} else if (f['product_style'].value == 'High End Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/highEndPlatform.gif";
	} else if (f['product_style'].value == 'Economy Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/economyPlatform.gif";
	} else if (f['product_style'].value == 'Quick Turn Platform Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/quickTurn.gif";
	} 
}


function updateTPMImage() {

	var f = document.forms['productForm'];	

	if (f['product_layoutM'].value == 'BW')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormBW.gif";
	} else if (f['product_layoutM'].value == 'BWADA')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormBWADA.gif";
	} else if (f['product_layoutM'].value == 'ACOnly')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormAlcoveOnly.gif";
	} else if (f['product_layoutM'].value == 'ACStalls')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormAlcove.gif";
	} else if (f['product_layoutM'].value == 'IC')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormIC.gif";
	} else if (f['product_layoutM'].value == 'FS')  {
		document.imageM.src = "http://www.lockersnmore.com/images/tpFormFS.gif";	
	} 
}

function updateTPWImage() {

	var f = document.forms['productForm'];	

	if (f['product_layoutW'].value == 'BW')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormBW.gif";
	} else if (f['product_layoutW'].value == 'BWADA')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormBWADA.gif";
	} else if (f['product_layoutW'].value == 'ACOnly')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormAlcoveOnly.gif";
	} else if (f['product_layoutW'].value == 'ACStalls')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormAlcove.gif";
	} else if (f['product_layoutW'].value == 'IC')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormIC.gif";
	} else if (f['product_layoutW'].value == 'FS')  {
		document.imageW.src = "http://www.lockersnmore.com/images/tpFormFS.gif";	
	} 
}

function updateBulkHandlingImage() {

	var f = document.forms['productForm'];	

	if (f['product_style'].value == '3 Sided Bulk Handling Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHTruck.gif";
	} else if (f['product_style'].value == '3 Sided Bulk Handling Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHShelf.gif";
	} else if (f['product_style'].value == '3 Sided Drop Shelf Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHDrop.gif";
	} else if (f['product_style'].value == 'Heavy Duty Mobile Storage Locker')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHLocker.gif";
	} else if (f['product_style'].value == 'Pick Pack Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHPickPack.gif";
	} else if (f['product_style'].value == 'Drop Gate Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHDropGate.gif";
	} else if (f['product_style'].value == 'Security Box Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/BHSecurity.gif";
	} 
}

function updatePanelImage() {

	var f = document.forms['productForm'];	

	if (f['product_style'].value == 'Adjustable Sheet Panel Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/AdjustPanelTruck.gif";
	} else if (f['product_style'].value == 'A-Frame Sheet Panel Truck')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/AFramePanelTruck.gif";
	} else if (f['product_style'].value == 'Drywall Carts')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/DrywallCart.gif";
	} else if (f['product_style'].value == 'Knock-Down Drywall Carts')  {
		document.image.src = "http://trucks.handlinginnovations.com/formImages/KnockDownDrywallCart.gif";
	}
}


function updateTruckImages(images) {
        var f = document.forms['productForm'];
        var index = f['product_style'].value;
        document.image.src = images[index];
}


function updateImages(imageArray) {

  var f = document.forms['productForm'];
  var index = f['product_style'].value;
  document.image.src = imageArray[index];

}

function hideSection(divName) {
	displaySection(divName, false);	
}

function showSection(divName) {
	displaySection(divName, true);
}

function displaySection(divName, isVisible) {
	if (document.all) {
		if (document.all['divName']) {
			document.all['divName'].style.visibility = (isVisible ? 'visible' : 'hidden');
			document.all['divName'].style.height = (isVisible ? 'auto' : 0);
		}
	}
}

function openPopup(url, windowName, x, y, width, height, options) {
	win=window.open(url, windowName, 'width=' + width + ', height=' + height + ', ' + options);
	win.moveTo(x, y);
	win.focus();
	return true;
}

function sendFormToPopup(formName, windowName, x, y, width, height, options) {
	win=window.open('', windowName, 'width=' + width + ', height=' + height + ', ' + options);
	win.moveTo(x, y);
	document.forms[formName].target = windowName;
	document.forms[formName].submit();
	win.focus();
	return true;
}

function sendImageToPopup(imageName, windowName, x, y, width, height, options) {
	win=window.open('', windowName, 'width=' + width + ', height=' + height + ', ' + options);
	win.moveTo(x, y);
	document.images[imageName].target = windowName;
	//document.iamges[imageName].submit();
	win.focus();
	return true;
}

function checkQuoteForm() {
	var f = document.forms['productForm'];
	var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
  	var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;


	var theName = f['JobContact_firstName'].value;
	var theCompany = f['JobContact_companyName'].value;
	var thePhone = f['JobContact_phone'].value;
	var theEmail = f['JobContact_email'].value;
	var theLease = f['Job_lease'].value;
	var theYears = f['Job_yearsInBusiness'].value;

	if (theName == '' || theCompany == '' || thePhone == '' || theEmail == '') {
		alert('One or more of the following information is missing:\n  - Name\n  - Company Name\n  - Phone Number (in case we have questions)\n  - Email Address (where we can send your quote)\n\nWe DO NOT sell contact information. For more, see our privacy policy.');
		return false;
	}

	 if (!reg1.test(theEmail) && reg2.test(theEmail)) {
		return true;
	}
    
  		alert("\"" + theEmail + "\" is an invalid e-mail address. Please verify and re-enter.");
  		f['JobContact_email'].focus();
  		f['JobContact_email'].select();
  		return false;

	if ( theLease == 'Yes' && theYears == 'select') {
				alert('Please select number of years in business');
				return false;		
	}
		

			
}


function checkCallInForm() {
	var f = document.forms.callIn;

	var product = f['Job_productCat'].value;
	var salesperson = f['Job_sp'].value;
	
	if (product == '- Please Select -' || salesperson == '- Please Select -') {
		alert('Either the Entered By or the Product Category has not been selected.');
		return false;
	}

	return true;
}

function checkCustRequestForm() {
	var f = document.forms.custRequest;

	var product = f['Job_productCat'].value;
	var email = f['JobContact_email'].value;
	var fName = f['JobContact_firstName'].value;
	var reason = f['Job_note'].value;

	if (fName == '') {
		alert('Please enter your first name.');
		return false;
	}

	if (email == '') {
		alert('Please enter a valid email address so we can respond to your request.');
		return false;
	}
		
	if (product == '- Please Select -') {
		alert('Please select a Product Category most closely associated with your request.');
		return false;
	}
	
	if (reason == '') {
		alert('Please enter your request in the Reason for Contact area');
		return false;
	}

	return true;
}



function checkContactForm() {
	var f = document.forms['contactForm'];

	var theName = f['ContactRequest_name'].value;
	var theCompany = f['ContactRequest_companyName'].value;
	var theInfo = f['ContactRequest_contactInfo'].value;

	if (theName == '' || theCompany == '' || theInfo == '') {
		alert('Please enter at least your name, company name, and phone number.');
		return false;
	}
	
	return true;
}

function showFormElement()  {

	var f = document.forms['callIn'];
	

	if (f['Job_leadSource'].selectedIndex == 3)  {
		f['Job_sourceName'].style.visibility = "visible";
		
	} else { 
		f['Job_sourceName'].style.visibility = "hidden";
	}
}


function showElement(e, dd, ff)  {

	var f = document.forms['productForm'];

	if (f['product_style'].selectedIndex == 1)  {
		f['product_options'].style.visibility = "visible";
		f['product_accessories'].style.visibility = "visible";
		f['product_deck'].style.visibility = "visible";
		f['product_access'].style.visibility = "visible";

		//update(e, ff);
		//update(e, dd);

	} else {
		f['product_options'].style.visibility = "Hidden";
		f['product_accessories'].style.visibility = "Hidden";
		f['product_deck'].style.visibility = "Hidden";
		f['product_access'].style.visibility = "Hidden";

	}
}


function showFormText()  {

	var f = document.forms['productForm'];
	

	if (f['product_dimensions'].selectedIndex == 3)  {
		f['product_custom'].style.visibility = "visible";
		
	} else { 
		f['product_custom'].style.visibility = "hidden";
	}
}



		
function showTableOptions()  {
	var f = document.forms['productForm'];

	if (f['product_type'].value == 'Countertop')  {
		f['product_faucet'].disabled=false;
		f['product_undershelf'].disabled=true;
		f['product_backsplash'].disabled=true;
		f['product_bowlLoc'].disabled=true;
		
	} else if (f['product_type'].value == 'Marine')  {
		f['product_faucet'].disabled=false;
		f['product_undershelf'].disabled=true;
		f['product_backsplash'].disabled=true;
		f['product_bowlLoc'].disabled=false;
				
	} else if (f['product_type'].value == 'Cutting')  { 
		f['product_faucet'].disabled=true;
		f['product_undershelf'].disabled=false;
		f['product_backsplash'].disabled=false;
		f['product_bowlLoc'].disabled=true;
		
	} else {
		f['product_faucet'].disabled=true;
		f['product_undershelf'].disabled=true;
		f['product_backsplash'].disabled=true;
		f['product_bowlLoc'].disabled=true;

	}												
}

function showDishTableOptions()  {
	var f = document.forms['productForm'];

	if (f['product_function'].value == 'Sorting') {
		f['product_raisededge'].disabled=false;
		f['product_rackshelf'].disabled=true;
		f['product_backsplash'].disabled=false;
		f['product_scrapblock'].disabled=true;
		f['product_scrapbasket'].disabled=true;
		f['product_casters'].disabled=false;
		
	} else if (f['product_function'].value == 'Undercounter')  {
		f['product_raisededge'].disabled=true;
		f['product_rackshelf'].disabled=false;
		f['product_backsplash'].disabled=true;
		f['product_scrapblock'].disabled=false;
		f['product_scrapbasket'].disabled=false;
		f['product_scrapbasket'].disabled=true;
		f['product_casters'].disabled=true;
				
	} else {
		f['product_raisededge'].disabled=true;
		f['product_rackshelf'].disabled=true;
		f['product_backsplash'].disabled=true;
		f['product_scrapblock'].disabled=true;
		f['product_scrapbasket'].disabled=true;
		f['product_casters'].disabled=true;
	}												
}

function showBeverageCounterOptions()  {
	var f = document.forms['productForm'];

	if (f['product_material'].value == '14ga') {
		f['product_urntroughs'].disabled=false;
		f['product_rackslides'].disabled=true;
		f['product_fillerstation'].disabled=true;
		f['product_receptacle'].disabled=true;
				
	} else if (f['product_material'].value == '16ga')  {
		f['product_urntroughs'].disabled=false;
		f['product_rackslides'].disabled=false;
		f['product_fillerstation'].disabled=false;
		f['product_receptacle'].disabled=false;				
	} else {
		f['product_urntroughs'].disabled=true;
		f['product_rackslides'].disabled=true;
		f['product_fillerstation'].disabled=true;
		f['product_receptacle'].disabled=true;
	}												
}

function showPanRackOptions()  {
	var f = document.forms['productForm'];

	if (f['product_type'].value == 'Half Size') {
		f['product_tops'].disabled=false;					
	} else {
		f['product_tops'].disabled=true;		
	}												
}


function showSSPanRackOptions()  {
	var f = document.forms['productForm'];

	if (f['product_height'].value == '38"') {
		f['product_tops'].disabled=false;					
	} else {
		f['product_tops'].disabled=true;		
	}												
}



function showEquipmentTableOptions()  {
	var f = document.forms['productForm'];

	if (f['product_MTmaterial'].selectedIndex == 1) {
		f['product_drawer'].disabled=true;
				
	} else if (f['product_MTmaterial'].selectedIndex == 2)  {
		f['product_drawer'].disabled=false;

	} else if (f['product_MTmaterial'].selectedIndex == 3)  {
		f['product_drawer'].disabled=false;
				
	} else {

		f['product_drawer'].disabled=true;
	}												
}

function showDrainboardDim()  {
	var f = document.forms['productForm'];

	if (f['product_drainboard'].value != 'None') {

		f['product_drainboardSize'].disabled=false;

	} else if (f['product_drainboard'].value == 'None')  {

		f['product_drainboardSize'].disabled=true;
	}												
}

function showElectricFryerOptions()  {
	var f = document.forms['productForm'];

	if (f['product_oilCap'].value == '20_25_lbs') {
		f['product_filtration'].disabled=false;	
		f['product_computer'].disabled=false;
		f['product_control'].disabled=false;
		f['product_lift'].disabled=false;
		f['product_casters'].disabled=false;
				
	} else if (f['product_oilCap'].value == '35_40_lbs') {
		f['product_filtration'].disabled=false;	
		f['product_computer'].disabled=false;
		f['product_control'].disabled=false;
		f['product_lift'].disabled=false;
		f['product_casters'].disabled=false;

	} else if (f['product_oilCap'].value == '70_90_lbs') {
		f['product_filtration'].disabled=false;	
		f['product_computer'].disabled=false;
		f['product_control'].disabled=false;
		f['product_lift'].disabled=false;
		f['product_casters'].disabled=false;
			
	} else {
		f['product_filtration'].disabled=false;	
		f['product_computer'].disabled=true;
		f['product_control'].disabled=true;
		f['product_lift'].disabled=true;
		f['product_casters'].disabled=false;
	}												
}


function showBroilerOvenOptions()  {
	var f = document.forms['productForm'];

	if (f['product_type'].value == 'Infrared_free-standing_w/single_deck_w/warming_oven') { 
		
			f['product_manifold'].disabled=true;	
			f['product_depth'].disabled=true;
			f['product_battery'].disabled=true;
			f['product_power'].disabled=true;

		} else if (f['product_type'].value == 'Infrared_free-standing_w/single_deck')  {
	
			f['product_manifold'].disabled=true;	
			f['product_depth'].disabled=true;
			f['product_battery'].disabled=true;
			f['product_power'].disabled=true;

		} else if (f['product_type'].value == 'Infrared_free-standing_w/double_deck')  {
	
			f['product_manifold'].disabled=true;	
			f['product_depth'].disabled=true;
			f['product_battery'].disabled=true;
			f['product_power'].disabled=true; 			
		} else {

			f['product_manifold'].disabled=false;	
			f['product_depth'].disabled=false;
			f['product_battery'].disabled=false;
			f['product_power'].disabled=false;
	}
}

function enableYears(ans)  {
	var f = document.forms['productForm'];

	if (ans == 'Yes') {
		f['Job_yearsInBusiness'].disabled=false;					
	} else {
		f['Job_yearsInBusiness'].disabled=true;		
	}												
}

function checkYearsInBusiness()  {

	var f = document.forms['productForm'];
	var noOfYears = f['Job_yearsInBusiness'];

	if (noOfYears.disabled=false)	{
		if (noOfYears.value == '-Please Seledt-') {
			alert('Please indicate No of Years in Business so we can provide a lease quote.');
		}
	}
}
		

function calcNoOpenings()  {

	var f = document.forms['productForm'];
	
	var notSure = parseInt(f['product_noNotSure'].value);
	var notSureTiers = parseInt(f['product_noNotSureTiers'].value);	
	var single = parseInt(f['product_noSingleTier'].value);
	var double = parseInt(f['product_noDoubleTier'].value);
	var triple = parseInt(f['product_noTripleTier'].value);
	var six = parseInt(f['product_noSixTier'].value);

	var totalOpenings = ((notSure * notSureTiers) + single + (double * 2) + (triple * 3) + (six * 6));
	f['product_openings'].value = totalOpenings;
	
}	

function showDrawerWarmerOptions()  {
	var f = document.forms['productForm'];

	if (f['product_model'].value == 'Free-Standing - Standard' || f['product_model'].value == 'Built-In - Standard') {
		f['product_pandrawer'].disabled=false;	
		f['product_frame'].disabled=false;	
		f['product_guard'].disabled=false;		
	} else {
		f['product_pandrawer'].disabled=true;	
		f['product_frame'].disabled=true;	
		f['product_guard'].disabled=true;
	}
}

function showHeatedStoneShelfOptions()  {
	var f = document.forms['productForm'];

	if (f['product_model'].value == 'Round') {
		f['product_lamp'].disabled=false;			
	} else {
		f['product_lamp'].disabled=true;	
	}
}	


function selectImage(group, selectedImage, displayValue) {
					document.forms.productForm.product_tierFrames[0].value = selectedImage;
					document.all.tierFrameDisplay[0].innerHTML = displayValue;
					for (x = 0; x < document.images.length; x++) {
						i = document.images[x];
						
						if (i.name) {
							if (i.name.substr(0, (group.length)) == group) {
								if (i.name == group + '_' + selectedImage) {
									i.style.border = '4px solid #fff063';
								} else {
									i.style.border = '4px solid #ffffff';
								}
							}
						}
					}
				}

function update(e, dd)
{
	for (j=1; j < dd.length; j++)
	{
		dd[j][0] = true;
	}

	for (j=1; j < dd[0].length; j++)
	{
		for (i=1; i < dd.length; i++)
		{
			current = dd[i][j].split("|");
			value = current[0];
			choice = current[0];
			if (current.length == 2) choice = current[1];
			if (value != document[dd[0][0]][dd[0][j]][document[dd[0][0]][dd[0][j]].selectedIndex].value) dd[i][0] = false;
		}
		if (e == document[dd[0][0]][dd[0][j]])
		{
			dropdown(j+1,dd);
			for (k=j+2; k < dd[0].length; k++)
			{
				document[dd[0][0]][dd[0][k]].length = 0;
			}
			break;
		}
	}
}

function dropdown(item,dd)
{
	var pre1 = "";
	var j = 1;
	document[dd[0][0]][dd[0][item]].options.length = 0;
	document[dd[0][0]][dd[0][item]].options[0] = new Option('-Please select-', '');//('Select ' + dd[0][item], '');
	document[dd[0][0]][dd[0][item]].options[0].selected = true;
	for (i=1; i < dd.length; i++)
	{
		if (dd[i][0] || item == 1)
		{
			current = dd[i][item].split("|");
			value = current[0];
			choice = current[0];
			if (current.length == 2) choice = current[1];
			if (value != pre1)
			{
				var op = new Option(choice, value);
				document[dd[0][0]][dd[0][item]].options[j] = op;
				j++;
				pre1 = value;
			}
		}
	}
}


var zoomfactor=0.05 //Enter factor (0.05=5%)

function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}

function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document.images."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==""||state=="restore"){
whatcache.style.width=originalW
whatcache.style.height=originalH
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}

function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}

function submitMe(){ 
  document.forms["sideform"].nospam.value = "yes";
  return true;
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function highlightWord(node, word, colorindex) {
	// Iterate into this node's childNodes
	if (node.hasChildNodes) {
		var hi_cn;
		for (hi_cn = 0; hi_cn < node.childNodes.length; hi_cn++) {
			highlightWord(node.childNodes[hi_cn], word, colorindex);
		}
	}

	// And do this node itself
	if (node.nodeType == 3) { // text node
		tempNodeVal = node.nodeValue.toLowerCase();
		tempWordVal = word.toLowerCase();
		if (tempNodeVal.indexOf(tempWordVal) != -1) {
			pn = node.parentNode;
			if (pn.className.indexOf('searchword') != 0) {
				// word has not already been highlighted!
				nv = node.nodeValue;
				ni = tempNodeVal.indexOf(tempWordVal);
				// Create a load of replacement nodes
				before = document.createTextNode(nv.substr(0,ni));
				docWordVal = nv.substr(ni,word.length);
				after = document.createTextNode(nv.substr(ni+word.length));
				hiwordtext = document.createTextNode(docWordVal);
				hiword = document.createElement("span");
				hiword.className = "searchword"+colorindex;
				hiword.appendChild(hiwordtext);
				pn.insertBefore(before,node);
				pn.insertBefore(hiword,node);
				pn.insertBefore(after,node);
				pn.removeChild(node);
			}
		}
	}
}

function welcomeSearch(words) {
	si = document.getElementById("searchwelcome");
	si.className = "searchwelcome";
	p = document.createElement("p");
	si.appendChild(p);
	text = "Welcome.  You seem to have come here from a search engine. "
	if (words.length == 1) {
		text += "Your search word (" + words[0] + ") is highlighted on this page.";
	}
	else {
		text += "Your search words (" + words.join(' ') + ") are highlighted on this page.";
	}
	p.appendChild(document.createTextNode(text));
}

function filterArray(a, fnc) {
    var b = new Array();
    for (var i = 0; i < a.length; i++) {
        if (fnc(a[i])) {
            b.push(a[i]);
        }
    }
    return b;
}

function highlightSearch() {
	if (!document.createElement) {
		return;
	}
	ref = document.referrer;
	if (ref.indexOf('?') == -1) {
		// No query in referrer.  For local testing, try for query in location.
		ref = ""+document.location;
		if (ref.indexOf('?highlight') == -1) {
			return;
		}
	}
	qs = ref.substr(ref.indexOf('?')+1);
	qsa = qs.split('&');
	for (i = 0; i < qsa.length; i++) {
		qsip = qsa[i].split('=');
		if (qsip.length == 1) {
			continue;
		}
		// q= for Google, p= for Yahoo, qt= for LookSmart
		if (qsip[0].match(/\b(query|q|p|qt)\b/)) {
			words = unescape(qsip[1].replace(/\+/g,' ')).split(/\s+/);
			words = filterArray(words, function (w) { return w != "";});
			if (words.length == 0) {
				continue;
			}
			// Put a welcome message into the .searchwelcome div.
			welcomeSearch(words);
			// Highlight the words themselves.
			for (w = 0; w < words.length; w++) {
				highlightWord(document.getElementsByTagName("body")[0], words[w], w % 3);
			}
			// We've highlighted the search terms, no need to look further.
			break;
		}
	}
}

function initsidebarmenu(){
var menuids=["sidebarmenu1"]
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className+=" subfolderstyle"
  if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
   ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
  else //else if this is a sub level submenu (ul)
    ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
  for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
  ultags[t].style.visibility="visible"
  ultags[t].style.display="none"
  }
  }
}





