var vesb=new Object();function tpage(){if(document.getElementById("rpquery").value="page name"){document.getElementById("rpquery").value="";document.getElementById("rpquery").style.color="#000000"}}function pagesel(C,B){var A=B.split("/");location.href=siteurl+A[1]}function initauto(){j$("#rpquery").autocomplete({serviceUrl:siteurls+"edinc/xmlxferq",minChars:2,maxHeight:400,width:300,queryType:"sitepages",onSelect:pagesel})}function hpmen(A,C,D){if(omen==A){return }if((omen!=null&&autocopen==false)||(omen!=null&&A!=null&&esbkeepm==false)){j$("#"+omen).fadeOut("fast")}if(A!=null){j$("#"+A).fadeIn("fast")}if(autocopen==false||A!=null){omen=A}if(A!=null){var E=j$("#"+A).get(0);if(E.innerHTML.length==0){var B="";if(C!=null){B="&ex="+C}if(D!=null){B=B+"&exp="+D}j$.get(siteurls+"edinc/edtool/menu-header?menu="+A+"&dt="+new Date().valueOf()+B,hpmenLoad)}}else{inithmen(A)}}function inithmen(A){if(A=="stmstore"){document.getElementById("ecsrch").focus()}if(A=="stmedit"){document.getElementById("rpquery").focus()}}function hpmenLoad(m){var p=m.indexOf("-");var mn=m.substring(0,p);m=m.substring(p+1);if(mn=="pagelist.recent"){var ot="<ul>";var pdatap=eval("("+m+")");for(t=0;t<pdatap.length;t++){var p=pdatap[t];ot=ot+"<li><a href=\"javascript:gopg('"+p.pg+"');\">"+p.name+"</a></li>"}ot=ot+"</ul>";document.getElementById("pagelist.recent").innerHTML=ot;window.setTimeout("initauto()",100);return }if(mn=="stmedit"){j$.get(siteurls+"edinc/edtool/menu-header?menu=pagelist.recent&dt="+new Date().valueOf(),hpmenLoad)}j$("#"+mn).html(m);inithmen(mn)}var lover=null;var esbkeepm=false;function movv(C,A){if(omen!=null&&lover!=C){hpmen(null)}if(lover!=null){document.getElementById(lover).style.display="none"}var B=document.getElementById(C);if(B!=null){lover=C;B.style.display="block"}}function LTrim(B){var A=/\s*((\S+\s*)*)/;return B.replace(A,"$1")}function RTrim(B){var A=/((\s*\S+)*)\s*/;return B.replace(A,"$1")}function Trim(A){return LTrim(RTrim(A))}function ecfind(C){var B=document.getElementById("ecsrch");if(B!=null){var A=B.value;A=Trim(A);if(C==false){if(!isNaN(A)){gopg("inc/ss?page=storeOrders/"+A+"/detail")}else{gopg("storecustomers?s="+A+"*")}}else{gopg("storesettings/searchresults?s="+A)}return }}function pgkey(C,A){if(C.value=="goto page name"){C.value=""}var B;if(A&&A.which){B=A.which}else{if(window.event){A=window.event;B=A.keyCode}}if(B==13){gopg(C.value.replace(" ","_"))}}function ecenter(A,B){var C;if(B&&B.which){C=B.which}else{if(window.event){B=window.event;C=B.keyCode}}if(C==13){ecfind(false)}}function setipageurl(A,B){location.href=A}function setipageurlcmp(B,A,C,I){if(ipageed==2){if(C==null){C=950}bgw=document.getElementById("bgrw");bg=document.getElementById("abgr");fullwidth=document.body.offsetWidth;if(C>fullwidth){C=fullwidth-30}ssleft=(fullwidth-C)/2;fullheight=j$(window).height();var D=j$(window).scrollTop();var F=D;if(I==null){I=fullheight}else{F=(fullheight-I)/2;F=F+D}var H=j$("#abgr");H.get(0).style.visibility="visible";H.fadeIn("fast");H.get(0).style.display="block";H.offset({left:ssleft,top:F});H.height(I);H.width(C);j$("#esbQuickNav").hide();var H=j$("#bgrw");H.get(0).style.display="block";H.get(0).style.visibility="visible";H.offset({left:0,top:0});H.width(fullwidth);var E=I-35;var G='<iframe id="axyz" name="preview" src="'+B+'" width=99% height="'+E+'" border=0 frameborder=0></iframe>';document.getElementById("dvaxyz").innerHTML=G;setScrollbars(false,F);return }location.href=B}function setScrollbars(A,C){if(A){document.body.scroll="yes";document.body.style.marginRight="0px";document.documentElement.style.overflow="scroll";edshobj(true);if(vesb.btop&&vesb.btop!=null){window.scrollTo(0,vesb.btop);vesb.btop=null}}else{var B=scwid();document.body.style.marginRight=B+"px";document.documentElement.style.overflow="hidden";document.body.scroll="no";edshobj(false);if(C!=null){vesb.btop=C;window.scrollTo(0,C)}else{vesb.btop=null}}}var edpopclick=false;function edpopclose(A){if((A&&A==true)||location.href.indexOf("parent=true")>0){window.parent.edpop("popw",false)}else{window.close()}}function edpopfunc(){if(location.href.indexOf("parent=true")>0){return window.parent}else{return window.opener}}function edpopcce(A){code=A.keyCode?A.keyCode:A.which;if(code==27){j$(document).unbind("keypress");edpopcc()}}function edpopcc(){if(window.location.href.indexOf("#")<0){edpop("popw",false)}else{window.setTimeout("edpopcc()",100)}}function bkchk(){if(location.href.indexOf("#bk")<0){edpop("popw",false);closebldg2();window.clearInterval(bkck)}}var bkurl=null;var bkck=null;function startbk(){bkurl=location.href;location.href=location.href+"#bk";bkck=window.setInterval("bkchk()",100)}function scwid(){var E=null;var D=null;var C=0;var B=0;E=document.createElement("div");E.style.position="absolute";E.style.top="100px";E.style.left="100px";E.style.width="200px";E.style.height="150px";D=document.createElement("div");D.style.width="100%";D.style.height="200px";E.appendChild(D);document.body.appendChild(E);E.style.overflow="hidden";C=D.offsetWidth;E.style.overflow="scroll";B=D.offsetWidth;if(C==B){B=E.clientWidth}document.body.removeChild(document.body.lastChild);var A=(C-B);return A}var ezdl=0;function edshobj(D){if(D==false&&ezdl==0){return }ezdl=0;var B="visible";if(D==false){B="hidden"}var C=document.getElementsByTagName("object");for(var A=0;A<C.length;A++){if(C[A].className!="esb"){C[A].style.visibility=B;ezdl++}}var C=document.getElementsByTagName("embed");for(var A=0;A<C.length;A++){if(C[A].className!="esb"){C[A].style.visibility=B;ezdl++}}}var lastpopdiv=null;function edpop(H,A,B,E){edpopclick=true;bg=document.getElementById(H);showbgrw(A,0);if(A){var J=document.getElementById(H+"-inner");if(B!=null){J.style.display="block";var C="&";if(B.indexOf("?")<0){C="?"}B=B+C+"parent=true";var D=H;var I=800;var G=600;if(E.size!=null&&E.size=="lib"){I=880;G=700}if(E.w!=null){I=E.w;G=E.h}if(G>document.body.clientHeight||document.body.clientHeight<800){G=document.body.clientHeight-130}edpopclick=true;if(B.charAt(0)!="/"){B=siteurl+B}J.innerHTML='<iframe src="'+B+'" style="width:'+I+"px;height:"+G+'px" border=0 frameborder=0></iframe>'}else{if(J!=null){J.style.display="none"}}j$("body").keypress(edpopcce);bg.style.display="block";fw=document.body.offsetWidth-20;ssleft=(fw-bg.clientWidth)/2;fh=j$(window).height();ssh=(fh-bg.clientHeight)/2;ssh+=document.body.scrollTop;bg.style.left=ssleft;bg.style.top=ssh;j$("#"+H).offset({left:ssleft,top:ssh});bg.style.visibility="visible"}else{var F=document.getElementById("popwf");if(F!=null){F.src="/i/t/w/rnddot.gif"}var J=document.getElementById(H+"-inner");if(J!=null){J=innerHTML=""}}}function showedwin(){bg=document.getElementById("bgr");if(bg.style.display=="block"||bg.style.display==""){closebldg();return }if(bg.style.display=="block"||bg.style.display==""){closebldg();return }fw=document.body.offsetWidth-20;ssleft=fw/2-400;fh=document.body.clientHeight;ssh=(fh-700)/2;ssh=document.body.scrollTop;bg.style.left=ssleft;bg.style.top=ssh;bg.style.height=document.body.offsetHeight;bg.style.width=900;bg.style.visibility="visible";document.getElementById("bgr").style.display="block"}function showbgrw(C,A){edpopclick=false;bgw=document.getElementById("bgrw");if(C==true){setScrollbars(false);bgw.style.left=0;bgw.style.width="100%";bgw.style.top=A+j$(window).scrollTop();bgw.style.visibility="visible";j$("#esbQuickNav").hide();j$(bgw).fadeIn("fast")}else{try{if(bg&&bg!=null){j$(bg).fadeOut()}}catch(B){alert(B)}j$(bgw).fadeOut("fast");setScrollbars(true);j$("#esbQuickNav").show()}}function closebldgw(){showbgrw(false,0);try{j$("#comp"+ez_lastcomp).effect("highlight",{},2000)}catch(A){}}function closebldg(){bg=document.getElementById("bgr");document.getElementById("bgr").style.display="none";closebldgw();setScrollbars(true)}function closebldg2(){bg=document.getElementById("abgr");if(bg&&bg.style.display=="block"){setScrollbars(true);bg.style.display="none";closebldgw()}}function closemsg(){document.getElementById("edmsg").style.visibility="hidden"}function togprops(A){d=document.getElementById("qmenu");if(d.style.display!="none"){togpropsclose();return }showbgrw(true,90);document.getElementById("wpprops").src=siteurl+"edinc/pageprops/"+A;if(d.style.display!=""){j$("#qmenu").show("blind",{direction:"vertical"},"slow")}}function togpropsex(A){d=document.getElementById("qmenu");if(d.style.display!="none"){togpropsclose();return }showbgrw(true,90);document.getElementById("wpprops").src=A;if(d.style.display!=""){j$("#qmenu").hide("blind",{direction:"vertical"},"slow")}}function togpropsclose(){j$("#qmenu").slideUp("slow");showbgrw(false,0)}function togqm(){d=document.getElementById("qmenu");if(d.style.display=="block"){d.style.display="none"}else{d.style.display="block"}}function togq(B){d=document.getElementById("qprops");if(d.style.visibility=="hidden"){d.style.visibility="visible"}else{d.style.visibility="hidden"}}function togql(B){d=document.getElementById("qlayout");if(d.style.visibility=="hidden"){d.style.visibility="visible"}else{d.style.visibility="hidden"}}function lo2(){dem=document.getElementById("edmsg");if(dem.style.visibility!="hidden"){window.open(siteurl+"inc/timeout","_self")}}function locontf(A,B){}function locont(){dem=document.getElementById("edmsg");dem.style.visibility="hidden";ajaxSend(siteurl+"edinc/xmlxfer?rtype=hb",{onComplete:locontf});window.setTimeout("lo()",timout)}function lo(){window.setTimeout("lo2()",1000*60*30);var B=new Date();dem=document.getElementById("edmsg");dem.style.visibility="visible";fw=document.body.offsetWidth;fh=document.body.clientHeight;ml=(fw-650)/2;mt=(fh-300)/2-100;mt=mt+document.body.scrollTop;dem.style.left=ml;dem.style.top=mt;de=document.getElementById("edmsgtxt");var A=B.getMinutes();if(A<0){A="0"+A}de.innerHTML="<div style='background-color:#444444;color:#ffff00;padding:15px;font-weight:bold;font-size:12pt;'>"+propSysName+' : SESSION TIMEOUT : SOON</div><div style="color:#333333;font-size:11pt;padding:20px"><P>Your session is about to time out.  To prevent your session from timing out and continue working on your site, click link below.<P>The time is '+B.getHours()+":"+A+". Your browser has been inactive for 60 minutes.  Sessions timeout after 90 minutes at which point you are automatically logged out of your site editor.  If you are working on your site, be sure to save your work now.</div>"}function iedtitle1start(A){document.write('<div class="'+A+'"><table border=0 width="100%" cellspacing=0><tr><td  nowrap class="s1" width="1%">')}function iedtitle1stop(){document.write('&nbsp;&nbsp;</td><td class="s2" width="50%">&nbsp;</td><td class="s3" width="49%">&nbsp;&nbsp;</td></tr></table></div>')}var dmenuov=false;function showdesignm(){d=document.getElementById("dmenu");d.style.visibility="visible"}function hidedesignm(){window.setTimeout("dohidedesignm()",300)}function dohidedesignm(){if(dmenuov==false){d=document.getElementById("dmenu");d.style.visibility="hidden"}}function ipagetitle(A){document.write('<div class="pagetitle1"><table cellpadding=0 border=0 cellspacing=0 width=100%><tr><td class="s1" width="1%"></td><td width="98%" class="s2">'+A+'</td><td class="s3" width="1%">&nbsp;</td></tr></table></div>')}function overedbtn(A){A.style.backgroundColor="#dfdfdf";A.style.borderColor="#000000"}function outedbtn(A){A.style.backgroundColor="";A.style.borderColor=""}function prowover(A,B){if(moving==false&&A&&A.issel!=true){A.style.backgroundColor="#efefef";A.style.borderColor="#000000";if(A.mdiv==null){c=document.getElementById("pdiv"+B);A.mdiv=c}A.mdiv.style.visibility="visible"}}var lastsel=null;function prowout(A,B){if(moving==false&&A&&A.issel!=true){A.style.backgroundColor="";A.style.borderColor="";if(A.mdiv==null){c=document.getElementById("pdiv"+B);A.mdiv=c}A.mdiv.style.visibility="hidden"}}function clearsel(A){if(lastsel!=null&&lastsel!=A){r=document.getElementById("prow"+lastsel);r.issel=false;prowout(r,A)}lastsel=null}var lastpage=null;var lastparent=null;var moving=false;function showmaction(D,A,C,B){d=document.getElementById("maction");d.style.visibility="visible";x=D.clientX;y=D.clientY;d.style.top=(y+document.body.scrollTop)+"px";d.style.left=x+"px";lastpage=B;lastparent=C}function movepage(A){d=document.getElementById("maction");d.style.visibility="hidden";from=document.getElementById("plist"+lastparent);too=document.getElementById("plist"+A);e=document.getElementById("prow"+lastpage);window.open(thispage+"?mpid="+lastpage+"&fr="+lastparent+"&to="+A,"_self")}function showgroup(A){window.open(thispage+"?mview="+A,"_self")}function rowhighlight(A,B){if(B==null){B="dfdfdf"}A.style.backgroundColor="#"+B}function rownormal(A){A.style.backgroundColor=""}function mover(A){}function mout(A){}function pup(A){clearsel(A);r=document.getElementById("prow"+A);r.issel=true;lastsel=A;r.style.backgroundColor="#b0e6f1";if(r.previousSibling!=null){r.swapNode(r.previousSibling)}moving=true;window.setTimeout("clearpmove()",2500)}function pdn(A){clearsel(A);r=document.getElementById("prow"+A);r.issel=true;lastsel=A;r.style.backgroundColor="#b0e6f1";if(r.nextSibling!=null){r.swapNode(r.nextSibling)}moving=true;window.setTimeout("clearpmove()",2500)}function clearpmove(){r=document.getElementById("prow"+lastsel);if(r){r.issel=false;lastsel=null;moving=false;prowout(r,lastsel)}}function goe(A){location.href=A}function overedbtn(A,B){if(B.indexOf("editbtn")==0){A.className=B+" "+B+"o"}}function outedbtn(A,B){A.className=B}function editbtn(A,D,B,E,F){if(!F||F==null||F.length==0){F="editbtn"}if(E==false){var C="'"+D+"'";document.write('<table cellpadding=0 cellspacing=0 border=0><tr><td><div class="'+F+'" onClick="goe('+C+');return false;" onMouseOver="overedbtn(this,\''+F+"');\" onMouseOut=\"outedbtn(this,'"+F+'\');"><table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td class="bl" width=1% valign=middle><a href="'+D+'" onClick="event.cancelBubble=true"><span><img src="'+imroot+"/i/t/w/btn/"+B+'" border=0></span></a></td><td class="br" width=99%><a href="'+D+'" onclick="event.cancelBubble=true"><span>'+A+"</span></a></td></tr></table></div></td></tr></table>")}else{document.write('<table cellpadding=0 cellspacing=0 border=0><tr><td><div class="'+F+'"  onClick="'+D+';return false;" onMouseOver="overedbtn(this,\''+F+"');\" onMouseOut=\"outedbtn(this,'"+F+'\');"><table cellpadding=0 cellspacing=0 border=0  width="100%"><tr><td class="bl" width=1% valign=middle><a href="" onClick="event.cancelBubble=true;'+D+';return false;"><span><img src="'+imroot+"/i/t/w/btn/"+B+'" border=0></span></a></td><td class="br" width=99%><a href="" onClick="event.cancelBubble=true;'+D+';return false;"><span>'+A+"</span></a></td></tr></table></div></td></tr></table>")}}function editbtnstart(A){if(A==null||A.length==0){A="editbtn"}document.write('<table cellpadding=0 cellspacing=0 border=0><tr><td><div class="'+A+'" onMouseOver="overedbtn(this)" onMouseOut="outedbtn(this)"><table cellpadding=0 cellspacing=0 border=0><tr><td valign=middle>')}function editbtnend(){document.write("&nbsp;</td></tr></table></div></td></tr></table>")}function btnback(A){document.write('<div class="editback"><table cellpadding=0 cellspacing=0 border=0><tr><td><a href="'+A+'"><img src="'+imroot+'/i/t/w/btn/pagesback.gif" border=0></a></td><td><font size=2>&nbsp;</font><a href="'+A+'">Go back</a></td><td><img src="'+imroot+'/i/t/w/rnddot.gif" width=10 height=1></td></tr></table></div>')}function ieditdivider(){}function ieditfooter(){document.write('<div class="ieditfooter">'+propSysNameLong+'<br><a href="http://'+propHomeLink+'">'+propHomeLink+"</a><p>&nbsp;</center></div>")}function ajaxSend(A,D){function B(){if(C.readyState==4){if(C.status==200){if(C.responseText.indexOf("err:")==0){if(F.onError){F.onError(C,F)}}else{if(F.onComplete){F.onComplete(C,F)}}}else{if(F.onError){F.onError(C,F)}}}}var C=null;var F=D;var G=new Date();A=A+"&d="+G.getTime();if(window.ActiveXObject){C=new ActiveXObject("Microsoft.XMLHTTP");if(C){C.onreadystatechange=B;C.open("GET",A,true);C.send()}}else{try{if(window.XMLHttpRequest){C=new XMLHttpRequest();C.onreadystatechange=B;C.open("GET",A,true);C.send(null)}}catch(E){alert("ajr err 1")}}}function getParam(C,E){query=C.location.search;if(query.length==0){return""}query=query.substring(1);var D=query.split("&");for(var B=0;B<D.length;B++){var F=D[B].indexOf("=");var A=D[B].substring(0,F);if(A==E){return D[B].substring(F+1)}}return null}function centerdiv(A){bg=document.getElementById(A);fw=document.body.offsetWidth-20;ssleft=(fw-bg.clientWidth)/2;fh=document.body.clientHeight;if(bg.clientHeight<fh){ssh=(fh-bg.clientHeight)/2}else{ssh=0}ssh+=document.body.scrollTop;bg.style.left=ssleft;bg.style.top=ssh}var sliderSettings={};function xformnone(A){return A}function verifynone(A){return true}sliderSettings.xformnone=xformnone;sliderSettings["int"]=checkIntNumber;function initjquerySlideEdit(formname){var list=j$("#propeditslider");for(var i=0;i<list.length;i++){var sldiv=j$(list[i]);var cfg=eval("("+sldiv.data("propslidercfg")+")");var form=document.forms[formname];var ctrl=sldiv.data("propsliderctrl");var display=form[ctrl+"-disp"];ctrl=form[ctrl];cfg.range="min";cfg.value=ctrl.value;var xform=cfg.xform;if(!(typeof xform==="undefined")){xform=sliderSettings[xform];delete cfg.xform}else{xform=xformnone}var verify=cfg.verify;if(!(typeof verify==="undefined")){verify=sliderSettings[verify];delete cfg.verify}else{verify=verifynone}display.verify=verify;display.value=xform(ctrl.value);cfg.slide=function(event,ui){j$(display).val(xform(ui.value));j$(ctrl).val(ui.value)};var slider=sldiv.slider(cfg);var timer=null;j$(display).keyup(function(event){var v=j$(display).val();if(timer!=null){window.clearTimeout(timer);timer=null}if(v.length>0){timer=window.setTimeout(function(){var v=j$(display).val();var tv=v*1;if(tv<cfg.min){v=""+cfg.min}else{if(tv>cfg.max){v=""+cfg.max}}j$(ctrl).val(v);j$(display).val(xform(v));slider.slider("value",v)},500)}}).focus(function(event){if(isNaN(j$(display).val())){j$(display).val("")}})}}function sliderchange(A){if(typeof A.verify==="undefined"){return true}if(A.verify(A)==false){return false}}function addSubmitFunc(A){numSubmitFunctions=numSubmitFunctions+1;SubmitFunctions[numSubmitFunctions]=new Function(A)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length;var C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}for(;C<A;C++){if(this[C]===B){return C}}return -1}}function checkIntNumber(C){var A=event.keyCode;var B=event.shiftKey;if(A==8||A==9||A==46||(A>=35&&A<=40)||(A>=112&&A<=123)){return true}if(B){return false}else{if(A>47&&A<58||(A>=112&&A<=123)||(A>=96&&A<=105)){return true}}return false}function ezpopmenu(B,C){this.but=B;this.pop=C;var A=this;j$(C).mouseleave(function(){A.close()});this.open=function(){this.pop.style.display="block";this.setpos()};this.close=function(){j$(this.pop).fadeOut()};this.toggle=function(){if(this.pop.style.display=="block"){this.close()}else{this.open()}};this.setpos=function(){j$(this.pop).removeClass("esbOptionMenuUp");this.pop.style.top="";if(this.offscrn()){j$(this.pop).addClass("esbOptionMenuUp");var F=j$(this.pop).height();var D=j$(this.but).height();var E=(F+D)*-1;this.pop.style.top=E+"px"}};this.offscrn=function(){var E=j$(this.pop).offset().top;var I=j$(this.pop).height();var D=j$(window).scrollTop();var H=j$(window).height();var F=D+H;var G=E+I+20;if(G>F){return true}else{return false}}};
