var p7PMMover='_over';var p7PMMopen='_overdown';var p7PMMmark='_down';var p7PMMi=false,p7PMMa=false,p7PMMctl=[],p7PMMadv=[];function P7_PMMset(){var i,h,sh,hd,x,v;if(!document.getElementById){return;}
sh='.p7PMM div {position:absolute;display:none}\n';if(document.styleSheets){h='\n<st'+'yle type="text/css">\n'+sh+'\n</s'+'tyle>';document.write(h);}
else{h=document.createElement('style');h.type='text/css';h.appendChild(document.createTextNode(sh));hd=document.getElementsByTagName('head');hd[0].appendChild(h);}}
P7_PMMset();function P7_PMMbb(){return;}
function P7_PMMclose(d,bp){var a,h,w,tM;a=document.getElementById(d.p7trigger);a.p7state='closed';d.p7state='closed';a.className=a.className.replace('trig_open','trig_closed');a.parentNode.className=a.parentNode.className.replace('trig_open','trig_closed');if(a.hasImg){iM=a.getElementsByTagName("IMG")[0];iM.p7state='closed';if(iM.mark){iM.src=iM.p7imgswap[3];}
else{iM.src=iM.p7imgswap[0];}}
d.style.display='none';}
function P7_PMMshut(d){var k,tM,tD;tM=document.getElementById(d);tD=tM.getElementsByTagName("DIV");for(k=tD.length-1;k>-1;k--){if(tD[k].p7state&&tD[k].p7state=='open'){P7_PMMclose(tD[k]);}}}
function P7_PMMpreloader(){var i,x;for(i=0;i<arguments.length;i++){x=document.p7PMMpreload.length;document.p7PMMpreload[x]=new Image();document.p7PMMpreload[x].src=arguments[i];}}
function P7_PMMimovr(im){var m=false,a=im.parentNode,r=im.rollover;if(im.mark){m=(r>1)?true:false;}
else if(im.p7state=='open'){m=(r==1||r==3)?true:false;}
else{m=true;}
if(m){im.src=im.p7imgswap[1];}}
function P7_PMMimout(im){var a=im.parentNode,r=im.rollover;if(im.mark){if(im.p7state=='open'){im.src=im.p7imgswap[2];}
else{im.src=im.p7imgswap[3];}}
else if(im.p7state=='open'){if(r==1||r==3){im.src=im.p7imgswap[2];}}
else{im.src=im.p7imgswap[0];}}
function P7_PMMtoggle(d,bp){var i,a,tA,tD,pp;a=document.getElementById(d);pp=a.parentNode;while(pp){if(pp.tagName&&pp.tagName=="UL"){break;}
pp=pp.parentNode;}
tD=pp.getElementsByTagName("DIV");if(tD&&tD.length>0){for(i=tD.length-1;i>-1;i--){if(tD[i].p7state&&tD[i].p7state=='open'){if(!bp&&tD[i].p7trigger!=a.id){P7_PMMclose(tD[i]);}}}}}
function P7_PMManimA(id,v,ft){var el,tg=100,fr=10,dy=10;el=document.getElementById(id);el.style.fontSize=v+'%';if(!ft){el.style.visibility="visible";el.parentNode.style.visibility="visible";}
if(v!=tg){v+=fr;v=(v>=tg)?tg:v;setTimeout("P7_PMManimA('"+id+"',"+v+",1)",dy);}}
function P7_PMManimB(id,v,ln,ft){var el,tg=120,fr=10,dy=10;el=document.getElementById(id);el.style.lineHeight=v+'%';if(!ft){el.style.visibility="visible";el.parentNode.style.visibility="visible";}
if(v!=tg){v+=fr;v=(v>=tg)?tg:v;setTimeout("P7_PMManimB('"+id+"',"+v+",'"+ln+"',1)",dy);}
else{el.style.lineHeight=ln;}}
function P7_PMManimC(id,v,ft){var el,tg=0,fr=8,dy=10;el=document.getElementById(id);el.style.textIndent=v+'px';if(!ft){el.style.visibility="visible";el.parentNode.style.visibility="visible";}
if(v!=tg){v+=fr;v=(v>=tg)?tg:v;setTimeout("P7_PMManimC('"+id+"',"+v+",1)",dy);}}
function P7_PMMwin(){var h,w;if(document.documentElement&&document.documentElement.clientHeight){w=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}
else if(window.innerHeight){if(document.documentElement.clientWidth){w=document.documentElement.clientWidth;}
else{w=window.innerWidth;}
h=window.innerHeight;}
else if(document.body){w=document.body.clientWidth;h=document.body.clientHeight;}
return[h,w];}
function P7_PMMgetPropValue(ob,prop,prop2){var h,v=null;if(ob){if(ob.currentStyle){v=eval('ob.currentStyle.'+prop);}
else if(document.defaultView.getComputedStyle(ob,"")){v=document.defaultView.getComputedStyle(ob,"").getPropertyValue(prop2);}
else{v=eval("ob.style."+prop);}}
return v;}
function P7_PMMopen(d,bp){var i,tA,tM,tD,w,h,mT,mL,pp,xx=0,yy=0,wd,pb,pr,sct,aw,sc,pt,pl,iM;tA=document.getElementById(d);if(!bp){P7_PMMtoggle(d);}
if(tA.p7state=='open'){return;}
tA.p7state='open';if(tA.hasImg){iM=tA.getElementsByTagName("IMG")[0];iM.p7state='open';iM.src=iM.p7imgswap[2];}
tA.className=tA.className.replace('trig_closed','trig_open');tA.parentNode.className=tA.parentNode.className.replace('trig_closed','trig_open');tM=document.getElementById(tA.pmmmenu);tD=document.getElementById(tA.pmmsub);tD.p7trigger=tA.id;tD.p7state='open';tD.style.visibility="hidden";tD.style.display="block";tD.style.height='auto';tD.style.width='auto';w=tD.offsetWidth;h=tD.offsetHeight;aw=tA.parentNode.offsetWidth;mT=(tA.parentNode.offsetHeight*-1)+tM.p7opt[3];if(tM.p7opt[5]==1){mL=(w*-1)-tM.p7opt[4];}
else{mL=tA.offsetWidth+tM.p7opt[4];}
if(tM.p7opt[1]==1&&tA.pmmlevel==1){mT=0;mL=0;if(tM.p7opt[7]==1){mL=((w-aw)/2)*-1;}
else if(tM.p7opt[7]==2){if(tA.className.indexOf('pmmlast')>-1){mL=(w-aw)*-1;}
else if(tA.className.indexOf('pmmfirst')==-1){mL=((w-aw)/2)*-1;}
else{mL=0;}}}
if(tM.p7opt[13]==1){mT-=h;if(tM.p7opt[1]==1&&tA.pmmlevel==1){mT-=tA.offsetHeight;}}
wd=P7_PMMwin();pp=tA;while(pp){xx+=(pp.offsetLeft)?pp.offsetLeft:0;yy+=(pp.offsetTop)?pp.offsetTop:0;if(window.opera){if(pp.nodeName=="BODY"){yy-=(pp.offsetTop)?pp.offsetTop:0;}}
pp=pp.offsetParent;}
sc=document.body.parentNode.scrollTop;if(!sc){sc=document.body.scrollTop;if(!sc){sc=window.scrollY?window.scrollY:0;}}
yy-=sc;sc=document.body.parentNode.scrollLeft;if(!sc){sc=document.body.scrollLeft;if(sc){sc=window.scrollX?window.scrollX:0;}}
xx-=sc;pr=xx+mL+w;pb=yy+mT+h+tA.offsetHeight;if(pr>wd[1]){if(tM.p7opt[1]==1&&tA.pmmlevel==1){mL=mL-(pr-wd[1]+2);}
else{mL=w*-1;}}
if(pb>wd[0]){mT=mT-(pb-wd[0]+2);}
pt=yy+mT+tA.offsetHeight;if(pt<0){mT=mT-pt+2;}
pl=xx+mL;if(pl<0){mL=mL-pl+2;}
tD.style.marginTop=mT+'px';tD.style.marginLeft=mL+'px';if(p7PMMa&&tM.p7opt[2]>0){var dfs,fsA,tU=tD.getElementsByTagName('UL')[0];fsA=tU.getElementsByTagName("A")[0];if(tM.p7opt[2]==1){P7_PMManimA(tU.id,5);}
else if(tM.p7opt[2]==2){dfs=P7_PMMgetPropValue(fsA,'lineHeight','line-height');dfs=(dfs)?dfs:'normal';P7_PMManimB(tU.id,5,dfs);}
else if(tM.p7opt[2]==3){if(tM.p7opt[1]==1&&tU.pmmlevel==2){dfs=P7_PMMgetPropValue(fsA,'lineHeight','line-height');dfs=(dfs)?dfs:'normal';P7_PMManimB(tU.id,5,dfs);}
else{P7_PMManimA(tU.id,5);}}
else if(tM.p7opt[2]==4){P7_PMManimC(tU.id,-100);}}
else{tD.style.visibility="visible";}}
function P7_PMMtrig(a){var dV;dV=document.getElementById(a.pmmmenu);if(dV.p7PMMtmr){clearTimeout(dV.p7PMMtmr);}
if(a.pmmsub){if(dV.p7opt[8]==1){dV.p7PMMtmr=setTimeout("P7_PMMopen('"+a.id+"')",160);}
else{P7_PMMopen(a.id);}}
else{if(dV.p7opt[8]==1){dV.p7PMMtmr=setTimeout("P7_PMMtoggle('"+a.id+"')",160);}
else{P7_PMMtoggle(a.id);}}}
function P7_PMMtrigclick(a){var i,h,sB,tA,sh;h=a.getAttribute("href");if(h.charAt(h.length-1)=='#'||h.search(/javas/i)==0){sB=document.getElementById(a.pmmsub);tA=sB.getElementsByTagName('A');for(i=0;i<tA.length;i++){sh=tA[i].getAttribute('href');if(sh.charAt(sh.length-1)!='#'&&sh.search(/javas/i)!=0){a.setAttribute('href',sh);break;}}}}
function P7_PMMsetClass(ob,cl){var cc,nc,r=/\s+/g;cc=ob.className;nc=cl;if(cc&&cc.length>0){nc=cc+' '+cl;}
nc=nc.replace(r,' ');ob.className=nc;}
function P7_PMMcurrentMark(el){var j,i,k,wH,cm=false,mt=['',1,'',''],op,r1,k,kk,tA,aU,pp,a,im;;wH=window.location.href;if(el.p7opt[12!=1]){wH=wH.replace(window.location.search,'');}
if(wH.charAt(wH.length-1)=='#'){wH=wH.substring(0,wH.length-1);}
for(k=0;k<p7PMMadv.length;k++){if(p7PMMadv[k][0]&&p7PMMadv[k][0]==el.id){mt=p7PMMadv[k];cm=true;break;}}
op=mt[1];if(op<1){return;}
r1=/index\.[\S]*/i;k=-1,kk=-1;tA=el.getElementsByTagName("A");for(j=0;j<tA.length;j++){aU=tA[j].href.replace(r1,'');if(op>0){if(tA[j].href==wH||aU==wH){k=j;kk=-1;}}
if(op==2){if(tA[j].firstChild){if(tA[j].firstChild.nodeValue==mt[2]){kk=j;}}}
if(op==3&&tA[j].href.indexOf(mt[2])>-1){kk=j;}
if(op==4){for(x=2;x<mt.length;x+=2){if(wH.indexOf(mt[x])>-1){if(tA[j].firstChild&&tA[j].firstChild.nodeValue){if(tA[j].firstChild.nodeValue==mt[x+1]){kk=j;}}}}}}
k=(kk>k)?kk:k;if(k>-1){pp=tA[k].parentNode;while(pp){if(pp.tagName&&pp.tagName=='LI'){P7_PMMsetClass(pp,'li_current_mark');a=pp.getElementsByTagName('A');if(a&&a[0]){P7_PMMsetClass(a[0],'current_mark');if(a[0].hasImg){im=a[0].getElementsByTagName('IMG')[0];im.mark=true;im.src=im.p7imgswap[3];}}}
else{if(pp==el){break;}}
pp=pp.parentNode;}}}
function P7_PMMinit(){var i,j,jj,k,tM,tA,tU,lv,pp,clv,fs,tS,d=1,cl,tp,uh=0,cN,tw,ow,oh;if(p7PMMi){return;}
p7PMMi=true;document.p7PMMpreload=[];for(k=0;k<p7PMMctl.length;k++){tM=document.getElementById(p7PMMctl[k][0]);if(tM){tM.p7opt=p7PMMctl[k];if(navigator.appVersion.indexOf("MSIE 5")>-1){tM.p7opt[2]=0;}
tM.p7PMMtmr=null;tD=tM.getElementsByTagName("DIV");for(i=0;i<tD.length;i++){tD[i].setAttribute("id",tM.id+'d'+(i+2));tD[i].p7state='closed';tD[i].pmmmenu=tM.id;}
tU=tM.getElementsByTagName("UL");for(i=0;i<tU.length;i++){tU[i].setAttribute("id",tM.id+'u'+(i+1));lv=1;pp=tU[i].parentNode;while(pp){if(pp.id&&pp.id==tM.id){break;}
if(pp.tagName&&pp.tagName=="UL"){lv++;}
pp=pp.parentNode;}
tU[i].pmmlevel=lv;clv='level_'+lv;P7_PMMsetClass(tU[i],clv);tN=tU[i].childNodes;if(tN){fs=-1;jj=0;for(j=0;j<tN.length;j++){if(tN[j].tagName&&tN[j].tagName=="LI"){jj++;tA=tN[j].getElementsByTagName("A")[0];if(fs<0){P7_PMMsetClass(tA,'pmmfirst');P7_PMMsetClass(tN[j],'pmmfirst');}
fs=j;tA.setAttribute("id",tM.id+'a'+(d));d++;tA.pmmlevel=lv;tA.pmmdiv=tU[i].parentNode.id;tA.pmmmenu=tM.id;if(i==0){P7_PMMsetClass(tN[j],('root_'+jj));}
tS=tN[j].getElementsByTagName("UL");if(tS&&tS.length>0){tA.pmmsub=tS[0].parentNode.id;tA.onmousedown=function(){P7_PMMtrigclick(this);};if(tM.p7opt[13]==1&&lv==1){P7_PMMsetClass(tA,'trig_closed_up');P7_PMMsetClass(tA.parentNode,'trig_closed_up');}
else if(tM.p7opt[5]==1){P7_PMMsetClass(tA,'trig_closed_left');P7_PMMsetClass(tA.parentNode,'trig_closed_left');}
else{P7_PMMsetClass(tA,'trig_closed');P7_PMMsetClass(tA.parentNode,'trig_closed');}}
else{tA.pmmsub=false;}
tA.onmouseover=function(){P7_PMMtrig(this);};tA.hasImg=false;var sr,x,fnA,fnB,swp,s1,s2,s3;iM=tA.getElementsByTagName("IMG");if(iM&&iM[0]){sr=iM[0].getAttribute("src");swp=tM.p7opt[9];iM[0].pmmswap=swp;x=sr.lastIndexOf(".");fnA=sr.substring(0,x);fnB='.'+sr.substring(x+1);s1=fnA+p7PMMover+fnB;s2=fnA+p7PMMopen+fnB;s3=fnA+p7PMMmark+fnB;if(swp==1){iM[0].p7imgswap=[sr,s1,s1,s1];P7_PMMpreloader(s1);}
else if(swp==2){iM[0].p7imgswap=[sr,s1,s2,s2];P7_PMMpreloader(s1,s2);}
else if(swp==3){iM[0].p7imgswap=[sr,s1,s2,s3];P7_PMMpreloader(s1,s2,s3);}
else{iM[0].p7imgswap=[sr,sr,sr,sr];}
iM[0].p7state='closed';iM[0].mark=false;iM[0].rollover=tM.p7opt[10];if(swp>0){tA.hasImg=true;iM[0].onmouseover=function(){P7_PMMimovr(this);};iM[0].onmouseout=function(){P7_PMMimout(this);};}}}}
if(fs>0){P7_PMMsetClass(tA,'pmmlast');P7_PMMsetClass(tN[fs],'pmmlast');}}}
if(tM.p7opt[6]==1){tw=tM.offsetWidth;oh=tM.offsetHeight;ow=P7_PMMgetPropValue(tU[0],'position','position');tM.style.height=oh+'px';tU[0].style.position="absolute";uh=tU[0].offsetWidth;tU[0].style.position=ow;tM.style.height='auto';uh=(uh>=tw)?tw:uh;tU[0].style.marginLeft=((tw-uh)/2)+'px';}
tM.onmouseout=function(evt){var k,rt,pp,tD,m=true;evt=(evt)?evt:((event)?event:null);if(evt){rt=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(rt){pp=rt.parentNode;while(pp){if(pp&&pp.id&&pp.id.indexOf(this.id)==0){m=false;break;}
pp=pp.parentNode;}}
if(m){if(this.p7PMMtmr){clearTimeout(this.p7PMMtmr);}
if(this.p7opt[8]==1){this.p7PMMtmr=setTimeout("P7_PMMshut('"+this.id+"')",360);}
else{P7_PMMshut(this.id);}}}}
if(tM.p7opt[11]==1){P7_PMMcurrentMark(tM);}}}
p7PMMa=true;}
function P7_PMMaddLoad(){if(window.addEventListener){window.addEventListener("load",P7_PMMinit,false);window.addEventListener("unload",P7_PMMbb,false);}
else if(window.attachEvent){window.attachEvent("onload",P7_PMMinit);}
else{window.onload=P7_PMMinit;}}
P7_PMMaddLoad();function P7_PMMop(){if(!document.getElementById){return;}
p7PMMctl[p7PMMctl.length]=arguments;}
function P7_PMMmark(){p7PMMadv[p7PMMadv.length]=arguments;}
function P7_PMMremClass(ob,cl){var cc,nc,r=/\s+/g;;cc=ob.className;if(cc&&cc.indexOf(cl>-1)){nc=cc.replace(cl,'');nc=nc.replace(r,' ');ob.className=nc;}}
var stockID;var cornerRadius=0;var labelStockColor="FFFFFF";var StockDescription="";var StockImageFileName="";var labelWidth="0";var labelHeight="0";var maxTextLines="0";var maxTextChars=0;var LogoImageFileName="./images/nologo.gif";var GlobalPreview;var onrolls;var onstamps;var onsheets;function toggleLayer(whichLayer,iState)
{if(iState)
{document.getElementById(whichLayer).style.display="";}
else
{document.getElementById(whichLayer).style.display="none";}}
function HideLines(){if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==10||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==11||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==14||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==25||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==26||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==24||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==23||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==29||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==1)
{toggleLayer('Line1',1);toggleLayer('Line2',1);toggleLayer('Line3',1);toggleLayer('Line4',0);toggleLayer('Line5',0);toggleLayer('Line6',0);toggleLayer('Line7',0);toggleLayer('Line8',0);document.SCfrm.L4.value="";document.SCfrm.L5.value="";document.SCfrm.L6.value="";document.SCfrm.L7.value="";document.SCfrm.L8.value="";}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==27)
{toggleLayer('Line1',1);toggleLayer('Line2',1);toggleLayer('Line3',1);toggleLayer('Line4',1);toggleLayer('Line5',0);toggleLayer('Line6',0);toggleLayer('Line7',0);toggleLayer('Line8',0);document.SCfrm.L5.value="";document.SCfrm.L6.value="";document.SCfrm.L7.value="";document.SCfrm.L8.value="";}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==8||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==118)
{toggleLayer('Line1',1);toggleLayer('Line2',1);toggleLayer('Line3',1);toggleLayer('Line4',1);toggleLayer('Line5',1);toggleLayer('Line6',0);toggleLayer('Line7',0);toggleLayer('Line8',0);document.SCfrm.L6.value="";document.SCfrm.L7.value="";document.SCfrm.L8.value="";}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==60)
{toggleLayer('Line1',1);toggleLayer('Line2',1);toggleLayer('Line3',1);toggleLayer('Line4',1);toggleLayer('Line5',1);toggleLayer('Line6',1);toggleLayer('Line7',0);toggleLayer('Line8',0);document.SCfrm.L7.value="";document.SCfrm.L8.value="";}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==21||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==30||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==49||document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==56)
{toggleLayer('Line1',1);toggleLayer('Line2',1);toggleLayer('Line3',1);toggleLayer('Line4',1);toggleLayer('Line5',1);toggleLayer('Line6',1);toggleLayer('Line7',1);toggleLayer('Line8',1);}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value==7)
{toggleLayer('Line1',0);toggleLayer('Line2',0);toggleLayer('Line3',0);toggleLayer('Line4',0);toggleLayer('Line5',0);toggleLayer('Line6',0);toggleLayer('Line7',0);toggleLayer('Line8',0);document.SCfrm.L1.value="";document.SCfrm.L2.value="";document.SCfrm.L3.value="";document.SCfrm.L4.value="";document.SCfrm.L5.value="";document.SCfrm.L6.value="";document.SCfrm.L7.value="";document.SCfrm.L8.value="";}}
function HideShippingLines(form){if(form.selShipping.options[form.selShipping.selectedIndex].value.slice(0,1)<6)
{toggleLayer('CSZ',1);toggleLayer('ShipLine4',0);form.shipto_line_4.value="";}
else
{toggleLayer('CSZ',0);toggleLayer('ShipLine4',1);form.shipto_city.value="";document.checkout_ManualBilling.state.value="";form.shipto_zip.value="";}}
function MaxTextLines(){var q;for(q=0;q<=document.SCfrm.stockcount.value-1;q++)
{if(document.SCfrm.elements["stocks"+q+"00"].value!=null&&document.SCfrm.elements["stocks"+q+"00"].value!='undefined')
{if(document.SCfrm.elements["stocks"+q+"00"].value==document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value)
{return document.SCfrm.elements["stocks"+q+"06"].value;}}}}
function SetStockValues(SID)
{var q;for(q=0;q<=document.SCfrm.stockcount.value-1;q++)
{if(document.SCfrm.elements["stocks"+q+"00"].value!=null&&document.SCfrm.elements["stocks"+q+"00"].value!='undefined')
{if(document.SCfrm.elements["stocks"+q+"00"].value==SID)
{stockID=document.SCfrm.elements["stocks"+q+"00"].value;StockDescription=document.SCfrm.elements["stocks"+q+"01"].value;labelHeight=document.SCfrm.elements["stocks"+q+"02"].value;labelWidth=document.SCfrm.elements["stocks"+q+"03"].value;cornerRadius=document.SCfrm.elements["stocks"+q+"04"].value;StockImageFileName=document.SCfrm.elements["stocks"+q+"05"].value;maxTextLines=document.SCfrm.elements["stocks"+q+"06"].value;maxTextChars=document.SCfrm.elements["stocks"+q+"07"].value;labelStockColor=document.SCfrm.elements["stocks"+q+"08"].value;if(document.SCfrm.elements["stocks"+q+"11"]!=undefined){document.SCfrm.elements.SC_1_LogoID_Add.value=document.SCfrm.elements["stocks"+q+"11"].value;}
break;}}}
if(stockID==81){LogoImageFileName="images/iFlag.gif";document.SCfrm.monogram.selectedIndex=0;document.SCfrm.alignment1[0].checked=true;document.SCfrm.alignment2[0].checked=true;document.SCfrm.alignment3[0].checked=true;document.SCfrm.alignment4[0].checked=true;document.SCfrm.SC_1_RollSize_Add[0].id="200";document.SCfrm.SC_1_RollSize_Add[0].selected=true;document.SCfrm.SC_1_RollSize_Add.options[0].text="200";document.SCfrm.SC_1_RollSize_Add[1].id="400";document.SCfrm.SC_1_RollSize_Add.options[1].text="400";}else if(LogoImageFileName=="images/iFlag.gif"){LogoImageFileName="./images/nologo.gif";document.SCfrm.alignment1[1].checked=true;document.SCfrm.alignment2[1].checked=true;document.SCfrm.alignment3[1].checked=true;document.SCfrm.alignment4[1].checked=true;document.SCfrm.SC_1_RollSize_Add[0].id="250";document.SCfrm.SC_1_RollSize_Add[0].selected=true;document.SCfrm.SC_1_RollSize_Add.options[0].text="250";document.SCfrm.SC_1_RollSize_Add[1].id="500";document.SCfrm.SC_1_RollSize_Add.options[1].text="500";}}
function ischecked(checkbox)
{if(checkbox.checked)
{return 1;}
else
{return 0;}}
function UpdatePreview()
{var aLabelText=[document.SCfrm.elements.L1,document.SCfrm.elements.L2,document.SCfrm.elements.L3,document.SCfrm.elements.L4,document.SCfrm.elements.L5,document.SCfrm.elements.L6,document.SCfrm.elements.L7,document.SCfrm.elements.L8];var aTextColor=[document.SCfrm.textcolor1,document.SCfrm.textcolor2,document.SCfrm.textcolor3,document.SCfrm.textcolor4,document.SCfrm.textcolor5,document.SCfrm.textcolor6,document.SCfrm.textcolor7,document.SCfrm.textcolor8];var aAlignment=[document.SCfrm.alignment1,document.SCfrm.alignment2,document.SCfrm.alignment3,document.SCfrm.alignment4,document.SCfrm.alignment5,document.SCfrm.alignment6,document.SCfrm.alignment7,document.SCfrm.alignment8];var aBold=[document.SCfrm.elements.chkBold1,document.SCfrm.elements.chkBold2,document.SCfrm.elements.chkBold3,document.SCfrm.elements.chkBold4,document.SCfrm.elements.chkBold5,document.SCfrm.elements.chkBold6,document.SCfrm.elements.chkBold7,document.SCfrm.elements.chkBold8];var aUnderline=[document.SCfrm.chkUnderline1,document.SCfrm.chkUnderline2,document.SCfrm.chkUnderline3,document.SCfrm.chkUnderline4,document.SCfrm.chkUnderline5,document.SCfrm.chkUnderline6,document.SCfrm.chkUnderline7,document.SCfrm.chkUnderline8];var aItalics=[document.SCfrm.chkItalic1,document.SCfrm.chkItalic2,document.SCfrm.chkItalic3,document.SCfrm.chkItalic4,document.SCfrm.chkItalic5,document.SCfrm.chkItalic6,document.SCfrm.chkItalic7,document.SCfrm.chkItalic8];var aFont=[document.SCfrm.Font1,document.SCfrm.Font2,document.SCfrm.Font3,document.SCfrm.Font4,document.SCfrm.Font5,document.SCfrm.Font6,document.SCfrm.Font7,document.SCfrm.Font8];var aFontSize=[document.SCfrm.FontSize1,document.SCfrm.FontSize2,document.SCfrm.FontSize3,document.SCfrm.FontSize4,document.SCfrm.FontSize5,document.SCfrm.FontSize6,document.SCfrm.FontSize7,document.SCfrm.FontSize8];var preview,i;if(document.SCfrm.elements.Kind_of_labels!=null){preview="https://www.superiorlabels.com/scottv2.aspx?getImage=True";}
else
{preview="http://www.superiorlabels.com/scottv2.aspx?getImage=True";}
if(document.getElementById("enableAutoZoom")!=null){if(document.SCfrm.elements.enableAutoZoom.checked==true){preview+="&az=1";}}
var MaxLines=MaxTextLines();var StID=0;var tColor="";var strFont="";var strFontSize="";var strItalic="";var strBold="";var strUnderline="";var strAlignment="";StID=document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value;for(i=1;i<=MaxLines;i++)
{var temp=new String(aLabelText[i-1].value);while(temp.search(String.fromCharCode(38))!=-1)
{temp=String(temp).replace(String.fromCharCode(38),'%26');}
while(temp.indexOf("+")>=0)
{var newString=temp.substr(0,temp.indexOf("+"));newString+="%2B";newString+=temp.substr(temp.indexOf("+")+1,temp.length);temp=newString;}
while(temp.search(String.fromCharCode(35))!=-1)
{temp=String(temp).replace(String.fromCharCode(35),'%23');}
while(temp.search(String.fromCharCode(34))!=-1)
{temp=String(temp).replace(String.fromCharCode(34),'%22');}
while(temp.search(String.fromCharCode(60))!=-1)
{temp=String(temp).replace(String.fromCharCode(60),'%3C');}
while(temp.search(String.fromCharCode(62))!=-1)
{temp=String(temp).replace(String.fromCharCode(62),'%3E');}
while(temp.search(String.fromCharCode(39))!=-1)
{temp=String(temp).replace(String.fromCharCode(39),'%27');}
strFont=aFont[i-1].options[aFont[i-1].selectedIndex].value;strFontSize=aFontSize[i-1].options[aFontSize[i-1].selectedIndex].value;strItalic=ischecked(aItalics[i-1]);strBold=ischecked(aBold[i-1]);strUnderline=ischecked(aUnderline[i-1]);strAlignment=getRadioValue(aAlignment[i-1]);if(strFont=='Plain Font')
{strFont='Swis721 BT';}
else if(strFont=='Script Font')
{strFont='CenturyExpd BT';strItalic='1';strFontSize='9';}
tColor=aTextColor[i-1].options[aTextColor[i-1].selectedIndex].value;if(StID==122){tColor="Gold";}
preview+="&t"+i+"="+temp+"&fn"+i+"="+strFont+"&fs"+i+"="+strFontSize+"&ha"+i+"="+strAlignment+"&fc"+i+"="+tColor+"&fb"+i+"="+strBold+"&fi"+i+"="+strItalic+"&fu"+i+"="+strUnderline;}
preview+="&BackColor="+labelStockColor+"&pic="+LogoImageFileName+"&TextWidth="+labelWidth+"&TextHeight="+labelHeight+"&mtl="+MaxLines+"&cr="+cornerRadius;document.getElementById('labelpreview').src=preview;GlobalPreview=preview;}
function StyleString()
{var aAlignment=[document.SCfrm.alignment1,document.SCfrm.alignment2,document.SCfrm.alignment3,document.SCfrm.alignment4,document.SCfrm.alignment5,document.SCfrm.alignment6,document.SCfrm.alignment7,document.SCfrm.alignment8];var aBold=[document.SCfrm.elements.chkBold1,document.SCfrm.elements.chkBold2,document.SCfrm.elements.chkBold3,document.SCfrm.elements.chkBold4,document.SCfrm.elements.chkBold5,document.SCfrm.elements.chkBold6,document.SCfrm.elements.chkBold7,document.SCfrm.elements.chkBold8];var aUnderline=[document.SCfrm.chkUnderline1,document.SCfrm.chkUnderline2,document.SCfrm.chkUnderline3,document.SCfrm.chkUnderline4,document.SCfrm.chkUnderline5,document.SCfrm.chkUnderline6,document.SCfrm.chkUnderline7,document.SCfrm.chkUnderline8];var aItalics=[document.SCfrm.chkItalic1,document.SCfrm.chkItalic2,document.SCfrm.chkItalic3,document.SCfrm.chkItalic4,document.SCfrm.chkItalic5,document.SCfrm.chkItalic6,document.SCfrm.chkItalic7,document.SCfrm.chkItalic8];var output="",i;for(i=1;i<9;i++)
{output+=getRadioValue(aAlignment[i-1]).slice(0,1);if(aBold[i-1].checked){output+=";"+"B";}
if(aItalics[i-1].checked){output+=";"+"I";}
if(aUnderline[i-1].checked){output+=";"+"U";}
if(i<8){output+="|SL|";}}
return output;}
function ColorString()
{var aTextColor=[document.SCfrm.textcolor1,document.SCfrm.textcolor2,document.SCfrm.textcolor3,document.SCfrm.textcolor4,document.SCfrm.textcolor5,document.SCfrm.textcolor6,document.SCfrm.textcolor7,document.SCfrm.textcolor8];var output="",i;for(i=1;i<9;i++)
{output+=aTextColor[i-1].options[aTextColor[i-1].selectedIndex].value;if(i<8){output+="|SL|";}}
return output;}
function FontString()
{var aFont=[document.SCfrm.Font1,document.SCfrm.Font2,document.SCfrm.Font3,document.SCfrm.Font4,document.SCfrm.Font5,document.SCfrm.Font6,document.SCfrm.Font7,document.SCfrm.Font8],i;var output="";for(i=1;i<9;i++)
{output+=aFont[i-1].options[aFont[i-1].selectedIndex].value;if(i<8){output+="|SL|";}}
return output;}
function FontSizeString()
{var aFontSize=[document.SCfrm.FontSize1,document.SCfrm.FontSize2,document.SCfrm.FontSize3,document.SCfrm.FontSize4,document.SCfrm.FontSize5,document.SCfrm.FontSize6,document.SCfrm.FontSize7,document.SCfrm.FontSize8],i;var output="";for(i=1;i<9;i++)
{output+=aFontSize[i-1].options[aFontSize[i-1].selectedIndex].value;if(i<8){output+="|SL|";}}
return output;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function FillHidden()
{var w;var h;var img=MM_findObj('labelpreview');w=img.width;h=img.height;if(document.getElementById("enableAutoZoom")!=null){if(document.SCfrm.elements.enableAutoZoom.checked==true){document.SCfrm.elements.SC_1_autozoom_Add.value="1";}else{document.SCfrm.elements.SC_1_autozoom_Add.value="0";}}
document.SCfrm.elements.SC_1_preview_Add.value=GlobalPreview+"|SL|"+w+"|SL|"+h;document.SCfrm.elements.SC_1_Font_Add.value=FontString();document.SCfrm.elements.SC_1_FontSize_Add.value=FontSizeString();document.SCfrm.elements.SC_1_textcolor_Add.value=ColorString();if(document.SCfrm.elements.monogram!=undefined)
{if(document.SCfrm.monogram.options[document.SCfrm.monogram.selectedIndex].value!="")
{document.SCfrm.elements.SC_1_Styles_Add.value="L|SL|L|SL|L|SL|L|SL|L|SL|L|SL|L|SL|L";}
else
{document.SCfrm.elements.SC_1_Styles_Add.value="C|SL|C|SL|C|SL|C|SL|C|SL|C|SL|C|SL|C";}}
else
{document.SCfrm.elements.SC_1_Styles_Add.value=StyleString();}
document.SCfrm.elements.SC_1_Total_Add.value=document.SCfrm.elements.TotalPrice.value;var maxlines=MaxTextLines();for(w=1;w<9;w++)
{if(w>maxlines){document.SCfrm.elements["L"+w].value="";}}
var q;for(q=0;q<=document.SCfrm.stockcount.value-1;q++)
{if(document.SCfrm.elements["stocks"+q+"00"].value!=null&&document.SCfrm.elements["stocks"+q+"00"].value!='undefined')
{if(document.SCfrm.elements["stocks"+q+"00"].value==document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value)
{if(document.getElementById("RollSize")==null){document.SCfrm.elements.SC_1_Name_Add.value=document.SCfrm.elements["stocks"+q+"01"].value;}}}}}
function StockUpcharge(form){var q;for(q=0;q<=form.stockcount.value-1;q++)
{if(form.elements["stocks"+q+"00"].value!=null&&form.elements["stocks"+q+"00"].value!='undefined')
{if(form.elements["stocks"+q+"00"].value==form.SC_1_StockID_Add.options[form.SC_1_StockID_Add.selectedIndex].value)
{return form.elements["stocks"+q+"10"].value;}}}}
function ColorCost(){var cost="0";var i;for(i=1;i<9;i++)
{if(document.SCfrm.elements["textcolor"+i].value!="Black"){cost=".25";break;}}
return cost;}
function TotalCost(form){var a,b,c,e,d;form.SC_1_textcolorcost_Add.value=ColorCost();a=eval(form.SC_1_Price_Add.value);b=eval(form.SC_1_textcolorcost_Add.value);c=eval(form.SC_1_Quantity_Add.options[form.SC_1_Quantity_Add.selectedIndex].value);e=eval(StockUpcharge(form));if(form.customclearupcharge!=null){e=e*2;}
d=(a+b+e)*c;form.SC_1_Total_Add.value=d;form.TotalPrice.value=d;form.SC_1_perpagecost_Add.value=a+b+e;}
function formatAsMoney(mnt){mnt-=0;mnt=(Math.round(mnt*100))/100;return(mnt==Math.floor(mnt))?mnt+'.00':((mnt*10==Math.floor(mnt*10))?mnt+'0':mnt);}
function TotalCostStamps(quantity){var a,c,d;var temp=quantity;quantity=quantity.replace(/[^0-9]/g,'');if(quantity!=""){if(quantity.charAt(0)=="0"){quantity=quantity.substring(1,quantity.length);}}
if(quantity==""||quantity<1){quantity=1;}
if(quantity!=temp&&temp!=""){document.SCfrm.SC_1_Quantity_Add.value=quantity;}
else if(quantity!=temp&&temp==""){quantity=0;}
a=eval(document.SCfrm.SC_1_Price_Add.value);c=eval(quantity);d=formatAsMoney(Math.round((a*c)*100)/100);document.SCfrm.SC_1_Total_Add.value=d;document.SCfrm.TotalPrice.value=d;document.SCfrm.SC_1_perpagecost_Add.value=a;}
function TotalCostCustomNoTextColorCost(form)
{var a,b,c,e,d;form.SC_1_textcolorcost_Add.value=ColorCost();form.SC_1_textcolorcost_Add.value="0";a=eval(form.SC_1_Price_Add.value);b=eval(form.SC_1_textcolorcost_Add.value);c=eval(form.SC_1_Quantity_Add.options[form.SC_1_Quantity_Add.selectedIndex].value);e=eval(StockUpcharge(form));if(form.customclearupcharge!=null){e=e*2;}
d=(a+e)*c;form.SC_1_Total_Add.value=d;form.TotalPrice.value=d;form.SC_1_perpagecost_Add.value=a+b+e;}
function ColorCostRollGFX(){var cost="0";var i;for(i=1;i<9;i++)
{if(document.SCfrm.elements["textcolor"+i].value!="Black"){cost="3";break;}}
return cost;}
function BrowserCheck(string)
{var detect=navigator.userAgent.toLowerCase();var place=detect.indexOf(string)+1;return place;}
function HideDropDown()
{if(BrowserCheck('msie'))
{if(document.getElementById("StockSelect")!=null)
{document.getElementById("StockSelect").style.visibility="hidden";}}}
function ShowDropDown()
{if(BrowserCheck('msie'))
{if(document.getElementById("StockSelect")!=null)
{document.getElementById("StockSelect").style.visibility="visible";}}}
function chooseMonogram(form,source){if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value=="81"&&source=="monogram"){alert("Monograms are not available on the American flag label stock");form.monogram.selectedIndex=0;return false;}
else if(document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value=="81"&&source=="StockID"){form.monogram.selectedIndex=0;return false;}
var s;if(form.monogram.selectedIndex==0){LogoImageFileName="./images/nologo.gif";for(s=0;s<=document.SCfrm.stockcount.value-1;s++)
{if(document.SCfrm.elements["stocks"+s+"00"].value!=null&&document.SCfrm.elements["stocks"+s+"00"].value!='undefined')
{if(document.SCfrm.elements["stocks"+s+"00"].value==document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value)
{form.SC_1_LogoID_Add.value=document.SCfrm.elements["stocks"+s+"11"].value;document.SCfrm.SC_1_Description_Add.value="";break;}}}}
else
{form.SC_1_LogoID_Add.value=form.monogram[form.monogram.selectedIndex].value;}
for(s=0;s<=document.SCfrm.logocount.value-1;s++)
{if(document.SCfrm.elements["images"+s+"02"].value!=null&&document.SCfrm.elements["images"+s+"02"].value!='undefined')
{if(document.SCfrm.elements["images"+s+"02"].value==document.SCfrm.monogram.options[document.SCfrm.monogram.selectedIndex].value)
{LogoImageFileName=document.SCfrm.elements["images"+s+"07"].value;var nog;nog=document.SCfrm.elements["images"+s+"05"].value.split(" - ");document.SCfrm.SC_1_Description_Add.value=nog[0];break;}}}
var rd=form.addDispenser.checked,d;if(rd){d=d+1;switch(form.SC_1_LogoID_Add.value){case"31008":form.SC_1_LogoID_Add.value="94177";break;case"31009":form.SC_1_LogoID_Add.value="94178";break;case"31010":form.SC_1_LogoID_Add.value="94179";break;case"31011":form.SC_1_LogoID_Add.value="94180";break;case"31012":form.SC_1_LogoID_Add.value="94181";break;case"99858":form.SC_1_LogoID_Add.value="99859";break;case"99860":form.SC_1_LogoID_Add.value="100668";break;case"99861":form.SC_1_LogoID_Add.value="100669";break;case"99862":form.SC_1_LogoID_Add.value="100670";break;case"99863":form.SC_1_LogoID_Add.value="100671";break;case"99864":form.SC_1_LogoID_Add.value="100672";break;case"99865":form.SC_1_LogoID_Add.value="100673";break;case"99866":form.SC_1_LogoID_Add.value="100674";break;case"99867":form.SC_1_LogoID_Add.value="100675";break;case"99868":form.SC_1_LogoID_Add.value="100676";break;case"99869":form.SC_1_LogoID_Add.value="100677";break;case"99870":form.SC_1_LogoID_Add.value="100678";break;case"99871":form.SC_1_LogoID_Add.value="100679";break;case"99872":form.SC_1_LogoID_Add.value="100680";break;case"99873":form.SC_1_LogoID_Add.value="100681";break;case"99874":form.SC_1_LogoID_Add.value="100682";break;case"99875":form.SC_1_LogoID_Add.value="100683";break;case"99876":form.SC_1_LogoID_Add.value="100684";break;case"99877":form.SC_1_LogoID_Add.value="100685";break;case"99878":form.SC_1_LogoID_Add.value="100686";break;case"99879":form.SC_1_LogoID_Add.value="100687";break;case"99880":form.SC_1_LogoID_Add.value="100688";break;case"99881":form.SC_1_LogoID_Add.value="100689";break;case"99882":form.SC_1_LogoID_Add.value="100690";break;case"99883":form.SC_1_LogoID_Add.value="100691";break;case"99884":form.SC_1_LogoID_Add.value="100692";break;case"99885":form.SC_1_LogoID_Add.value="100693";break;}}}
function SetStampTextcolor(index){var i=1;for(i=1;i<9;i++)
{document.SCfrm.elements["textcolor"+i].value=index;}}
function SetRollFont(index){var i=1;for(i=1;i<9;i++)
{document.SCfrm.elements["Font"+i].value=index;}}
function SetImage(image){LogoImageFileName=image;}
function GetMaxCharacter(){var q;for(q=0;q<=document.SCfrm.stockcount.value-1;q++)
{if(document.SCfrm.elements["stocks"+q+"00"].value!=null&&document.SCfrm.elements["stocks"+q+"00"].value!='undefined')
{if(document.SCfrm.elements["stocks"+q+"00"].value==document.SCfrm.SC_1_StockID_Add.options[document.SCfrm.SC_1_StockID_Add.selectedIndex].value)
{if(document.SCfrm.elements["stocks"+q+"07"].value!=null&&document.SCfrm.elements["stocks"+q+"07"].value!='undefined')
{return document.SCfrm.elements["stocks"+q+"07"].value;}
else
{return"0";}}}}}
function MeasureTextLines(){var maxtext=GetMaxCharacter();if(maxtext>0){for(var i=1;i<9;i++)
{if(document.SCfrm.elements["L"+i].value.length>maxtext)
{alert("Line "+i+" has too many characters. This label type only allows "+maxtext+" characters per line.");return false;}}}
return true;}
function ChangeFontNameText(id,value)
{document.getElementById(id).innerHTML=value;if(id=="FontNameEZ")
{for(var i=1;i<=8;i++)
{if(document.getElementById('FontNameL'+i)!=null)
{document.getElementById('FontNameL'+i).innerHTML=value;}}}}
function whichDiv(e)
{var target=e?e.target:event.srcElement;if(target.id=='FontListEZ'||target.id=='FontNameEZ')
{if(document.getElementById('dropdownEZ').style.display=="none")
{document.getElementById('dropdownEZ').style.display="";document.getElementById('dropdownEZ').focus();}
else
{document.getElementById('dropdownEZ').style.display="none";}}
else
{if(document.getElementById('dropdownEZ')!=null)
{document.getElementById('dropdownEZ').style.display="none";}}
for(var i=1;i<=8;i++)
{if(target.id=='FontListL'+i||target.id=='FontNameL'+i)
{if(document.getElementById('dropdownL'+i).style.display=="none")
{document.getElementById('dropdownL'+i).style.display="";document.getElementById('dropdownL'+i).focus();}
else
{document.getElementById('dropdownL'+i).style.display="none";}}
else
{if(document.getElementById('dropdownL'+i)!=null)
{document.getElementById('dropdownL'+i).style.display="none";}}}
if(target.id=='dropdownEZ')
{document.getElementById('dropdownEZ').style.display="";}}
document.onclick = whichDiv;
function changeFontValue(value,element)
{document.SCfrm.elements[element].value=value;var chkbx;switch(element){case"Font1":chkbx="chkBold1";break;case"Font2":chkbx="chkBold2";break;case"Font3":chkbx="chkBold3";break;case"Font4":chkbx="chkBold4";break;case"Font5":chkbx="chkBold5";break;case"Font6":chkbx="chkBold6";break;case"Font7":chkbx="chkBold7";break;case"Font8":chkbx="chkBold8";break;}
eval("document.SCfrm."+chkbx+".disabled = false");}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function MM_setTextOfTextfield(objName,x,newText){var obj=MM_findObj(objName);if(obj)obj.value=newText;}
function MM_goToURL(){var i,args=MM_goToURL.arguments;document.MM_returnValue=false;for(i=0;i<(args.length-1);i+=2)eval(args[i]+".location='"+args[i+1]+"'");}
function MM_validateForm(){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=MM_findObj(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- '+nm+' must contain an e-mail address.\n';}else if(test!='R'){if(isNaN(val))errors+='- '+nm+' must contain a number.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(val<min||max<val)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' is required.\n';}}if(errors)alert('The following error(s) occurred:\n'+errors);document.MM_returnValue=(errors=='');}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function walkTheDOM(node,func){func(node);node=node.firstChild;while(node){walkTheDOM(node,func);node=node.nextSibling;}}
function getElementsByClassName(node,className){var results=[];if(node.getElementsByClassName){return node.getElementsByClassName(className);}else{walkTheDOM(document.body,function(node){var a=[],c=node.className,i=0;if(c){a=c.split(' ');for(i;i<a.length;i+=1){if(a[i]===className){results.push(node);break;}}}});}
return results;}
function rllOvr(el){el.onmouseover=function(){el.style.backgroundPosition='bottom';};el.onmouseout=function(){el.style.backgroundPosition='top';};}
function rOBttns(){var doc=document.body,btns=getElementsByClassName(doc,'bttns'),i=0;if(btns){for(i;i<btns.length;i+=1){rllOvr(btns[i]);}}}
function trstGrd(year){var trust=document.getElementById('trustlink');if(trust){trust.onclick=function(){var nonwin=navigator.appName!=='Microsoft Internet Explorer'?'yes':'no';window.open(this.href.replace('http','https'),'welcome','location='+nonwin+',scrollbars=yes,width=517,height='+screen.availHeight+',menubar=no,toolbar=no');return false;};trust.oncontextmenu=function(){alert('Copying Prohibited by Law - This image and all included logos are copyrighted by trust-guard\u00A9'+year+'.');return false;};}}
function contactCursor(){var copyright=new Date(),update=copyright.getFullYear();rOBttns();trstGrd(update);document.getElementById('present').innerHTML=update;document.body.style.cursor='default';}
function getCV(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function getCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getCV(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return"";}
function setCookie(name,value)
{document.cookie=name+"="+escape(value)+
((this.expires=="")?"":("; expires="+this.expires))+
((this.path=="")?"":("; path="+this.path))+
((this.domain=="")?"":("; domain="+this.domain))+
((this.secure==true)?"; secure":"");}
function deleteCookie(name){document.cookie=name+"="+""+"; expires=Thu,01-Jan-70 00:00:01 GMT";}
function CookieDef(expires,path,domain,secure)
{this.secure=secure;this.path=path;this.domain=domain;this.getValue=getCookie;this.setValue=setCookie;this.expire=deleteCookie;if(expires==0){this.expires="";}else{var today_date=new Date();var expire_seconds=today_date.getTime()+(expires*24*60*60*1000);today_date.setTime(expire_seconds);this.expires=today_date.toGMTString();}}
function WA_setCookie(cookieobj,cookiename,cookievalue,cookiecheck,settype){var theValue="";if(settype==1){for(var n=0;n<cookievalue.length;n++){if(cookievalue[n].checked){theValue=cookievalue[n].value;}}}
else if(settype==2){for(var n=0;n<cookievalue.options.length;n++){if(cookievalue.options[n].selected){if(theValue!="")
theValue+=", ";theValue+=cookievalue.options[n].value;}}}
else{theValue=cookievalue}
if(cookiecheck){cookieobj.setValue(cookiename,theValue);}}
function WA_decodeCookieSelectVal(theVal){theVal=theVal.replace(/\|WACS\|/g,", ");return theVal;}
function WA_checkCookieSelectOption(theList,theOption,theVal){var testVal="";if(theList.options[theOption].value){testVal=theList.options[theOption].value;}
else{testVal=theList.options[theOption].text;}
if(testVal==WA_decodeCookieSelectVal(theVal)){theList.options[theOption].selected=true;return true;}
return false;}
function WA_getCookie(cookieobj,cookiename,cookieset,settype){var theValue=cookieobj.getValue(cookiename);if(settype==1){cookieset.value=theValue;}
else if(settype==2){cookieset.checked=(String(theValue)!=""&&String(theValue).toUpperCase()!="FALSE");}
else if(settype==3){for(var n=0;n<cookieset.length;n++){if(cookieset[n].value==theValue){cookieset[n].checked=true;break;}}}
else if(settype==4){var setArr=theValue.split(", ");for(var m=0;m<setArr.length;m++){for(var n=0;n<cookieset.options.length;n++){if(n+m<cookieset.options.length&&cookieset.options[n+m]){if(WA_checkCookieSelectOption(cookieset,n+m,setArr[m])){break;}}
if(n!=0&&n-m>=0&&cookieset.options[n-m]){if(WA_checkCookieSelectOption(cookieset,n-m,setArr[m])){break;}}
if(n-m<0&&n+m>=cookieset.options.length){break;}}}}}
function P7_setPM(){var i,d='',h="<sty"+"le type=\"text/css\">",tA=navigator.userAgent.toLowerCase();if(window.opera){if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}if(document.getElementById){for(i=1;i<4;i++){d+='ul ';h+="\n#v4-DropDowns "+d+"{position:absolute;left:-9000px;}";}
document.write(h+"\n<"+"/sty"+"le>");}}P7_setPM();function P7_PMhide(u){var i,tt,ua;u.p7pmax=0;u.className="p7PMhide";ua=u.parentNode.firstChild;ua.className=ua.className.replace("p7PMon","p7PMtrg");}
function P7_PMtg(a,b){var i,u,tA,tU,pp;tA=p7PMct[a];pp=tA.parentNode;while(pp){if(pp.tagName=="UL"){break;}pp=pp.parentNode;}if(pp){tU=pp.getElementsByTagName("UL");for(i=tU.length-1;i>-1;i--){if(b!=1&&tA.p7PMsub==tU[i]){continue;}else{P7_PMhide(tU[i]);}}}}
function P7_PMtrig(a){var b,t;if(document.p7PMt){clearTimeout(document.p7PMt);}document.p7PMa=1;b=(a.p7PMsub)?'P7_PMshow(':'P7_PMtg(';t='document.p7PMt=setTimeout("'+b+a.p7PMcl+')",160)';eval(t);}
function P7_PMclose(evt){var pp,st,tS,m=true;evt=(evt)?evt:((event)?event:null);st=document.p7PMa;if(st!=-1){if(evt){tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(tS){pp=tS.parentNode;while(pp){if(pp&&pp.id&&pp.id=="v4-DropDowns"){m=false;document.p7PMa=1;break;}pp=pp.parentNode;}}if(m){document.p7PMa=-1;if(document.p7PMt){clearTimeout(document.p7PMt);}
document.p7PMt=setTimeout("P7_PMclr()",360);}}}}
function P7_PMadma(){var s,ss,i,j,a,g,b,c,d,t,h,tA,b,tP,r1,r2,tI,bA,aA,tB=new Array(),bC='',x=0,ur=1,mt=document.p7PMad;g=document.getElementById("v4-DropDowns");b=document.getElementById("pmmcrumb");if(g&&b){c=b.getElementsByTagName("A");if(c&&c[0]){tP=c[0].parentNode.childNodes;r1=/<a/i;r2=/\/a>/i;tI=c[0].parentNode.innerHTML;j=tI.search(r1);bA=tI.substring(0,j);j=tI.search(r2);aA=tI.substring(j+3);bC+=(bA)?bA:'';s=(aA)?aA:' > ';if(!c[0].id||c[0].id!="pmmcn"){if(c[0].href!=window.location.href){tB[0]=c[0];x++;ur=2;}}tA=g.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].className.indexOf("p7PMmark")>-1){tB[x]=tA[i];x++;}}for(i=0;i<tB.length;i++){ss=(i>0)?s:'';a=(i==tB.length-1)?0:1;d=(i==0&&c[0].id)?'id="'+c[0].id+'" ':' ';t=tB[i].firstChild.nodeValue;if(a==1||mt==1||x<ur){bC+=ss+'<a '+d+'hr'+'ef="'+tB[i].href+'">'+t+'</a>';}else{bC+=ss+t;}}if(mt==1||i<ur){ss=(i>0)?s:'';bC+=ss+document.title;}c[0].parentNode.innerHTML=bC;}}}
function P7_PMadmb(){var h='',g,i,tA,b,m=false;g=document.getElementById("v4-DropDowns");b=document.getElementById("pmmnext");if(g&&b){tA=g.getElementsByTagName("A");for(i=tA.length-1;i>-1;i--){if(tA[i].className.indexOf("p7PMmark")>-1){m=true;break;}}if(m){if(i<tA.length-1){i++;}else{i=0;}
while(tA[i].href==window.location.href+"#"||tA[i].href=="javascript:;"){i++;if(i>tA.length-1){i=0;break;}}b.href=tA[i].href;b.innerHTML=tA[i].firstChild.nodeValue;}}}
function P7_PMopen(){var i,x,tA,op,pp,wH,tA,aU,r1,k=-1,kk=-1,mt=new Array(1,'','');if(document.p7PMop){mt=document.p7PMop;}op=mt[0];if(op<1){return;}
tA=document.getElementById('v4-DropDowns').getElementsByTagName("A");wH=window.location.href;r1=/index\.[\S]*/i;for(i=0;i<tA.length;i++){if(tA[i].href){aU=tA[i].href.replace(r1,'');if(op>0){if(tA[i].href==wH||aU==wH){k=i;kk=-1;break;}}if(op==2){if(tA[i].firstChild){if(tA[i].firstChild.nodeValue==mt[1]){kk=i;}}}if(op==3&&tA[i].href.indexOf(mt[1])>-1){kk=i;}if(op==4){for(x=1;x<mt.length;x+=2){if(wH.indexOf(mt[x])>-1){if(tA[i].firstChild&&tA[i].firstChild.data){if(tA[i].firstChild.data==mt[x+1]){kk=i;break;}}}}}}}k=(kk>k)?kk:k;if(k>-1){pp=tA[k].parentNode;while(pp){if(pp.nodeName=="LI"){pp.firstChild.className="p7PMmark"+" "+pp.firstChild.className;}
pp=pp.parentNode;}}if(kk>-1){document.p7PMad=1;}P7_PMadma();P7_PMadmb();}
function p7_initpm(){var i,g,tD,tA,tU,pp,lvl,tn=navigator.userAgent.toLowerCase();if(window.opera){if(tn.indexOf("opera 5")>-1||tn.indexOf("opera 6")>-1){return;}}else if(!document.getElementById){return;}
p7PMp=arguments;p7PMct=new Array;tD=document.getElementById('v4-DropDowns');if(tD){tA=tD.getElementsByTagName('A');for(i=0;i<tA.length;i++){tA[i].p7PMcl=p7PMct.length;p7PMct[p7PMct.length]=tA[i];g=tA[i].parentNode.getElementsByTagName("UL");tA[i].p7PMsub=(g)?g[0]:false;ev=tA[i].getAttribute("onmouseover");if(!ev||ev=='undefined'){tA[i].onmouseover=function(){P7_PMtrig(this);};}ev=tA[i].getAttribute("onfocus");if(!ev||ev=='undefined'){tA[i].onfocus=function(){P7_PMtrig(this);};}
if(tA[i].p7PMsub){pp=tA[i].parentNode;lvl=0;while(pp){if(pp.tagName&&pp.tagName=="UL"){lvl++;}pp=pp.parentNode;}
tA[i].p7PMlv=lvl;}}tD.onmouseout=P7_PMclose;P7_PMopen();}}
function P7_PManim(a,st){var g=p7PMct[a].p7PMsub,sp=30,inc=20;st=(st>=100)?100:st;g.style.fontSize=st+"%";if(st<100){st+=inc;setTimeout("P7_PManim("+a+","+st+")",sp);}}
function P7_PMshow(a,bp){var u,lv,oft,ofr,uw,uh,pp,aw,ah,adj,mR,mT,wW=0,wH,w1,w2,w3,sct,pw,lc,pwv,xx=0,yy=0,wP=true;var iem=(navigator.appVersion.indexOf("MSIE 5")>-1)?true:false,dce=document.documentElement,dby=document.body;document.p7PMa=1;if(!bp){P7_PMtg(a);}u=p7PMct[a].p7PMsub;if(u.p7pmax&&u.p7pmax==1){return;}u.p7pmax=1;lv=(p7PMp[0]==1&&p7PMct[a].p7PMlv==1)?true:false;p7PMct[a].className=p7PMct[a].className.replace("p7PMtrg","p7PMon");oft=parseInt(p7PMp[3]);ofr=parseInt(p7PMp[4]);uw=u.offsetWidth;uh=u.offsetHeight;pp=p7PMct[a];aw=pp.offsetWidth;ah=pp.offsetHeight;while(pp){xx+=(pp.offsetLeft)?pp.offsetLeft:0;yy+=(pp.offsetTop)?pp.offsetTop:0;if(window.opera||navigator.userAgent.indexOf("Safari")>-1){if(p7PMct[a].p7PMlv!=1&&pp.nodeName=="BODY"){yy-=(pp.offsetTop)?pp.offsetTop:0;}}pp=pp.offsetParent;}
if(iem&&navigator.userAgent.indexOf("Mac")>-1){yy+=parseInt(dby.currentStyle.marginTop);}adj=parseInt((aw*ofr)/100);mR=(lv)?0:aw-adj;adj=parseInt((ah*oft)/100);mT=(lv)?0:(ah-adj)*-1;w3=dby.parentNode.scrollLeft;if(!w3){w3=dby.scrollLeft;}w3=(w3)?w3:0;if(dce&&dce.clientWidth){wW=dce.clientWidth+w3;}else if(dby){wW=dby.clientWidth+w3;}if(!wW){wW=0;wP=false;}wH=window.innerHeight;if(!wH){wH=dce.clientHeight;if(!wH||wH<=0){wH=dby.clientHeight;}}sct=dby.parentNode.scrollTop;if(!sct){sct=dby.scrollTop;if(!sct){sct=window.scrollY?window.scrollY:0;}}pw=xx+mR+uw;if(pw>wW&&wP){mR=uw*-1;mR+=10;if(lv){mR=(wW-xx)-uw;}}lc=xx+mR;if(lc<0){mR=xx*-1;}
pw=yy+uh+ah+mT-sct;pwv=wH-pw;if(pwv<0){mT+=pwv;if(uh>wH){mT=(yy+ah-sct)*-1;}}u.style.marginLeft=mR+'px';u.style.marginTop=mT+'px';if(p7PMp[2]==1){if(!iem){P7_PManim(a,20);}}u.className="p7PMshow";}
function P7_PMclr(){var i,tU,tUU;document.p7PMa=-1;tU=document.getElementById('v4-DropDowns');if(tU){tUU=tU.getElementsByTagName("UL");if(tUU){for(i=tUU.length-1;i>-1;i--){P7_PMhide(tUU[i]);}}}
ShowDropDown();}
function P7_PMmark(){document.p7PMop=arguments;}
