function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)if(d[b].indexOf("#")!=0){a.MM_p[c]=new Image;a.MM_p[c++].src=d[b]}}} function MM_findObj(a,b){var c,d;b||(b=document);if((c=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(c+1)].document;a=a.substring(0,c)}if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);if(!d&&b.getElementById)d=b.getElementById(a);return d} function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if((c=MM_findObj(d[a]))!=null){document.MM_sr[b++]=c;if(!c.oSrc)c.oSrc=c.src;c.src=d[a+2]}}function editCountryJS(a){opener=window.open(a,"myWindow","status = 1,left=700, top=250, height = 300, width = 300, resizable = 0")} function checkAllProduct(a){chkId=document.getElementById("chkSelectAll");for(i=0;i<a;i++)if(chkId.checked)document.getElementById("chkProduct"+i).checked=true;else document.getElementById("chkProduct"+i).checked=false}function PopUpEditWindow(){opener=window.open("editTaxClass.php?taxClassId="+PopUpEditWindow.arguments[0],"myWindow","status = 1,left=700, top=250, height = 300, width = 300, resizable = 0")} function editTaxZoneJS(a){opener=window.open(a,"myWindow","status = 1,left=700, top=250, height = 300, width = 300, resizable = 0")}function postCountryJS(){document.formSelectCountry.submit()}function changeFormAction(){document.getElementById("manufacturerPage").action=changeFormAction.arguments[0]} makeTreeLastNode=function(){if(document.getElementById("tree")!=null){for(var a=document.getElementById("tree"),b=[a],c=0;c<a.getElementsByTagName("ul").length;c++)b[b.length]=a.getElementsByTagName("ul")[c];for(c=0;c<b.length;c++){for(a=b[c].lastChild;!a.tagName||a.tagName.toLowerCase()!="li";)a=a.previousSibling;a.className+=" last"}}}; makeTreeLastNodeSC=function(){if(document.getElementById("tree_s")!=null){for(var a=document.getElementById("tree_s"),b=[a],c=0;c<a.getElementsByTagName("ul").length;c++)b[b.length]=a.getElementsByTagName("ul")[c];for(c=0;c<b.length;c++){for(a=b[c].lastChild;!a.tagName||a.tagName.toLowerCase()!="li";)a=a.previousSibling;a.className+=" last"}}}; function hidediv(){if(document.getElementById("tree_view")){document.getElementById("tree_view").style.visibility="hidden";document.getElementById("search_input").disabled=false}}function show(){if(document.getElementById("tree_view")){document.getElementById("tree_view").style.visibility="visible";document.getElementById("search_input").disabled=true}} function hidediv1(){if(document.getElementById("tree_view")){document.getElementById("tree_view").style.visibility="hidden";document.getElementById("cat_parentname").disabled=false}}function show1(){if(document.getElementById("tree_view")){document.getElementById("tree_view").style.visibility="visible";document.getElementById("cat_parentname").disabled=true}} function hideDivSecCat(){if(document.getElementById("sec_cat_tree_view")){document.getElementById("sec_cat_tree_view").style.visibility="hidden";document.getElementById("secCatID").disabled=false}} function showSecCat(){if(document.getElementById("sec_cat_tree_view")){document.getElementById("sec_cat_tree_view").style.visibility="visible";if(document.getElementById("cat_tree_view"))document.getElementById("cat_tree_view").style.visibility="hidden";document.getElementById("secCatID").disabled=true;if(document.getElementById("CatID"))document.getElementById("CatID").disabled=false}} function loadCategoryPickerForSecCat(){var a=document.getElementsByClassName("m_active_s");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black";a[z].onclick=function(){document.getElementById("secCatID").value=this.getAttribute("title");document.getElementById("scid").value=this.getAttribute("code");document.getElementById("sec_cat_tree_view").style.visibility="hidden";document.getElementById("secCatID").disabled=false}}} function hideDivPromotion(){if(document.getElementById("sec_cat_tree_view")){document.getElementById("sec_cat_tree_view").style.visibility="hidden";document.getElementById("txtCategory").disabled=false}}function showPromotion(){if(document.getElementById("sec_cat_tree_view")){document.getElementById("sec_cat_tree_view").style.visibility="visible";document.getElementById("txtCategory").disabled=true}} function loadCategoryPickerForPromotion(){var a=document.getElementsByClassName("m_active_s");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black";a[z].onclick=function(){document.getElementById("txtCategory").value=this.getAttribute("title");document.getElementById("scid").value=this.getAttribute("code");document.getElementById("sec_cat_tree_view").style.visibility="hidden";document.getElementById("txtCategory").disabled=false}}} function hideDivCat(){if(document.getElementById("cat_tree_view")){document.getElementById("cat_tree_view").style.visibility="hidden";document.getElementById("CatID").disabled=false}} function showCat(){if(document.getElementById("cat_tree_view")){document.getElementById("cat_tree_view").style.visibility="visible";if(document.getElementById("sec_cat_tree_view"))document.getElementById("sec_cat_tree_view").style.visibility="hidden";document.getElementById("CatID").disabled=true;if(document.getElementById("secCatID"))document.getElementById("secCatID").disabled=false}} function loadCategoryPickerForCat(){var a=document.getElementsByClassName("m_active");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black";a[z].onclick=function(){document.getElementById("CatID").value=this.getAttribute("title");document.getElementById("cid").value=this.getAttribute("code");document.getElementById("cat_tree_view").style.visibility="hidden";document.getElementById("CatID").disabled=false}}} function loadCategoryPickerForCatCHK(){var a=document.getElementsByClassName("m_active");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black"}}function sele(){document.getElementById("search_input").value=document.getElementById(sele.arguments[0]).firstChild.data;document.getElementById("tree_view").style.visibility="hidden"}function changeFormsAction(a,b){document.getElementById(a).action=b} function validate(){var a=document.getElementById("listProducts2").elements.length;for(i=0;i<a;i++)if(document.getElementById("listProducts2").elements[i].type=="checkbox")if(document.getElementById("listProducts2").elements[i].checked==true&&document.getElementById("listProducts2").elements[i].id!="chkSelectAll")return true;alert("Please select a product");return false} function loadCategoryPicker(){var a=document.getElementsByClassName("m_active");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black";a[z].onclick=function(){document.getElementById("search_input").value=this.getAttribute("title");document.getElementById("scid").value=this.getAttribute("code");document.getElementById("tree_view").style.visibility="hidden";document.getElementById("search_input").disabled=false}}} document.getElementsByClassName=function(a){var b=[];a=RegExp("\\b"+a+"\\b");for(var c=this.getElementsByTagName("*"),d=0;d<c.length;d++)a.test(c[d].className)&&b.push(c[d]);return b}; function loadCategoryPickerForCategory(){var a=document.getElementsByClassName("m_active");for(z=0;z<a.length;z++){a[z].style.cursor="pointer";a[z].style.color="black";a[z].onclick=function(){document.getElementById("cat_parentname").value=this.getAttribute("title");document.getElementById("cat_parent").value=this.getAttribute("code");document.getElementById("tree_view").style.visibility="hidden";document.getElementById("cat_parentname").disabled=false}}} function addEvent(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return true}else return a.attachEvent?a.attachEvent("on"+b,c):false}addEvent(window,"load",stuHover);var manufacture_fields={manufacturer_name:{l:"Manufacturer Name",r:true}};o_config={to_disable:["Submit","Reset"],alert:1}; var listProductsSC_fields={search_input:{l:"Category",r:true}},addShoppingCart_fields={qty:{l:"Quantity",r:true,f:"integer"}},addProducts_fields={txtProductName:{l:"Product Name",r:true},CatID:{l:"Category",r:true},txtMaxOrderQty:{l:"Maximum Order",f:"integer"},txtMinOrderQty:{l:"Minimum Order",f:"integer"},txtQtyOnHand:{l:"Quantity on hand ",f:"integer"},txtRetailPrice:{l:"Retail Price",f:"integer"}},productList_fields={CatID:{l:"Primary Category",r:true}},secproductList_fields={secCatID:{l:"Secondary Category", r:true}},productSearch_fields={txtProductFrom:{l:"Price Range From",f:"integer"},txtProductTo:{l:"Price Range To",f:"integer"}},addBillingInfo_fields={txtName:{l:"Name",r:true,t:"lblName",c:"#817153"},txtAddr1:{l:"Address Line 1",r:true,t:"lblAddr1",c:"#817153"},txtCity:{l:"City",r:true,t:"lblCity",c:"#817153"},txtState:{l:"State",r:true,t:"lblState",c:"#817153"},lstCountry:{l:"Country",r:true,t:"lblCountry",c:"#817153"},txtZip:{l:"ZipCode",r:true,t:"lblPostalCode",c:"#817153"}},a_fields={cusEmailID:{l:"UserName", r:true,f:"email",t:"sp_usr",c:"#817153"},cusPassword:{l:"Password",r:true,t:"sp_pwd",c:"#817153"}},contact_fields={cusLastName:{l:"Last Name",r:true,t:"sp_cusLastName",c:"#7B9BB2"},cusFirstName:{l:"First Name",r:true,t:"sp_cusFirstName",c:"#7B9BB2"},adrAddressLine1:{l:"Address Line 1",r:true,t:"sp_adrAddressLine1",c:"#7B9BB2"},adrCity:{l:"City",r:true,t:"sp_adrCity",c:"#7B9BB2"},adrState:{l:"State",r:true,t:"sp_adrState",c:"#7B9BB2"},adrPostalCode:{l:"Zipcode",r:true,t:"sp_adrPostalCode",c:"#7B9BB2"}, cusTelephone:{l:"Phone",r:true,t:"sp_cusTelephone",c:"#7B9BB2"}},promotion_fields={txtSaleName:{l:"Sale Name",r:true},txtDateFrom:{l:"Date From",r:true},txtDateTo:{l:"Date To",r:true},txtCategory:{l:"Category",r:true},txtDiscount:{l:"Discount",r:true,f:"integer"}},password_fields={cusPassword:{l:"New Password",r:true,t:"sp_cusPassword",c:"#817153"},confirmPassword:{l:"Confirm password",r:true,m:"cusPassword",t:"sp_confirmPassword",c:"#817153"}},contactUs_fields={txtName:{l:"Name",r:true,t:"spName", c:"#817153"},txtEmail:{l:"Email",r:true,f:"email",t:"spEmail",c:"#817153"},txtMessage:{l:"Message",r:true,t:"spMsg",c:"#817153"},txtVerificationCode:{l:"Verification Code",r:true,t:"spVerificationCode",c:"#817153"}};o_config={to_disable:["Submit","Reset"],alert:1}; var passwordValidator=new validator("passwordForm",password_fields,o_config),contactValidator=new validator("contactForm",contact_fields,o_config),manufacturerValidator=new validator("manufacturerPage",manufacture_fields,o_config),listProductsSCValidator=new validator("listProducts",listProductsSC_fields,o_config),addShoppingCartValidator=new validator("m_submit",addShoppingCart_fields,o_config),productAddValidator=new validator("frmProductAdd",addProducts_fields,o_config),productListValidator=new validator("formProductList", productList_fields,o_config),productListSCValidator=new validator("formProductList",secproductList_fields,o_config),priceRangeValidator=new validator("formProductSearch",productSearch_fields,o_config),addBillingInfoValidator=new validator("frmPaypal",addBillingInfo_fields,o_config),loginValidator=new validator("loginpage",a_fields,o_config),saleMakerValidator=new validator("formSaleMaker",promotion_fields,o_config),contactUsValidator=new validator("contactfrm",contactUs_fields,o_config),re_dt=/^(\d{1,2})\-(\d{1,2})\-(\d{4})$/, re_tm=/^(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/,a_formats={alpha:/^[a-zA-Z\.\-]*$/,alphanum:/^\w+$/,unsigned:/^\d+$/,integer:/^[\+\-]?\d*$/,real:/^[\+\-]?\d*\.?\d*$/,email:/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/,phone:/^[\d\.\s\-]+$/,date:function(a){if(!re_dt.test(a))return false;if(RegExp.$1>31||RegExp.$2>12)return false;if((new Date(RegExp.$3,Number(RegExp.$2-1),RegExp.$1)).getMonth()!=Number(RegExp.$2-1))return false;return true},time:function(a){if(!re_tm.test(a))return false;if(RegExp.$1>23||RegExp.$2> 59||RegExp.$3>59)return false;return true}},a_messages=["No form name passed to validator construction routine",'No array of "%form%" form fields passed to validator construction routine','Form "%form%" can not be found in this document','Incomplete "%n%" form field descriptor entry. "l" attribute is missing','Can not find form field "%n%" in the form "%form%"','Can not find label tag (id="%t%")','Can not verify match. Field "%m%" was not found','"%l%" is a required field','Value for "%l%" must be %mn% characters or more', 'Value for "%l%" must be no longer than %mx% characters','"%v%" is not valid value for "%l%"','"%l%" must match "%ml%"'];function validator(a,b,c){this.f_error=validator_error;this.f_alert=c&&c.alert?function(d){alert(d);return false}:function(){return false};if(!a)return this.f_alert(this.f_error(0));this.s_form=a;if(!b||typeof b!="object")return this.f_alert(this.f_error(1));this.a_fields=b;this.a_2disable=c&&c.to_disable&&typeof c.to_disable=="object"?c.to_disable:[];this.exec=validator_exec} function validator_exec(){var a=document.forms[this.s_form];if(!a)return this.f_alert(this.f_error(2));b_dom=document.body&&document.body.innerHTML;for(var b in this.a_fields){this.a_fields[b].n=b;if(!this.a_fields[b].l)return this.f_alert(this.f_error(3,this.a_fields[b]));o_input=a.elements[b];if(!o_input)return this.f_alert(this.f_error(4,this.a_fields[b]));this.a_fields[b].o_input=o_input}if(b_dom)for(b in this.a_fields)if(this.a_fields[b].t){var c=get_element(this.a_fields[b].t),d="black";if(this.a_fields[b].c)d= this.a_fields[b].c;if(!c)return this.f_alert(this.f_error(5,this.a_fields[b]));this.a_fields[b].o_tag=c;this.a_fields[b].o_tag.style.color=d}for(b in this.a_fields){c="";o_input=this.a_fields[b].o_input;if(o_input.type=="checkbox")c=o_input.checked?o_input.value:"";else if(o_input.value)c=o_input.value;else if(o_input.options)c=o_input.selectedIndex>-1?o_input.options[o_input.selectedIndex].value:null;else if(o_input.length>0)for(d=0;d<o_input.length;d++)if(o_input[d].checked){c=o_input[d].value; break}this.a_fields[b].v=c.replace(/(^\s+)|(\s+$)/g,"")}c=0;var e;for(b in this.a_fields){d=this.a_fields[b].f&&a_formats[this.a_fields[b].f]?a_formats[this.a_fields[b].f]:null;this.a_fields[b].n_error=null;if(this.a_fields[b].r&&!this.a_fields[b].v){this.a_fields[b].n_error=1;c++}else if(this.a_fields[b].mn&&String(this.a_fields[b].v).length<this.a_fields[b].mn){this.a_fields[b].n_error=2;c++}else if(this.a_fields[b].mx&&String(this.a_fields[b].v).length>this.a_fields[b].mx){this.a_fields[b].n_error= 3;c++}else if(this.a_fields[b].v&&this.a_fields[b].f&&(typeof d=="function"&&!d(this.a_fields[b].v)||typeof d!="function"&&!d.test(this.a_fields[b].v))){this.a_fields[b].n_error=4;c++}else if(this.a_fields[b].m){for(var f in this.a_fields)if(f==this.a_fields[b].m){e=f;break}if(e==null)return this.f_alert(this.f_error(6,this.a_fields[b]));if(this.a_fields[e].v!=this.a_fields[b].v){this.a_fields[b].ml=this.a_fields[e].l;this.a_fields[b].n_error=5;c++}}}e="";var g;if(c){for(b in this.a_fields){f=this.a_fields[b].n_error; c="";if(f)c=this.f_error(f+6,this.a_fields[b]);if(c){g||(g=a.elements[b]);e+=c+"\n";if(b_dom&&this.a_fields[b].o_tag)this.a_fields[b].o_tag.style.color="red"}}alert(e);g.focus&&g.type!="hidden"&&!g.disabled&&eval("e_first_error.focus()");return false}for(b in this.a_2disable)if(a.elements[this.a_2disable[b]])a.elements[this.a_2disable[b]].disabled=true;return true} function validator_error(a){for(var b=a_messages[a],c=1,d;c<arguments.length;c++)for(d in arguments[c])b=b.replace("%"+d+"%",arguments[c][d]);return b=b.replace("%form%",this.s_form)}function get_element(a){return document.all?document.all[a]:document.getElementById?document.getElementById(a):null}ReturnFunc=""; function Calendar(a,b,c,d,e){MonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];oDate=new Date;Year=a==null?oDate.getFullYear():a;for(Month=b==null?oDate.getMonth():b-1;Month<0;){Month+=12;Year--}for(;Month>=12;){Month-=12;Year++}Day=c==null?0:c;oDate=new Date(Year,Month,1);NextMonth=new Date(Year,Month+1,1);WeekStart=oDate.getDay();MonthDays=Math.round((NextMonth.getTime()-oDate.getTime())/864E5)+1;if(d!=null)(Container=document.getElementById(d))||document.write('<div id="'+ d+'">&nbsp;</div>');else{do d="tblCalendar"+Math.round(Math.random()*1E3);while(document.getElementById(d));document.write('<div id="'+d+'">&nbsp;</div>')}Container=document.getElementById(d);e=e==null?"tblCalendar":e;HTML='<table class="'+e+'" cellspacing="0">';HTML+='<tr class="TitleBar"><td class="Nav"><a href="javascript:void(0)" onMouseDown="Calendar('+Year+", "+Month+", "+Day+", '"+d+"', '"+e+'\');">&laquo;</a></td><td colspan="5" class="Title">'+MonthNames[Month]+" "+Year+'</td><td class="Nav"><a href="javascript:void(0)" onMouseDown="Calendar('+ Year+", "+(Month+2)+", "+Day+", '"+d+"', '"+e+"');\">&raquo;</a></td></tr>";HTML+='<tr class="WeekName"><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>';HTML+='<tr class="Days">';for(DayCounter=0;DayCounter<WeekStart;DayCounter++)HTML+="<td>&nbsp;</td>";iDate=new Date;for(DayCounter=1;DayCounter<MonthDays;DayCounter++){if((DayCounter+WeekStart)%7==1)HTML+='<tr class="Days">';HTML+=DayCounter==Day&&b==iDate.getMonth()+1?'<td ><a href="javascript:ReturnDate('+DayCounter+ ')">'+DayCounter+"</a></td>":'<td><a href="javascript:ReturnDate('+DayCounter+')">'+DayCounter+"</a></td>";if((DayCounter+WeekStart)%7==0)HTML+="</tr>"}j=42-(MonthDays+WeekStart);for(DayCounter=0;DayCounter<=j;DayCounter++){HTML+="<td>&nbsp;</td>";if((j-DayCounter)%7==0)HTML+="</tr>"}HTML+='<tr ><td colspan="7" style="background-color:#7EAFDA;"><a href="javascript:divClose()">CLOSE</a></td></tr></table></table>';Container.innerHTML=HTML;return d}function ReturnDate(a){SetDate(a,Month+1,Year)} function MakeDate(a,b,c,d){D=new Date;Year=typeof a!="undefined"?a:D.getFullYear();Month=typeof b!="undefined"?b:D.getMonth();Day=typeof c!="undefined"?c:D.getDate();ReturnFunc=d;id=Calendar(Year,Month,Day,"cal","CalendarRed")} function SelectDate(a){posx=a.clientX;posy=a.clientY;cID=document.getElementById("txtDateAvailable");div=document.getElementById("containerDiv");div.style.position="absolute";div.style.left="630px";div.style.top="220px";div.style.display="block";a=cID.value;if(validateDate(a)){a=a.split("-");alert(a)}else{Dat=new Date;a=[Dat.getMonth()+1,Dat.getDate(),Dat.getFullYear()]}MakeDate(a[2],a[0],a[1])} function SelectDate(a,b){posx=b.clientX;posy=b.clientY;cID=document.getElementById(a);div=document.getElementById("containerDiv");div.style.position="absolute";div.style.left=posx+"px";div.style.top=posy+"px";div.style.display="block";var c=cID.value;if(validateDate(c)){c=c.split("-");alert(c)}else{Dat=new Date;c=[Dat.getMonth()+1,Dat.getDate(),Dat.getFullYear()]}MakeDate(c[2],c[0],c[1])}function SetDate(a,b,c){cID.value=c+"-"+b+"-"+a;document.getElementById("containerDiv").style.display="none"} function validateDate(a){if(/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/.test(a)){var b=a.split("/"),c=[31,28,31,30,31,30,31,31,30,31,30,31];a=parseInt(b[1],10);if(c[b[0]-1]!=null)if(a<=c[b[0]-1]&&a!=0)return true;if(parseInt(b[0],10)==2){b=parseInt(b[2]);if(a>0&&a<29)return true;else if(a==29)if(b%4==0&&b%100!=0||b%400==0)return true}}else return false;return false}function divClose(){document.getElementById("containerDiv").style.display="none"} function submitProductList(a,b,c){if(b=="C")document.forms.m_submit.category.value=c;document.forms.m_submit.searchParm.value=c;document.forms.m_submit.currentPage.value=a;document.forms.m_submit.searchFlg.value=b;document.forms.m_submit.submit()}function searchByValue(a){location.href=document.getElementsByTagName("base")[0].href+"b_listProduct/"+a+"/"+document.getElementById("searchParam").value} function m_addToCart(a,b){document.forms.m_submit.qty.value=document.getElementById("txtQty_"+b).value;var c=document.getElementById("minQty_"+b).value,d=document.getElementById("maxQty_"+b).value;if(!addShoppingCartValidator.exec()){document.getElementById("txtQty_"+b).value="";document.getElementById("txtQty_"+b).focus();return false}if(eval(document.forms.m_submit.qty.value)<=0){alert('"Quantity" must be greater than "0"');document.getElementById("txtQty_"+b).value="";document.getElementById("txtQty_"+ b).focus();return false}if(d==0)d=100;if(eval(document.forms.m_submit.qty.value)<c||eval(document.forms.m_submit.qty.value)>d){alert('"Quantity" entered must be between "'+c+'" and "'+d+'"');document.getElementById("txtQty_"+b).value="";document.getElementById("txtQty_"+b).focus();return false}if(c=document.getElementById("txtCustomize_"+b))if(c.Value!="")document.forms.m_submit.txtCustomize.value=c.value;document.forms.m_submit.productID.value=a;document.forms.m_submit.salePrice.value=document.getElementById("salePrice_"+ b).value;document.forms.m_submit.retailPrice.value=document.getElementById("retailPrice_"+b).value;document.forms.m_submit.productWeight.value=document.getElementById("productWeight_"+b).value;document.forms.m_submit.taxClassID.value=document.getElementById("taxClassID_"+b).value;document.forms.m_submit.action="b_addToCart.php";document.forms.m_submit.submit();return true} function m_removeProductJS(a,b){document.forms.m_submit.qty.value=document.getElementById("txtQty_"+b).value;document.forms.m_submit.salePrice.value=document.getElementById("finalPrice_"+b).value;document.forms.m_submit.action="removeItemFromCart.php";document.getElementById("productID").value=a;document.forms.m_submit.submit()} function continueShoppingJS(){if(empty(document.forms.frmHiddenShopCart.fromPage.value))document.forms.frmHiddenShopCart.action.value="index.php";document.forms.frmHiddenShopCart.submit()}function setHiddenFieldJS(a){pgActionID=document.getElementById("pagingAction");pgActionID.value=a;document.getElementById("m_submit").submit()} copyDataFrmContact=function(){if(document.getElementById("checkBox").checked==true){var a=0,b=document.getElementById("ordCustomerCountry").options.length;for(a=0;a<b;a++)if(document.getElementById("ordCustomerCountry").options[a].value==document.getElementById("hdeCustomerCountry").value)document.getElementById("ordCustomerCountry").options[a].selected=true;document.getElementById("ordCustomerName").value=document.getElementById("hdeCustomerName").value;document.getElementById("ordCustomerAddrLine1").value= document.getElementById("hdeCustomerAddrLine1").value;document.getElementById("ordCustomerAddrLine2").value=document.getElementById("hdeCustomerAddrLine2").value;document.getElementById("ordCustomerCity").value=document.getElementById("hdeCustomerCity").value;document.getElementById("ordCustomerState").value=document.getElementById("hdeCustomerState").value;document.getElementById("ordCustomerPostCode").value=document.getElementById("hdeCustomerPostCode").value}}; function submit(){document.getElementById("form_submitted").value="Y";document.getElementById("frmBillingInfo").submit()}function populateFieldWithValue(a,b){document.getElementById(b).value=document.getElementById(a).value} function copyContactInfo(){if(document.getElementById("chkCopyShippingInfo")!=null)if(document.getElementById("chkCopyShippingInfo").checked)document.getElementById("chkCopyShippingInfo").checked=false;if(document.getElementById("chkCopyContactInfo").checked==true){populateFieldWithValue("contact_name","txtName");populateFieldWithValue("contact_addr1","txtAddr1");populateFieldWithValue("contact_addr2","txtAddr2");populateFieldWithValue("contact_city","txtCity");populateFieldWithValue("contact_state", "txtState");populateFieldWithValue("contact_country","lstCountry");populateFieldWithValue("contact_postal_code","txtZip")}} function copyShippingInfo(){if(document.getElementById("chkCopyContactInfo")!=null)if(document.getElementById("chkCopyContactInfo").checked)document.getElementById("chkCopyContactInfo").checked=false;if(document.getElementById("chkCopyShippingInfo").checked==true){populateFieldWithValue("shipping_name","txtName");populateFieldWithValue("shipping_addr1","txtAddr1");populateFieldWithValue("shipping_addr2","txtAddr2");populateFieldWithValue("shipping_city","txtCity");populateFieldWithValue("shipping_state", "txtState");populateFieldWithValue("shipping_country","lstCountry");populateFieldWithValue("shipping_postal_code","txtZip")}}function forgotPassword(){window.open("b_forgotPassword.php","mywindow","width=300,height=300,toolbar=no,location=no,left=600,top=200,resizable=no");return false}function windowOpener(a,b,c){var d;a="http://www.fitzgeraldsstationery.com/"+a;if(typeof d!="object")d=window.open(a,b,c);else if(d.closed)d=window.open(a,b,c);else d.location.href=a;d.focus()} sfHover=function(){for(var a=document.getElementById("navg").getElementsByTagName("LI"),b=0;b<a.length;b++){a[b].onmouseover=function(){this.className+=" sfhover"};a[b].onmouseout=function(){this.className=this.className.replace(/ sfhover\b/,"")}}};window.attachEvent&&window.attachEvent("onload",sfHover);
