function quickEditContent(pageID,showTab){var loc="zca.cfm?go=zPageEdit&pageID="+pageID;if(showTab){loc=loc+"&showtab="+showTab}window.location.href=loc}function quickProductEditContent(productID){window.location.href="zca.cfm?go=zProductEdit&productID="+productID}function runAjx(tmp,args,img,func,type,async,ord){if(!func||func==""){var func="zxResults"}if(!type||type==""){var type="p"}if(!async||async==""){var async="y"}if(!ord||ord==""){var ord="n"}DWRUtil.useLoadingImage(img);if(async.toLowerCase()=="n"){DWREngine.setAsync(false)}if(ord.toLowerCase()=="y"){DWREngine.setOrdered(true)}DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"runAjx"+type,tmp,args,eval(func))}function zxResults(r){eval(r)}function evalResult(e){eval(e)}function updateStaticCatTemplates(){var args2={refreshCategories:1};runAjx("zProdCatMenuCreate.cfm",args2,"#application.AJAXLOADING#")}function zPageAction(action,pageID,parentID,data){proceed=1;if(action=="delete"){if(parentID==-5){var delMsg="Remove this page from the footer?"}else{var delMsg="Delete This Page?"}if(confirm(delMsg)){proceed=1}else{proceed=0}}if(proceed==1){DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"PageAction",pageID,parentID,action,data,zxResults)}}function zQuickPageEdit(pageID,xo,yo,t,w){try{if(!xo){xo=0}if(!yo){yo="middle"}if(!t){t=600}if(!w){w=900}this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;$("quickPageEdit").innerHTML='<div align="center" style="width:auto;height:300px;padding-top:110px;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 300px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("quickPageEditWindow");qew.style.display="block";qew.style.position="absolute";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"QuickPageEdit",pageID,bw,bh,sl,st,zxResults)}catch(e){alert("QuickPageEdit JS Error:\n\n "+e.message)}}function zQuickProductEdit(productID,xo,yo,t){if(!xo){xo=0}if(!yo){yo=0}if(!t){t=500}$("quickProductEdit").innerHTML='<div align="center" style="width:auto;height:400px;padding-top:110px;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 300px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("quickProductEditWindow");this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;qew.style.display="block";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"QuickProductEdit",productID,bw,bh,sl,st,zxResults)}function zQuickUserLogin(xo,yo,t){if(!xo){xo=0}if(!yo){yo=0}if(!t){t=500}$("quickUserLogin").innerHTML='<div align="center" style="width:auto;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: auto; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("quickUserLoginWindow");this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;qew.style.display="block";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"QuickUserLogin",bw,bh,sl,st,zxResults)}function zUserLoginVerify(login,pass,tmp,quick,buttonID,buttonClass){login=trim(login);pass=trim(pass);err="";if(login==""){err="Please enter Login"}if(pass==""){if(err!=""){err=err+"\n"}err=err+"Please enter Password"}if(err!=""){alert(err)}else{DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"verifyLogin",login,pass,tmp,quick,buttonID,buttonClass,zxResults)}}function zUserLogout(){DWRUtil.useLoadingImage("/sysimages/applications-internet.png");DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"zUserLogout",window.location.href,zResults)}function quickProductDetail(productID,template,productPage,xo,yo,t){if(!xo){xo=0}if(!yo){yo=0}if(!t){t=500}$("quickProductDetail").innerHTML='<div align="center" style="width:auto;height:300px;padding-top:110px;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 300px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("quickProductDetailWindow");this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;qew.style.display="block";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;var args={productID:productID,template:template,productPage:productPage,bw:bw,bh:bh,sl:sl,st:st};runAjx("zQuickProductDetail.cfm",args,ajaxLoading)}function shipQuoteWin(productID,xo,yo,t,w){try{if(!xo){xo=0}if(!yo){yo="middle"}if(!t){t=600}if(!w){w=900}this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;$("prodShipQuote").innerHTML='<div align="center" style="width:auto;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 200px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("prodShipQuoteWindow");qew.style.display="block";qew.style.position="absolute";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;var args={productID:productID,action:"form",bw:bw,bh:bh,sl:sl,st:st};runAjx("zproducts_ShipQuote.cfm",args,ajaxLoading)}catch(e){alert("Product Ship Quote JS Error:\n\n "+e.message)}}function shipQuote(productID,qty,zip,weight,shpsep,country){var err="";if(typeof(country)=="undefined"){country="US"}qty=trim(qty);if(qty==""){err="Please enter quantity"}else{qty=parseInt(qty);if(isNaN(qty)||qty<1){err="Please enter a valid quantity"}}if(trim(zip)==""){if(err!=""){err=err+"\n"}err=err+"Please enter zip code"}if(productID==-1){if(trim(weight)==""){if(err!=""){err=err+"\n"}err=err+"Please enter weight"}else{weight=parseInt(weight);if(isNaN(weight)||weight<1){err="Please enter a valid weight"}}}if(err!=""){alert(err)}else{var args={productID:productID,qty:qty,zip:zip,weight:weight,shpsep:shpsep,country:country,action:"quote"};$("shipQOutput").innerHTML='<div align="center" class="zFormText" style="padding-top:40px;"><img src="/sysimages/ajax-flower_f0f0f0.gif" width="16" height="16" alt="" border="0" align="absmiddle">&nbsp;Getting Quote...</div>';runAjx("zproducts_ShipQuote.cfm",args,ajaxLoading)}}function wheelFitWin(productID,customID,xo,yo,t,w){if(!xo){xo=0}if(!yo){yo="middle"}if(!t){t=600}if(!w){w=900}this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;$("wheelFit").innerHTML='<div align="center" style="width:auto;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 200px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';qew=document.getElementById("wheelFitWindow");qew.style.display="block";qew.style.position="absolute";ow=qew.offsetWidth;oh=qew.offsetHeight;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}qew.style.left=lp+"px";qew.style.top=tp+"px";qew.style.zIndex=++dragObj.zIndex;var args={productID:productID,customID:customID,bw:bw,bh:bh,sl:sl,st:st};runAjx("zproducts_wheelFit.cfm",args,ajaxLoading)}function getviewpoint(){var ie=document.all&&!window.opera;var domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000;this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;this.scroll_top=(ie)?this.standardbody.scrollTop:window.pageYOffset;this.scroll_left=(ie)?this.standardbody.scrollLeft:window.pageXOffset;this.docwidth=(ie)?this.standardbody.clientWidth:(/Safari/i.test(navigator.userAgent))?window.innerWidth:Math.min(domclientWidth,window.innerWidth-16);this.docheight=(ie)?this.standardbody.clientHeight:window.innerHeight}function zPageActionLive(action,pageID,parentID){proceed=1;if(action=="delete"){if(parentID==-5){var delMsg="Remove this page from the footer?"}else{var delMsg="Delete This Page?"}if(confirm(delMsg)){proceed=1}else{proceed=0}}if(proceed==1){DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"PageAction",pageID,parentID,action,zQuickResults)}}function zShowImage(ni,ao,referTo){if(ao==undefined){ao=0}if(referTo==undefined){referTo=0}if(ni!==undefined){this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"zSwapImage",ni,bw,bh,sl,st,ao,referTo,zImageProcess)}else{}}function zShowPImage(pID,nextSortID,productID,type){DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"zSwapPImage",pID,nextSortID,productID,type,zImageProcess)}function zLightBox(action){if(action==undefined){action="show"}zImgPopUpOverlay=document.getElementById("zImgageOverlay");if(action=="show"){this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;zImgPopUpOverlay.style.width=bw+"px";zImgPopUpOverlay.style.height="100%";zImgPopUpOverlay.style.display="block";zImgPopUpOverlay.style.top=st+"px"}else{zImgPopUpOverlay.style.display="none"}}function zLightBoxProduct(simpleImg,title,h,w,c){zImgPopUpOverlay=document.getElementById("zImgageOverlay");this.getviewpoint();bw=this.docwidth;bh=this.docheight;sl=this.scroll_left;st=this.scroll_top;zImgPopUpOverlay.style.width=bw+"px";zImgPopUpOverlay.style.height="100%";zImgPopUpOverlay.style.display="block";zImgPopUpOverlay.style.top=st+"px";zImgPopUpDetail=document.getElementById("zImagePopUpDetail");zImgPopUpDetail.style.display="block";zImgPopUp=document.getElementById("zImagePopUp");zImgPopUp.style.width=w+"px";zImgPopUp.style.height=h+"px";zImgPopUp.style.display="block";zImgPopUp=document.getElementById("zImagePopUp");ow=w;oh=h;lp=(sl+(bw-ow)/2);tp=(st+(bh-oh)/2);if(lp<0){lp=0}if(tp<0){tp=0}zImgPopUp.style.left=lp+"px";zImgPopUp.style.top=tp+"px";zImgPopUpDetail.innerHTML='<div onclick="hide(\'zImagePopUp\');hide(\'zImgageOverlay\');" style="cursor:pointer;"><div style="background:#f0f0f0;color:black;font-weight:bold;font-family:verdana,arial,helvetica;font-size:11px;padding:3px;width:100%;"><div style="padding-bottom:2px;"><img src="sysimages/emblem-unreadable_002.png" width="16" height="16" alt="" align="right"><span style="height:16px;">&nbsp;'+title+'</span></div><div align="center"><img src="/zca.cfm?go=zImage&f='+simpleImg+"&crop="+c+"&w="+w+"&h="+h+'&imagePath=images" border="0" class="imgTrans"></div></div></div>'}function getImages(){try{var images=document.getElementsByTagName("IMG");var numOfImages=images.length;for(i=0;i<numOfImages;i++){autoSwap=images[i].getAttribute("auto");fromImage=images[i].getAttribute("from");if(fromImage!==null&&autoSwap!==null){setTimeout("zShowImage("+fromImage+");",6000)}}}catch(e){alert(e.message)}}function zImageProcess(r){eval(r)}function gotoURL(dest){window.location=dest;return false}function insertAfter(newElement,targetElement){var parent=targetElement.parentNode;if(parent.lastchild==targetElement){parent.appendChild(newElement)}else{parent.insertBefore(newElement,targetElement.nextSibling)}}function hide(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,0)}txt=document.getElementById(did);txt.style.display="none"}function show(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,1)}txt=document.getElementById(did);txt.style.display="block"}function showinline(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,1)}txt=document.getElementById(did);txt.style.display=""}function showInline(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,1)}txt=document.getElementById(did);txt.style.display=""}function zhide(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,0)}txt=document.getElementById(did);txt.style.display="none"}function zshow(did,sc){if(!sc){var sc="false"}else{this.SetCookie(group,1)}txt=document.getElementById(did);txt.style.display="block"}function hideshow(group,sc){try{if(!sc){var scc="false"}else{var scc="true"}var txt=document.getElementById(group);if(txt.style.display=="none"){txt.style.display="block";if(scc=="true"){this.SetCookie(group,1)}}else{txt.style.display="none";if(scc=="true"){this.SetCookie(group,0)}}}catch(e){}}function hideshowOpNameInput(group,oldvalue){var ov=document.getElementById("opNameInput");var txt=document.getElementById(group);if(txt.style.display=="none"){txt.style.display="block";if(ov.value=="none"){ov.value=""}}else{txt.style.display="none";ov.value="none"}}function recallCookie(group){try{var x=document.cookie;var txt=document.getElementById(group);y=this.getCookie(group);if(y==1){txt.style.display="block"}else{txt.style.display="none"}}catch(e){alert("recallCookie error: "+e.message+"\n\n"+e.description)}}function SetCookie(cookieName,cookieValue,expires,path,domain,secure){if(expires==null){var cookie_date=new Date();var month=cookie_date.getMonth()+1;expires=new Date(cookie_date.getFullYear(),month,cookie_date.getDate())}document.cookie=escape(cookieName)+"="+escape(cookieValue)+(expires?"; expires="+expires.toGMTString():"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"")}function getCookie(cookieName){var results=document.cookie.match(cookieName+"=(.*?)(;|$)");if(results){return(unescape(results[1]))}else{return null}}function trim(str){return str.replace(/^\s*|\s*$/g,"")}var cX=0;var cY=0;var rX=0;var rY=0;function UpdateCursorPosition(e){cX=e.pageX;cY=e.pageY}function UpdateCursorPositionDocAll(e){cX=event.clientX;cY=event.clientY}if(document.all){document.onmousemove=UpdateCursorPositionDocAll}else{document.onmousemove=UpdateCursorPosition}function AssignPosition(d,xo,yo,height){try{if(!xo){xo=1}if(!yo){yo=-1}if(!height){height=0}if(self.pageYOffset){rX=self.pageXOffset;rY=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){rX=document.documentElement.scrollLeft;rY=document.documentElement.scrollTop}else{if(document.body){rX=document.body.scrollLeft;rY=document.body.scrollTop}}}if(document.all){cX+=rX;cY+=rY}d.style.left=(cX+xo)+"px";if(yo!="auto"){d.style.top=(cY-yo)+"px"}else{bh=document.body.clientHeight;scrolled=getScrollXY();th=cY+height-scrolled;alert(th+" = "+cY+" + "+height+" - "+scrolled+" || bh="+bh);if(th>height){alert("too low gotta move it "+th+" calcd pos:"+cY);cY=(bh-height);alert(cY)}else{alert("it fits "+th)}d.style.top=(cY)+"px"}}catch(e){alert("Error in AssignPosition: \n"+e.message)}}function AssignPositionByID(d,xo,yo){try{if(!xo){xo=1}if(!yo){yo=-1}if(self.pageYOffset){rX=self.pageXOffset;rY=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){rX=document.documentElement.scrollLeft;rY=document.documentElement.scrollTop}else{if(document.body){rX=document.body.scrollLeft;rY=document.body.scrollTop}}}if(document.all){cX+=rX;cY+=rY}var id=document.getElementById(d);id.style.left=(cX+xo)+"px";id.style.top=(cY-yo)+"px"}catch(e){alert("Error in AssignPosition: \n"+e.message)}}function ajaxSaveForm(formid,action){try{ColdFusion.Ajax.submitForm(formid,action,zxResults)}catch(e){alert("ajaxSaveForm error: "+e.message+"\n\n"+e.description)}}function Browser(){var ua,s,i;this.isIE=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="MSIE";if((i=ua.indexOf(s))>=0){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return}s="Netscape6/";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=parseFloat(ua.substr(i+s.length));return}s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return}}var browser=new Browser();var dragObj=new Object();dragObj.zIndex=0;function dragStart(event,id){var el;var x,y;if(id){dragObj.elNode=document.getElementById(id)}else{if(browser.isIE){dragObj.elNode=window.event.srcElement}if(browser.isNS){dragObj.elNode=event.target}if(dragObj.elNode.nodeType==3){dragObj.elNode=dragObj.elNode.parentNode}}if(browser.isIE){x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop}if(browser.isNS){x=event.clientX+window.scrollX;y=event.clientY+window.scrollY}dragObj.cursorStartX=x;dragObj.cursorStartY=y;dragObj.elStartLeft=parseInt(dragObj.elNode.style.left,10);dragObj.elStartTop=parseInt(dragObj.elNode.style.top,10);if(isNaN(dragObj.elStartLeft)){dragObj.elStartLeft=0}if(isNaN(dragObj.elStartTop)){dragObj.elStartTop=0}dragObj.elNode.style.zIndex=++dragObj.zIndex;if(browser.isIE){document.attachEvent("onmousemove",dragGo);document.attachEvent("onmouseup",dragStop);window.event.cancelBubble=true;window.event.returnValue=false}if(browser.isNS){document.addEventListener("mousemove",dragGo,true);document.addEventListener("mouseup",dragStop,true);event.preventDefault()}}function dragGo(event){var x,y;if(browser.isIE){x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop}if(browser.isNS){x=event.clientX+window.scrollX;y=event.clientY+window.scrollY}dragObj.elNode.style.left=(dragObj.elStartLeft+x-dragObj.cursorStartX)+"px";dragObj.elNode.style.top=(dragObj.elStartTop+y-dragObj.cursorStartY)+"px";if(browser.isIE){window.event.cancelBubble=true;window.event.returnValue=false}if(browser.isNS){event.preventDefault()}}function dragStop(event){if(browser.isIE){document.detachEvent("onmousemove",dragGo);document.detachEvent("onmouseup",dragStop)}if(browser.isNS){document.removeEventListener("mousemove",dragGo,true);document.removeEventListener("mouseup",dragStop,true)}}function refreshPage(path){if(confirm("Are you Sure?\n\nAny un-saved changes will be lost")){window.location.href=path}}function exitEdit(href){if(!href){var href="/zca.cfm?go=zAdminHome"}if(href==""||href==0){var href="/zca.cfm?go=zAdminHome"}window.location.href=href}function zResults(r){eval(r)}function setPointer(theRow,thePointerColor){if(thePointerColor==""||typeof(theRow.style)=="undefined"){return false}if(typeof(document.getElementsByTagName)!="undefined"){var theCells=theRow.getElementsByTagName("td")}else{if(typeof(theRow.cells)!="undefined"){var theCells=theRow.cells}else{return false}}var rowCellsCnt=theCells.length;for(var c=0;c<rowCellsCnt;c++){theCells[c].style.backgroundColor=thePointerColor}return true}function toggleEditOption(n,id,iid){try{count=1;while(document.getElementById(id+count)!=null){aimg=document.getElementById(iid+count);aimg.src="/sysImages/dot.gif";hide(id+count);count++}aimg=document.getElementById(iid+n);aimg.src="/sysImages/arrow-right.gif";show(id+n)}catch(e){alert(e.message)}}function refreshzPage(){alert("refresh")}function addContactName(){stid=document.getElementById("contactSendToNew");st=stid.value;stnid=document.getElementById("contactSendToNameNew");stn=stnid.value;if(st==""||stn==""){alert("You must enter both a email address and a display name")}else{DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"contactForm",st,stn,zxResults)}}function deleteContactName(id){if(confirm("Delete this Contact Option?")){DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"contactFormDelete",id,zxResults)}}function setOpPrice(selectObj,mode,pID,dspNone){if(mode==1){var newPrice=selectObj[selectObj.selectedIndex].getAttribute("dsp");if(newPrice!=""){$("pPriceAmt"+pID).innerHTML=newPrice}else{$("pPriceAmt"+pID).innerHTML=dspNone}}}function addBindListener(eName,eObj,bObj,bType,bSource,popIn,syncOnLoad){var event=eName;window[eName]=new Event();listenOnObj=document.getElementById(eObj);window[eName].addListener(listenOnObj,"bind",function(){getBinds(bObj,bType,bSource,popIn,syncOnLoad)})}function getBinds(bObj,bType,bSource,popIn,syncOnLoad){var bField=$(bObj).getAttribute("bField");var cObjs=$(bObj).getAttribute("cObjs");var cFields=$(bObj).getAttribute("cFields");var dftSel=$(bObj).getAttribute("dftSel");var nextBind=escape($(bObj).getAttribute("onChange"));nextBind=nextBind.replace(/function%20anonymous%28%29%0A%7B%0A/i,"");nextBind=nextBind.replace(/%0A%7D/gi,"");var cValues=new Array;if(trim(cObjs)!=""){var cObjsArray=cObjs.split(",");for(var i=0;i<cObjsArray.length;i++){cValues[i]=$(cObjsArray[i]).value}}var args={bObj:bObj,bType:bType,bSource:bSource,bField:bField,cValues:cValues,cFields:cFields,dftSel:dftSel,nextBind:nextBind,popIn:popIn,syncOnLoad:syncOnLoad};runAjx("zAjax_getBinds.cfm",args,ajaxLoading)}function getBoundProd(bObj,bType,bSource,oID,imgSwapMain,zim){var bField=$(bObj).getAttribute("bField");var cObjs=$(bObj).getAttribute("cObjs");if(trim(cObjs)!=""){cObjs=cObjs+","+bObj}else{cObjs=bObj}var cFields=$(bObj).getAttribute("cFields");cFields=cFields+","+bField;var cValues=new Array;if(trim(cObjs)!=""){var cObjsArray=cObjs.split(",");for(var i=0;i<cObjsArray.length;i++){cValues[i]=$(cObjsArray[i]).value}}var args={bType:bType,bSource:bSource,cValues:cValues,cFields:cFields,oID:oID,imgSwapMain:imgSwapMain,zim:zim};runAjx("zAjax_getBoundProd.cfm",args,ajaxLoading)}function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()}func()}}}addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r="readyState",c="onreadystatechange",x=function(){n=1;clearInterval(t);while(i=e.shift()){i()}if(s){s[c]=""}};return function(f){if(n){return f()}if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);
/*@cc_on@*/
/*@if(@_win32)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/
if(/WebKit/i.test(navigator.userAgent)){t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10)}o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=="number"){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft}}}return[scrOfY]}function prodDelete(productID,script){if(confirm("Are you sure you want to delete this product?")){var args={productID:productID,script:script};runAjx("zAjax_prodDelete.cfm",args,ajaxLoading)}}function showLrgDetailImg(filename,filetitle,w,h,imageID,to,from,rs){if(!h){h=""}if(!w){w=""}mainImg=document.getElementById("prodMainImg");if(rs=="lightbox"){js=' id="zImage'+from+'" onclick="javascript:zShowImage( '+from+',1 );" style="cursor:pointer;"  title="'+filetitle+' (Click to View Larger Image) " '}else{if(rs=="href"){js=' id="zImage'+from+'" onclick="javascript:gotoURL(\''+to+'\');" style="cursor:pointer;"  title="'+filetitle+' (Click for More Info) " '}else{js='  title="'+filetitle+'" '}}mainImg.innerHTML='<img src="'+filename+'" alt="'+filetitle+'" width="'+w+'" height="'+h+'" '+js+'  border="0" class="imgTrans">'}function prodOpsEdit(opID,opEditShared,opEditCustom,basePrice){if(opID!=0){$("zProdOpsEditArea").innerHTML='<div align="center">Loading...</div>';var args={opID:opID,opEditShared:opEditShared,opEditCustom:opEditCustom,basePrice:basePrice};runAjx("zAjax_prodOpsEdit.cfm",args,"#application.AJAXLOADING#")}else{$("zProdOpsEditArea").innerHTML=""}}function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight}}var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else{if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight}}}if(yScroll<windowHeight){pageHeight=windowHeight}else{pageHeight=yScroll}if(xScroll<windowWidth){pageWidth=windowWidth}else{pageWidth=xScroll}arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize}function fieldAdd(sourceID,queryName,sourceType){if($("fieldType_New").value=="label"){var args={action:"Add",sourceID:sourceID,queryName:queryName,fieldTitle:"",fieldType:$("fieldType_New").value,fieldValidate:"",fieldValues:$("fieldValues_New").value,fieldStyle:"",fieldSize:0,fieldMaxLength:0,fieldReq:0,priceField:0,updateList:1,sourceType:sourceType}}else{if($("fieldReq_New").checked){var fReq=1}else{var fReq=0}if($("priceField_New").checked){var pField=1}else{var pField=0}var args={action:"Add",sourceID:sourceID,queryName:queryName,fieldTitle:$("fieldTitle_New").value,fieldType:$("fieldType_New").value,fieldValidate:$("fieldValidate_New").value,fieldValues:$("fieldValues_New").value,fieldStyle:$("fieldStyle_New").value,fieldSize:$("fieldSize_New").value,fieldMaxLength:$("fieldMaxLength_New").value,fieldReq:fReq,priceField:pField,updateList:1,sourceType:sourceType}}$("fieldTitle_New").value="";$("fieldType_New").selectedIndex=0;$("fieldValidate_New").selectedIndex=0;$("fieldValues_New").value="";$("fieldStyle_New").value="";$("fieldSize_New").value=0;$("fieldMaxLength_New").value=0;$("fieldReq_New").checked=false;$("priceField_New").checked=false;runAjx("zAjax_FormFieldsAdmin.cfm",args,ajaxLoading)}function fieldEdit(sortID,sourceID,queryName,updateList,sourceType){if($("fieldReq_"+sourceID+"_"+sortID).checked){var fReq=1}else{var fReq=0}if($("priceField_"+sourceID+"_"+sortID).checked){var pField=1}else{var pField=0}var args={action:"Update",sourceID:sourceID,queryName:queryName,fieldTitle:$("fieldTitle_"+sourceID+"_"+sortID).value,fieldType:$("fieldType_"+sourceID+"_"+sortID).value,fieldValidate:$("fieldValidate_"+sourceID+"_"+sortID).value,fieldValues:$("fieldValues_"+sourceID+"_"+sortID).value,fieldStyle:$("fieldStyle_"+sourceID+"_"+sortID).value,fieldSize:$("fieldSize_"+sourceID+"_"+sortID).value,fieldMaxLength:$("fieldMaxLength_"+sourceID+"_"+sortID).value,fieldReq:fReq,priceField:pField,sortID:sortID,updateList:updateList,sourceType:sourceType};runAjx("zAjax_FormFieldsAdmin.cfm",args,ajaxLoading)}function fieldTypeChk(sortID,sourceID){var thisFieldTitle=$("fieldTitle_"+sourceID+"_"+sortID);var thisFieldType=$("fieldType_"+sourceID+"_"+sortID);var thisFieldValidate=$("fieldValidate_"+sourceID+"_"+sortID);var thisFieldValues=$("fieldValues_"+sourceID+"_"+sortID);var thisFieldStyle=$("fieldStyle_"+sourceID+"_"+sortID);var thisFieldSize=$("fieldSize_"+sourceID+"_"+sortID);var thisFieldMaxLength=$("fieldMaxLength_"+sourceID+"_"+sortID);var thisFieldReq=$("fieldReq_"+sourceID+"_"+sortID);var thisPriceField=$("priceField_"+sourceID+"_"+sortID);if(thisFieldType.value=="label"){thisFieldTitle.value="-- Use Values for text --";thisFieldTitle.disabled=true;thisFieldValidate.selectedIndex=0;thisFieldValidate.disabled=true;thisFieldStyle.value="";thisFieldStyle.disabled=true;thisFieldSize.value=0;thisFieldSize.disabled=true;thisFieldMaxLength.value=0;thisFieldMaxLength.disabled=true;thisFieldReq.checked=false;thisFieldReq.disabled=true;thisPriceField.checked=false;thisPriceField.disabled=true}else{if(thisFieldTitle.value.toUpperCase()=="-- USE VALUES FOR TEXT --"){thisFieldTitle.value="Title"}thisFieldTitle.disabled=false;thisFieldValidate.disabled=false;thisFieldStyle.disabled=false;thisFieldSize.disabled=false;thisFieldMaxLength.disabled=false;thisFieldReq.disabled=false;thisPriceField.disabled=false}}function fieldDelete(sortID,sourceID,queryName,sourceType){if(confirm("Are you sure you want to delete this field?")){var args={action:"Delete",sourceID:sourceID,queryName:queryName,sortID:sortID,updateList:1,sourceType:sourceType};runAjx("zAjax_FormFieldsAdmin.cfm",args,ajaxLoading)}}function fieldSort(sortID,sortDir,sourceID,queryName,sourceType){var args={action:"Sort",sourceID:sourceID,queryName:queryName,sortID:sortID,sortDir:sortDir,updateList:1,sourceType:sourceType};runAjx("zAjax_FormFieldsAdmin.cfm",args,ajaxLoading)}function moduleOptions(op,pageID,modOpsDsp,pageCopySource){if(op==""){hide("module_Options")}else{show("module_Options")}DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"pageOptions",op,pageID,modOpsDsp,pageCopySource,zResults)}function zRefreshCaptcha(capDiv,capForm){DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"zRefreshCaptcha",capDiv,capForm,zResults)}var C1Sel="";var C2Sel="";var C3Sel="";var C4Sel="";var C5Sel="";var C6Sel="";function prodAddCategory(pCatName,pCatLvl,isMulti){if(!isMulti){isMulti=0}if(isMulti==0){mName=""}else{mName="Multi"}pCatName=trim(pCatName);pCatName=pCatName.substring(0,50);if(pCatName!==""){if(pCatName=="Add New Category"){document.getElementById("CategoryID"+mName+pCatLvl+"Sel").style.display="none";document.getElementById("CategoryNewID"+mName+pCatLvl+"Sel").style.display="block"}else{document.getElementById("CategoryNewID"+mName+pCatLvl+"Sel").style.display="none";document.getElementById("CategoryID"+mName+pCatLvl+"Sel").style.display="block";if(pCatName!=""){var dupeName=false;var cl=$("prodCat"+mName+pCatLvl+"List").getElementsByTagName("div");for(var i=0;i<cl.length;i++){if(cl[i].getAttribute("catName")==pCatName){dupeName=true}}if(!dupeName){var args={pCatName:pCatName,pCatLvl:pCatLvl,pCatCount:cl.length,pmName:mName};runAjx("zAjax_prodAddCategory.cfm",args,ajaxLoading)}else{alert("The category named '"+pCatName+"' is already defined")}}else{alert("Please enter or select a category name")}}}}function prodDelCategory(pid,cid){var parentNode=document.getElementById(pid);var childNode=document.getElementById(cid);parentNode.removeChild(childNode);if($(pid).getElementsByTagName("div").length==0){var newSpan=document.createElement("span");newSpan.setAttribute("id",pid+"-blankCat");newSpan.innerHTML="None Defined";parentNode.appendChild(newSpan)}}function trShow(id){document.getElementById(id).style.display=""}function setStyle(object,styleText){object.style.cssText+=styleText}function changecss(theClass,element,value){var cssRules;if(document.all){cssRules="rules"}else{if(document.getElementById){cssRules="cssRules"}}var added=false;for(var S=0;S<document.styleSheets.length;S++){for(var R=0;R<document.styleSheets[S][cssRules].length;R++){if(document.styleSheets[S][cssRules][R].selectorText==theClass){if(document.styleSheets[S][cssRules][R].style[element]){document.styleSheets[S][cssRules][R].style[element]=value;added=true;break}}}if(!added){if(document.styleSheets[S].insertRule){document.styleSheets[S].insertRule(theClass+" { "+element+": "+value+"; }",document.styleSheets[S][cssRules].length)}else{if(document.styleSheets[S].addRule){document.styleSheets[S].addRule(theClass,element+": "+value+";")}}}}}function zLoading(bID,action,loadClass){if(!action){action="start"}if(!loadClass){loadClass="zButtonWorking"}myButton=document.getElementById(bID);if(action=="start"){myButton.onmouseout=function(){};myButton.onmouseover=function(){};myButton.className=loadClass;myButton.disabled=true}else{myButton.onmouseout=function(){changeclass(action)};myButton.onmouseover=function(){changeclass(action+"Over")};myButton.className=action;myButton.disabled=false}}function setClassName(oid,newClass){obj=document.getElementById(oid);obj.className=newClass}function chkAll(c,n){var cb=document.getElementsByName(n);for(var i=0;i<cb.length;i++){cb[i].checked=c}}function cSearchSelect(dbID){if(dbID>0){var args={dbID:dbID};runAjx("zCSearch_Config.cfm",args,ajaxLoading)}else{$("cSearchConfig").innerHTML=""}}function js_urlencode(str){str=escape(str);return str.replace(/[*+\/@]|%20/g,function(s){switch(s){case"*":s="%2A";break;case"+":s="%2B";break;case"/":s="%2F";break;case"@":s="%40";break;case"%20":s="+";break}return s})}function wordcount(string,formid){var a=string.split(/\s+/g);fcnt=document.getElementById(formid);fcnt.value=a.length;return}function dupToMenu(cv){pt=document.getElementById("titleID").value;mt=document.getElementById("menuID").value;bt=document.getElementById("browserTitleID").value;mtInput=document.getElementById("mTitleForm").style.display;btInput=document.getElementById("bTitleForm").style.display;if(mt==null||mt==""||mtInput=="none"){document.getElementById("menuID").value=leftTrim(document.getElementById("titleID").value,50)}if(bt==null||bt==""||btInput=="none"){document.getElementById("browserTitleID").value=document.getElementById("titleID").value}}function pageTeaserAction(pageID,action){teaserList=document.getElementById("teaserIDList").value;$("pageTeaserSample").innerHTML='<div align="center" style="width:auto;height:300px;padding-top:110px;background:#fefefe;"><div style="border: 1px solid black; padding: 10px; font-family: verdana, arial, helvetica; font-size: 12px; color: black; width: 300px; background-color: #f0f0f0;">Loading...  &nbsp;&nbsp;&nbsp;  <img src="/sysimages/ajax-loader3_f0f0f0.gif" width="25" height="25" alt="" border="0" align="absmiddle"></div></div>';DWRUtil.useLoadingImage(ajaxLoading);DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"PageTeaserAction",teaserList,pageID,action,zxResults)}function purgeFormData(id,action){if(!action){action="purge"}if(confirm("Are you sure you want to "+action+" this forms' data?")){var args={id:id,action:action};runAjx("zPageForm_PurgeData.cfm",args,ajaxLoading)}}function chkDisplayType(v){ty=document.getElementById("customTeaserSelect");if(v==3){ty.style.display="block"}else{ty.style.display="none"}}function zValidEmail(str){str=str.toLowerCase();return(str.search(/^[a-zA-Z]+([_\.-]?[a-zA-Z0-9]+)*@[a-zA-Z0-9]+([\.-]?[a-zA-Z0-9]+)*(\.[a-zA-Z]{2,4})+$/)!=-1)}function leftTrim(str,n){if(n<=0){return""}else{if(n>String(str).length){return str}else{return String(str).substring(0,n)}}}function rightTrim(str,n){if(n<=0){return""}else{if(n>String(str).length){return str}else{var iLen=String(str).length;return String(str).substring(iLen,iLen-n)}}}function prodDetailSwap(inpObj,pageID,productID,divID,pa,productPage,template){inpObj.length=1;inpObj[0].text="Loading...";inpObj[0].value="0";var args={pageID:pageID,productID:productID,divID:divID,pa:pa,productPage:productPage,template:template};runAjx("zProducts_DetailSwap.cfm",args,ajaxLoading)}function prodListSwap(pageID,url,params,view,sort){var divID="productListContent";var listDiv=document.getElementById(divID);var loadDiv=document.getElementById("mdtLoading");loadDiv.innerHTML='<img src="sysimages/ajaxloader3bz6.gif" alt="Loading..." Title="Loading..." width="16" height="16" border="0" align="absmiddle">';var args={pageID:pageID,url:url,params:params,view:view,sort:sort,divID:divID};runAjx("zProducts_ListSwap.cfm",args,ajaxLoading)}function updateInnerHTML(divID,value){try{d=document.getElementById(divID);d.innerHTML=value}catch(e){}}function productUpdateViewablePrice(opType){if(opType=="1"){$("listPriceInputText").style.display="block";$("salePriceInputText").style.display="block";$("Price").style.backgroundColor="#c0c0c0";$("Price").style.color="#343434";$("Price").style.fontStyle="italic";$("SalePrice").style.backgroundColor="#c0c0c0";$("SalePrice").style.color="#343434";$("SalePrice").style.fontStyle="italic"}if(opType=="0"){$("listPriceInputTextAdd").style.display="block"}}function getProductCategory(catNum,totalCats,uID,parentCats,masterCat,wildcard,drilldown){for(var i=catNum;i<=totalCats;i++){var selObj=$("SC"+i+""+uID);selObj.length=1;selObj[0].text="Loading...";selObj[0].value="0"}var args={catNum:catNum,totalCats:totalCats,uID:uID,parentCats:parentCats,masterCat:masterCat,wildcard:wildcard,drilldown:drilldown};DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"getProductCategory",args,zxResults)}function prodCatSelected(uid,catNum){var s="";for(var i=1;i<catNum;i++){if(s!=""){s=s+","}s=s+$("SC"+i+""+uid).value}return s}function getCSearchSelect(selectLvl,maxLvls,pageID,selected,uniqueID){for(var i=selectLvl;i<=maxLvls;i++){var selObj=$("CS"+i+""+uniqueID);selObj.length=1;selObj[0].text="Loading...";selObj[0].value="0"}var args={selectLvl:selectLvl,pageID:pageID,selected:selected,uniqueID:uniqueID};DWREngine._execute(_ajaxConfig._cfscriptLocation,null,"getCSearchSelect",args,zxResults)}function cSearchSelected(uniqueID,selectLvl){var values=new Array();for(var i=1;i<selectLvl;i++){values[i-1]=$("CS"+i+""+uniqueID).value}return values}function getWheelGuideSelect(pageID,step,year,make,model){refreshList=true;if(year!=undefined&&year.toUpperCase()=="SELECT YEAR"){refreshList=false}if(make!=undefined&&make.toUpperCase()=="SELECT MAKE"){refreshList=false}if(model!=undefined&&model.toUpperCase()=="SELECT MODEL"){refreshList=false}for(i=step;i<=3;i++){$("wheelGuideMenu"+i+""+pageID).innerHTML="";$("wheelGuideMenu"+i+""+pageID).style.display="none"}if(refreshList){$("wheelGuideButton"+pageID).innerHTML='<div class="zWheelGuideLoading">Loading...&nbsp;<img src="/sysimages/ajax-loader-snake2.gif" alt="" width="16" height="16" border="0" align="absmiddle"></div>';$("wheelGuideButton"+pageID).style.display="block"}else{$("wheelGuideButton"+pageID).innerHTML="";$("wheelGuideButton"+pageID).style.display="none"}if(refreshList){var args={pageID:pageID,step:step,year:year,make:make,model:model};runAjx("zWheelGuide_getSelect.cfm",args,ajaxLoading)}}function validateFileName(v){nv=v.replace(/[^a-zA-Z0-9_-]/g,"_");document.getElementById("linkicon").title="http://"+fullURL+"/"+nv+".cfm";document.getElementById("linkpreview").innerHTML='<a href="/'+nv+'.cfm" class="pgTitleEditLink">'+nv+".cfm</a>";return nv}function updateLinkIcon(){if(document.getElementById("browserTitleStatus").value!=="none"){var source="browserTitleID"}else{var source="titleID"}nv=document.getElementById(source).value;document.getElementById("newStubName").value=validateFileName(nv)}function sharedOpEdit(opID){if(confirm("Any unsaved changes to this product will be lost, are you sure you want to continue?")){if(opID=="0"){window.location="/zca.cfm?go=zProductOps"}else{window.location="/zca.cfm?go=zProductOpsSimple_Edit&opID="+opID}}}function zMyAccount(){window.location="/zMyAccount.cfm"};

