if(typeof _STNS=="undefined"){if(!Array.prototype.push){Array.prototype.push=function(){for(var b=0;b<arguments.length;b++){this[this.length]=arguments[b]}return this.length}}if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length){var b=this[this.length-1];this.length--;return b}}}if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length){var c=this[0];for(var b=0;b<this.length-1;b++){this[b]=this[b+1]}this.length--;return c}}}if(!Function.prototype.call){Function.prototype.call=function(c){var c=c||window;c.__tmp=this;var b=c.__tmp(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10]);c.__tmp=null;return b}}_STNS={sVer:"3.0",bDebug:false,fvThrow:function(b){},bBufImg:true,oImgs:{},fvBufImgs:function(){if(!_STNS.bBufImg){return}if(!_STNS.bLoaded){var c="";for(var b in _STNS.oImgs){if(_STNS.oImgs[b]!=2){c+=_STNS.fsGetTag("div",'style="display:none"',_STNS.fsGetImgTag(b,-1,-1))}_STNS.oImgs[b]=2}document.write(c)}},bIsIE:false,bIsMIE:false,bIsFX:false,bIsOP:false,bIsSF:false,bIsKQ:false,oNav:null,bRTL:false,sDocMd:null,sURL:window.location.href+"",sDIR:null,bLocal:false,fsGetDocMd:function(b){var b=b||window;switch(b.document.compatMode){case"QuirksMode":case"BackCompat":return"quirks";case"CSS1Compat":return"css1";default:return document.compatMode}},_foGetNav:function(){var d=navigator,f=d.userAgent,e=d.appName,b=d.platform,h,c,g;if(/(Opera)[ \/]([\d\.]+)/.test(f)||/(Netscape)\d*\/([\d\.]+)/.test(f)||/(MSIE) ([\d\.]+)/.test(f)||/(Safari)\/([\d\.]+)/.test(f)||/(Konqueror)\/([\d\.]+)/.test(f)||/(Gecko)\/(\d+)/.test(f)){h=RegExp.$1.toLowerCase();c=RegExp.$2}else{if(e=="Netscape"&&d.appVersion.charAt(0)=="4"){h="netscape4";c=parseFloat(d.appVersion)}else{h="unknow";c=0}}if(h=="netscape"){switch(e){case"Microsoft Internet Explorer":h="msie";c=/(MSIE) ([\d\.]+)/.exec(f)[2];break;case"Netscape":h="gecko";c=/(Gecko)\/(\d+)/.exec(f)[2]}}if(/^(Win)/.test(b)||/^(Mac)/.test(b)||/^(SunOS)/.test(b)||/^(Linux)/.test(b)||/^(Unix)/.test(b)){g=RegExp.$1.toLowerCase()}else{g=b}return{name:h,version:c,platform:g}},fiGetCT:function(b){var b=b||window;if(_STNS.bIsIE){return(_STNS.fsGetDocMd(b)=="css1"?b.document.documentElement:b.document.body).scrollTop}else{return b.pageYOffset}},fiGetCL:function(b){var b=b||window;if(_STNS.bIsIE){return(_STNS.fsGetDocMd(b)=="css1"?b.document.documentElement:b.document.body).scrollLeft}else{return b.pageXOffset}},fiGetCW:function(b){var b=b||window;if(_STNS.bIsIE){return(_STNS.fsGetDocMd(b)=="css1"?b.document.documentElement:b.document.body).clientWidth}else{if(b.scrollbars&&b.scrollbars.visible||b.innerHeight<document.documentElement.offsetHeight){return b.innerWidth-20}}return b.innerWidth},fiGetCH:function(b){var b=b||window;if(_STNS.bIsIE){return(_STNS.fsGetDocMd(b)=="css1"?b.document.documentElement:b.document.body).clientHeight}else{if(b.scrollbars&&b.scrollbars.visible||b.innerWidth<document.documentElement.offsetWidth){return b.innerHeight-20}}return b.innerHeight},foGetMediaInfor:function(b){_STNS.fvThrow(new Error("_STNS.runTime error:call foGetMediaInfor that has not been implemented"))},oLibs:{},sLibPth:"",fvInitLib:function(){var f,j,e,d,b,h;if(_STNS.bIsFX&&!_STNS.faGetElesByTagName("body").length){var g=_STNS.faGetElesByTagName("head");j=g[0].lastChild}else{f=_STNS.faGetElesByTagName("script");j=f[f.length-1]}if(j){e=j.src}if(e){_STNS.sLibPth=e.substr(0,e.lastIndexOf("/")+1);d=_STNS.fcoGetAttribute(j,"sothinkdebug");if(d=="true"){h=_STNS.fsGetAbsPth(_STNS.sLibPth+"debug/stdebug.js");if(!_STNS.oLibs[h]){_STNS.oLibs[h]={state:1,defer:0}}}d=_STNS.fcoGetAttribute(j,"sothinklib");if(d){b=d.split(";");for(var c=0;c<b.length;c++){if(!b[c]){continue}if(!_STNS.fbIsFile(b[c])){b[c]+=".js"}h=_STNS.fsGetAbsPth(_STNS.sLibPth+b[c]);if(_STNS.oLibs[h]){continue}_STNS.oLibs[h]={state:1,defer:0}}}}else{_STNS.fvThrow(new Error("_STNS.runTime error:can't get lib path"))}},fvInc:function(b,c){if(!_STNS.oLibs[b]){_STNS.oLibs[b]={state:1,defer:c}}},fvLoadLib:function(){var s="";with(_STNS){for(var i in oLibs){if(oLibs[i].state!=2){if(bLoaded){fbInsJs(i)}else{s+=fsGetJsTag(i,oLibs[i].defer)}oLibs[i].state=2}}}if(s){document.write(s)}},bLoaded:false,_aLoads:[],fbAddLoad:function(b){if(!_STNS.bLoaded&&typeof b=="function"){return _STNS._aLoads.push(b)}else{if(_STNS.bLoaded){_STNS.fvThrow(new Error("_STNS.runTime error:Page has been loaded!"))}else{_STNS.fvThrow(new Error("_STNS.runTime error:Not a function is pushed into onload event!"))}}return false},_fvOnload:function(){with(_STNS){if(bLoaded){return}bLoaded=true;for(var j=0;j<_aLoads.length;j++){_aLoads[j]()}}},_fvInitOnload:function(){if(_STNS.bIsIE&&window.attachEvent){window.attachEvent("onload",_STNS._fvOnload)}else{if(_STNS.oNav.name!="konqueror"&&window.addEventListener){window.addEventListener("load",_STNS._fvOnload,false)}else{if(!window.onload||window.onload.toString()!=_STNS._fvOnload.toString()){if(typeof window.onload=="function"){_STNS.fbAddLoad(window.onload)}onload=_STNS._fvOnload}}}},_aCks:[],bCkPg:false,nCkTid:0,nCkTime:100,fvAddCk:function(f){if(typeof f=="function"){with(_STNS){if(bCkPg){clearTimeout(nCkTid);bCkPg=false}_aCks.push(f);if(bLoaded){_fvCkPg()}}}else{_STNS.fvThrow(new Error("_STNS.runTime error:Not a function is pushed into check page event!"))}return false},_fvCkPg:function(){with(_STNS){if(_aCks.length){bCkPg=true;for(var i=0;i<_aCks.length;i++){_aCks[i]()}nCkTid=setTimeout("_STNS._fvCkPg()",nCkTime)}else{bCkPg=false}}},bShield:false,oDefCSS:{tb:"border-style:none;background-color:transparent;background-image:none;",tr:"border-style:none;background-color:transparent;background-image:none;",td:"border-style:none;background-color:transparent;background-image:none;",dv:"border-style:none;background-color:transparent;background-image:none;margin:0px;padding:0px;",a:"display:block;border-style:none;background-color:transparent;background-image:none;margin:0px;padding:0px;",hd:"display:none;",sp:"border-style:none;background-color:transparent;background-image:none;margin:0px;padding:0px;"},foCss2Obj:function(e){var g={},b,d=/([\w\-_]+):([^;]+)(;|$)/,f;b=e.split(";");for(var c=0;c<b.length;c++){f=d.exec(b[c]);if(f){g[f[1]]=f[2]}}return g},foCss2Style:function(g){var f=_STNS.foCss2Obj(g),e=/-([a-z])/,h={},d,b,c;for(d in f){c=e.exec(d);if(c){b=d.replace("-"+c[1],c[1].toUpperCase())}else{b=d}h[b]=f[d]}return h},fsObj2Css:function(b){var d="";for(var c in b){if(b[c]!=null){d+=c+":"+b[c]+";"}}return d},fvCSSShield:function(){with(_STNS){if(bLoaded){bShield=false}else{if(faGetElesByTagName("body")&&faGetElesByTagName("body").length){bShield=false}else{var i,s="\n<style type='text/css'>\n";for(i in oDefCSS){if(i=="a"){s+=".sta:link,.sta:hover,.sta:active,.sta:visited"}else{s+=".st"+i}s+="{"+oDefCSS[i]+"}\n"}s+="</style>";bShield=true;document.write(s)}}}},fsReadCoki:function(d){var b,c=document.cookie.split("; ");for(b=0;b<c.length;b++){if(!c[b].indexOf(d+"=")){return c[b].substr(d.length)}}},fvSaveCoki:function(g,b,c){var e=g+"="+b+"; ",f=new Date;if(!c||!b){e+="expires=Fri, 31 Dec 1999 23:59:59 GMT; "}else{e+="expires="+((new Date(f-0+c)).toGMTString())+"; "}e+="path=/; ";document.cookie=e},ffGetFun:function(b){if(typeof b=="function"){return b}else{if(typeof b=="string"&&window[b]){return window[b]}}},fbIsAbsPth:function(c){var b=c.toLowerCase();return/^(#|\?|\/|[a-z]:|http:|https:|file:|ftp:|javascript:|vbscript:|mailto:|about:|gopher:|news:|res:|telnet:|view-source|wais:|rtsp:|mms:|outlook:)/.test(b)},fsGetAbsPth:function(d){if(!d){return d}var c,b;if(!d.indexOf("//")){return d}if(d.charAt(0)=="/"){c=/^(file:\/{2,}[^\/]+\/|http:\/\/[^\/]+\/|https:\/\/[^\/]+\/)/;if(c.exec(_STNS.sDIR)){d=RegExp.$1+d.substr(1)}else{return d}}else{if(d=="#"){if(_STNS.sURL.charAt(_STNS.sURL.length-1)!="#"){return _STNS.sURL+"#"}else{return _STNS.sURL}}else{if(!_STNS.fbIsAbsPth(d)){d=_STNS.sDIR+d}else{return d}}}while(d.indexOf("/./")>0){d=d.replace("/./","/")}while((b=d.indexOf("/../"))>0){var f,e;f=d.substr(0,b);e=d.substr(b).replace("/../","");f=f.substr(0,f.lastIndexOf("/")+1);d=f+e}return d},fsGetImgTag:function(j,e,g,c,k,d,f){if(!j||!e||!g){return""}if(d&&f){if(e==-1&&g==-1){e=d,g=f}else{if(e==-1&&g!=-1){e=Math.floor(d*g/f)}else{if(e!=-1&&g==-1){g=Math.floor(f*e/d)}}}}return"<img class='stimg' src=\""+j+'"'+(e==-1?"":" width="+e)+(g==-1?"":" height="+g)+" border="+(c?c:0)+(k?" id='"+k+"'":"")+">"},fsGetJsTag:function(b,c){return"<script type='text/javascript' language='javascript1.2' src=\""+b+'"'+(c?" DEFER":"")+"><\/script>"},fsGetTag:function(c,b,d){return"<"+c+" "+b+">"+(d?d:"")+"</"+c+">"},fbIsFile:function(b){return/\w+\.\w+$/.test(b)},fbIsImg:function(b){return/\.(gif|png|jpg|jpeg|bmp)$/.test(b.toLowerCase())},fsGetDIR:function(c){var b=c.toLowerCase();if(!b.indexOf("file:/")||!b.indexOf("http://")||!b.indexOf("https://")){return c.substr(0,c.lastIndexOf("/")+1)}else{return""}},fsGetHTMLEnti:function(c,d){if(!c){return""}var b;b=/&/g;c=c.replace(b,"&amp;");if(!d){b=/ /g;c=c.replace(b,"&nbsp;")}b=/</g;c=c.replace(b,"&lt;");b=/>/g;c=c.replace(b,"&gt;");b=/\"/g;c=c.replace(b,"&quot;");return c},faJoinA:function(f,d){var h=[],e=Math.max(f.length,d.length);for(var g=0;g<e;g++){if(f[g]==null){h[g]=d[g]}else{h[g]=f[g]}}return h},S64:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#@",fiTransX2D:function(n,m){m=String(m).replace(/ /gi,"");if(m==""){return 0}var a=_STNS.S64.substr(0,n);if(eval("m.replace(/["+a+"]/gi,'')")!=""){_STNS.fvThrow(new Error("_STNS.runTime error:Transform bad number from "+m+" to 10!"));return 0}var t=0,c=1;for(var x=m.length-1;x>-1;x--){t+=c*(a.indexOf(m.charAt(x)));c*=n}return t},fsTranD2X:function(g,d){d=String(d).replace(/ /gi,"");if(d==""){return 0}if(parseInt(d)!=d){_STNS.fvThrow(new Error("_STNS.runTime error:Transform bad number from 10 to "+d+"!"));return""}var f="",e=_STNS.S64.substr(0,g);while(d!=0){var c=d%g;f=e.charAt(c)+f;d=(d-c)/g}if(!f){f="0"}return f},faCP2PP:function(cp,w){var t,l;with(_STNS){t=fiGetCT(w);l=fiGetCL(w);return[cp[0]+l,cp[1]+t]}},faPP2CP:function(pp,w){var t,l;with(_STNS){t=fiGetCT(w);l=fiGetCL(w);return[pp[0]-l,pp[1]-t]}},fsGetLen:function(g,e,j,c,h,d){var k=_STNS,f;if(d==null){d=true}if(h==null){h=true}if(j==null){j=0}if(c==null){c=0}if(typeof e=="string"){f=/%|px|pt|em|ex|pc|in|cm|mm$/.exec(e)}if(f){switch(f[0]){case"%":return e;default:e=parseInt(e),f=f[0]}}else{e=parseInt(e);f="px"}switch(g){case"dv":if(k.sDocMd=="css1"||(!k.bIsIE&&!k.bIsOP||(k.bIsOP&&parseInt(k.oNav.version)>=8))){return e-2*j-2*c+f}break;case"tb":if(k.bIsMIE&&!d&&h){return e-2*c-2*j+f}break;case"td":if(k.bIsSF){if(k.sDocMd!="css1"||d){if(h){return e-2*c+f}else{return e-2*j+f}}else{return e-2*j-2*c+f}}else{if(!k.bIsMIE&&(k.sDocMd=="css1"||d)){return e-2*c-2*j+f}}break}return e+f},fdmGetEleById:function(id,w){var w=w||window;with(_STNS){if(bIsIE){var es=w.document.all(id);if(es&&es.length&&!es.tagName){return es[0]}else{return es}}else{return w.document.getElementById(id)}}},faGetElesByTagName:function(n,w){var w=w||window;with(_STNS){if(bIsIE){return w.document.all.tags(n)}else{return w.document.getElementsByTagName(n)}}},faGetElesByCls:function(g,c){var c=c||window;var e,b=[],f,d=_STNS.bIsIE?c.document.all:c.document.getElementsByTagName("*");for(e=0;f=d[e];e++){if(f.className==g){b.push(f)}}return b},fdmGetFmByName:function(c,b){var b=b||window;if(b.frames[t]){return b.frames[t]}else{if(b.parent){return b.parent.frames[t]}}},fbIsPar:function(b,d){if(_STNS.bIsIE){return b.contains(d)}else{if(!b||!d){return false}if(b==d){return true}do{if(d.parentNode){d=d.parentNode}else{break}if(b==d){return true}}while(d)}return false},fbInsHTML:function(g,f,c){if(_STNS.bIsIE){return g.insertAdjacentHTML(f,c)}else{var j=g.ownerDocument,b=j.createElement("span");b.innerHTML=c;switch(f){case"beforeBegin":return g.parentNode.insertBefore(b,g);case"afterBegin":return g.insertBefore(b,g.firstChild);case"beforeEnd":return g.appendChild(b);case"afterEnd":if(g.nextSibling){return g.parentNode.insertBefore(b,g.nextSibling)}else{return g.parentNode.appendChild(b)}}}return false},fbInsEle:function(d,c,b){if(_STNS.bIsIE){return d.insertAdjacentElement(c,b)}else{switch(c){case"beforeBegin":return d.parentNode.insertBefore(b,d);case"afterBegin":return d.insertBefore(b,d.firstChild);case"beforeEnd":return d.appendChild(b);case"afterEnd":if(o.nextSibling){return d.parentNode.insertBefore(b,d.nextSibling)}else{return d.parentNode.appendChild(b)}}}},fbDelEle:function(c){var b=c.parentNode;return b.removeChild(c)},fbInsJs:function(d,b){var b=b||"JavaScript";var e=_STNS.faGetElesByTagName("HEAD");if(e&&e[0]){b=b.toLowerCase();var c=document.createElement("script");c.language=b;if(!b.indexOf("javascript")||!b.indexOf("jscript")){c.type="text/javascript"}c.src=d;_STNS.fbInsEle(e,"beforeEnd",c)}},fdmCreateXMLHttp:function(){var b;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{var f=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var d=0;d<f.length;d++){try{b=new ActiveXObject(f[d]);break}catch(c){b=null}}}if(!b){b=null;_STNS.fvThrow(new Error("Create XMLHttpRequest fail!"));return}if(b.readyState==null){b.readyState=0;b.addEventListener("load",function(){b.readyState=4;if(typeof b.onreadystatechange=="function"){b.onreadystatechange()}},false)}return b},fdmCreateXMLDoc:function(){var d;if(_STNS.bIsIE){var b=["Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","Msxml2.DOMDocument","Microsoft.XMLDOM"];for(var f=0;f<b.length;f++){try{d=new ActiveXObject(b[f]);break}catch(c){}}}else{d=document.implementation.createDocument("","",null)}if(!d){_STNS.fvThrow(new Error("Create XMLDOMDocument fail!"));return}return d},faGetElePos:function(j){if(!j){return}var b=y=bl=bt=0;var g=_STNS.oNav.version,f=new Array(g,523.12),d=f.sort()[0]==523.12;if(_STNS.bIsSF&&d){var k=j.offsetParent?j.offsetParent.offsetParent?j.offsetParent.offsetParent.offsetParent?j.offsetParent.offsetParent.offsetParent?j.offsetParent.offsetParent.offsetParent.offsetParent?j.offsetParent.offsetParent.offsetParent.offsetParent:null:null:null:null:null;while(k){if(k.tagName=="TABLE"){bl=parseInt(_STNS.fsGetEleStyle(k,"borderLeftWidth"));bt=parseInt(_STNS.fsGetEleStyle(k,"borderTopWidth"));if(!isNaN(bl)){b+=bl}if(!isNaN(bt)){y+=bt}}k=k.offsetParent}}while(j){b+=j.offsetLeft;y+=j.offsetTop;if((_STNS.oNav.name=="konqueror"||_STNS.oNav.name=="safari")&&j.style.position.toLowerCase()=="absolute"){break}switch(j.tagName){case"TD":if(_STNS.bIsIE||(_STNS.bIsSF&&d)||(_STNS.bIsOP&&_STNS.oNav.version<9)){bl=parseInt(_STNS.fsGetEleStyle(j,"borderLeftWidth"));bt=parseInt(_STNS.fsGetEleStyle(j,"borderTopWidth"));if(!isNaN(bl)){b+=bl}if(!isNaN(bt)){y+=bt}}break}if(j.parentNode&&j.parentNode.tagName=="DIV"){var h=_STNS.fsGetEleStyle(j.parentNode,"overflow").toLowerCase();var c=_STNS.fsGetEleStyle(j.parentNode,"width").toLowerCase();if(h=="hidden"||h=="scroll"||h=="auto"){b-=j.parentNode.scrollLeft;y-=j.parentNode.scrollTop}if(c&&c!="auto"){if((_STNS.bIsFX&&_STNS.oNav.version>20060414&&h!="visible")||(_STNS.bIsIE&&_STNS.oNav.version>=5)){bl=parseInt(_STNS.fsGetEleStyle(j.parentNode,"borderLeftWidth"));bt=parseInt(_STNS.fsGetEleStyle(j.parentNode,"borderTopWidth"));if(!isNaN(bl)){b+=bl}if(!isNaN(bt)){y+=bt}}}}if(j.parentNode&&j.offsetParent&&j.parentNode!=j.offsetParent){if(j.offsetParent.tagName=="DIV"){var h=_STNS.fsGetEleStyle(j.offsetParent,"overflow").toLowerCase();var c=_STNS.fsGetEleStyle(j.offsetParent,"width").toLowerCase();if(h=="hidden"||h=="scroll"||h=="auto"){b-=j.offsetParent.scrollLeft;y-=j.offsetParent.scrollTop}if(c&&c!="auto"){if((_STNS.bIsFX&&_STNS.oNav.version>20060414&&h!="visible")||(_STNS.bIsIE&&_STNS.oNav.version>=5)){bl=parseInt(_STNS.fsGetEleStyle(j.offsetParent,"borderLeftWidth"));bt=parseInt(_STNS.fsGetEleStyle(j.offsetParent,"borderTopWidth"));if(!isNaN(bl)){b+=bl}if(!isNaN(bt)){y+=bt}}}}}j=j.offsetParent}return[b,y]},fiGetEleWid:function(b){return b.offsetWidth},fiGetEleHei:function(b){return b.offsetHeight},fsGetEleStyle:function(d,c){if(!d||!c){return}if(_STNS.bIsIE){return d.currentStyle[c]}else{if(_STNS.bIsFX||_STNS.bIsSF||_STNS.bIsOP){var b=d.ownerDocument.defaultView;c=c.replace(/([A-Z])/g,"-$1");return b.getComputedStyle(d,"").getPropertyValue(c.toLowerCase())}else{return d.style[c]}}},fcoGetAttribute:function(c,b){if(!c||!b){return}if(_STNS.bIsIE){return c[b]}else{return c.getAttribute(b)}},fbFalse:function(){return false},fbTrue:function(){return true}};_STNS.Class=(function(){var n=function(){var r=function(u){if(_STNS.bIsIE){this._cls=this.constructor}else{this._cls=arguments.callee}k.call(this,u)};h(r,arguments);r.register=f;r.toString=e;r.subclsOf=d;r.superclassOf=c;return r};n.toString=function(){return"[object Class]"};n.getC=function(u){var r=[];if(!b(u,r)||!g[r[0]][r[1]]){_STNS.fvThrow(new Error('Class get error: Class "'+u+'" is not found'));return}return g[r[0]][r[1]]};n.getClsLst=function(x,w){var x=x||g,w=w||"/",v,u="";for(var r in x){if(typeof x[r]=="object"){v=w+r+"/";u+=_STNS.Class.getClsLst(x[r],v)}else{u+=w+r+"\n"}}return u};var f=function(v){var x=[];if(!b(v,x)){_STNS.fvThrow(new Error("Class register error: Invalid class path:"+v));return}var r=x[0];var w=x[1];if(r){if(!g[r]){g[r]={}}var u=g[r][w];if(u){_STNS.fvThrow(new Error('Class register error: Class "'+v+'" already exists'));return}g[r][w]=this}else{var u=g[w];if(u){_STNS.fvThrow(new Error('Class register error: Class "'+v+'" already exists'));return}g[w]=this}this._pkg=r;this._cn=w};var g={};var q=function(v,u){if(typeof v=="string"){v=_STNS.Class.getC(v)}if(typeof u=="string"){u=_STNS.Class.getC(u)}if(typeof v!="function"||typeof u!="function"){return false}if(!v._supers){return false}for(var r=0;r<v._supers.length;r++){if(v._supers[r]==u){return true}else{if(q(v._supers[r],u)){return true}}}return false};var d=function(r){return q(this,r)};var c=function(r){return q(r,this)};var b=function(u,r){if(typeof u!="string"||!u){return false}var v=u.lastIndexOf("/");if(v>-1){r[0]=u.substr(0,v);r[1]=u.substr(v+1)}else{r[0]="";r[1]=u}return true};var h=function(w,r){w._supers=[];for(var u=0;u<r.length;u++){var v=r[u];if(typeof v=="string"){v=_STNS.Class.getC(v)}if(typeof v!="function"){_STNS.fvThrow(new Error("Class create error: Invalid superclass: args["+u+"]"));return}w._supers.push(v)}};var k=function(r){var v=this._cls;for(var u=0;u<v._supers.length;u++){if(_STNS.bIsIE){this.constructor=v._supers[u]}v._supers[u].call(this,r)}if(_STNS.bIsIE){this.constructor=v}this._cls=v;this.toString=p;this.getClass=m;this.instanceOf=l;this.toConvert=j;if(v.construct){v.construct.call(this,r)}};var j=function(u,r){var z=this._cls;if(q(z,u)){var w=new u;for(var v in this){if(typeof w[v]=="undefined"){delete this[v]}if(u[v]){this[v]=u[v]}}}else{if(q(u,z)){var x=0;for(var v=0;v<u._supers.length;v++){if(_STNS.bIsIE){this.constructor=u._supers[v]}if(u._supers[v]!=z){u._supers[v].call(this,r)}else{x=1}}if(!x){_STNS.fvThrow(new Error("_STNS.runTime error:Can't convert this instance;The class of instance must be the target class's direct superClass!"));return}if(_STNS.bIsIE){this.constructor=u}this._cls=u;if(u.construct){u.construct.call(this,r)}}else{_STNS.fvThrow(new Error("_STNS.runTime error:Can't convert this instance;The class of instance must be the target class's subClass or direct superClass!"))}}};var l=function(r){if(typeof r=="string"){r=_STNS.Class.getC(r)}if(typeof r!=="function"){return false}return this._cls==r};var m=function(){return this._cls};var p=function(){if(this._cls._cn){return"[object Object "+this._cls._pkg+"/"+this._cls._cn+"]"}else{return"[object Object Anonymous class]"}};var e=function(){if(this._cn){return"[object Class "+this._pkg+"/"+this._cn+"]"}return"[object Anonymous Class]"};return n})();with(_STNS){sDocMd=fsGetDocMd();oNav=_foGetNav();bIsIE=oNav.name=="msie";bIsMIE=bIsIE&&oNav.platform=="Mac";bIsOP=oNav.name=="opera";bIsFX=oNav.name=="gecko";bIsSF=oNav.name=="safari";bIsKQ=oNav.name=="konqueror";sDIR=fsGetDIR(sURL);bLocal=!sURL.indexOf("file:");_fvInitOnload();fbAddLoad(_fvCkPg)}}_STNS.fvInitLib();_STNS.fvInc(_STNS.fsGetAbsPth(_STNS.sLibPth+"stcode.js"));_STNS.fvLoadLib();if(!_STNS.bShield){_STNS.fvCSSShield()}if(typeof _STNS!="undefined"&&!_STNS.EFFECT){_STNS.EFFECT={foGetEff:function(f,k,b,h,g){if(!f){return 0}var e=f.toLowerCase(),j;if((!e.indexOf("progid:")||!e.indexOf("revealtrans"))&&_STNS.EFFECT.CEffIE){return new _STNS.EFFECT.CEffIE([f,k,b,h,g])}else{if(!f.indexOf("stEffect")){f=f.substring(10,f.length-2);return stEffect(f,k,b,h,g)}else{return 0}}}};with(_STNS.EFFECT){_STNS.EFFECT.CEffect=_STNS.Class();CEffect.register("EFFECT/CEffect");CEffect.construct=function(as){this._iStat=-1;this.sName=as[0];this.sDmId=as[1];this.dmWin=as[2]||window;with(_STNS.EFFECT.CEffect){this.fiGetStat=fiGetStat;this.fbSet=_STNS.fbFalse;this.fbDel=_STNS.fbFalse;this.fbApply=_STNS.fbFalse;this.fbPlay=_STNS.fbFalse;this.fbStop=_STNS.fbFalse;this.fbSetStyle=_STNS.fbFalse}};CEffect.fiGetStat=function(){return this._iStat}}function stEffect(g,f,b,c,d){var e="CEff"+g.charAt(0).toUpperCase()+g.substr(1);if(_STNS.EFFECT[e]){return new _STNS.EFFECT[e]([g,f,b,c,d])}}}function enableTooltips(e){var b,c,d;if(!document.getElementById||!document.getElementsByTagName){return}AddCss();d=document.createElement("span");d.id="btc";d.setAttribute("id","btc");d.style.position="absolute";document.getElementsByTagName("body")[0].appendChild(d);if(e==null){b=document.getElementsByTagName("a")}else{b=document.getElementById(e).getElementsByTagName("a")}for(c=0;c<b.length;c++){Prepare(b[c])}}function Prepare(g){var h,e,c,f;e=g.getAttribute("title");if(e==null||e.length==0){e="teste"}g.removeAttribute("title");h=CreateEl("span","tooltip");f=CreateEl("span","top");var d=document.createElement("DIV");f.appendChild(d);d.innerHTML=e;h.appendChild(f);c=CreateEl("b","bottom");'l=el.getAttribute("href");';'if(l.length>30) l=l.substr(0,27)+"...";';"b.appendChild(document.createTextNode(l));";h.appendChild(c);setOpacity(h);g.tooltip=h;g.onmouseover=showTooltip;g.onmouseout=hideTooltip;g.onmousemove=Locate}function showTooltip(b){document.getElementById("btc").appendChild(this.tooltip);Locate(b)}function hideTooltip(b){var c=document.getElementById("btc");if(c.childNodes.length>0){c.removeChild(c.firstChild)}}function setOpacity(b){b.style.filter="alpha(opacity:95)";b.style.KHTMLOpacity="0.95";b.style.MozOpacity="0.95";b.style.opacity="0.95"}function CreateEl(d,e){var b=document.createElement(d);b.className=e;b.style.display="block";return(b)}function AddCss(){var b=CreateEl("link");b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");b.setAttribute("href","css.css");b.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(b)}function Locate(c){var b=0,d=0;if(c==null){c=window.event}if(c.pageX||c.pageY){b=c.pageX;d=c.pageY}else{if(c.clientX||c.clientY){if(document.documentElement.scrollTop){b=c.clientX+document.documentElement.scrollLeft;d=c.clientY+document.documentElement.scrollTop}else{b=c.clientX+document.body.scrollLeft;d=c.clientY+document.body.scrollTop}}}document.getElementById("btc").style.top=(d+10)+"px";document.getElementById("btc").style.left=(b-165)+"px"}function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2)};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){}};this.reset=function(){this.resetFunctions();this.resetData()};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){this.xmlhttp=null}}if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}else{this.failed=true}}};this.setVar=function(name,value){this.vars[name]=Array(value,false)};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value))}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true)}};this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1])}else{this.setVar(urlVars[0],urlVars[1])}}};this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true)}if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring}else{this.URLString=urlstring}}this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0]}urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0]}if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator)}else{this.URLString+=urlstringtemp.join(this.argumentSeparator)}};this.runResponse=function(){eval(this.response)};this.runAJAX=function(urlstring){if(this.failed){this.onFail()}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element)}if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;if(self.execute){self.runResponse()}if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response}else{self.elementObj.innerHTML=self.response}}if(self.responseStatus[0]=="200"){self.onCompletion()}else{self.onError()}self.URLString="";break}};this.xmlhttp.send(this.URLString)}}};this.reset();this.createAJAX()}var ajaxBox_offsetX=0;var ajaxBox_offsetY=1;var ajax_list_externalFile="fonte.asp";var minimumLettersBeforeLookup=3;var ajax_list_objects=new Array();var ajax_list_cachedLists=new Array();var ajax_list_activeInput=false;var ajax_list_activeItem;var ajax_list_optionDivFirstItem=false;var ajax_list_currentLetters=new Array();var ajax_optionDiv=false;var ajax_optionDiv_iframe=false;var ajax_list_MSIE=false;if(navigator.userAgent.indexOf("MSIE")>=0&&navigator.userAgent.indexOf("Opera")<0){ajax_list_MSIE=true}var currentListIndex=0;function ajax_getTopPos(b){var c=b.offsetTop;while((b=b.offsetParent)!=null){c+=b.offsetTop}return c}function ajax_list_cancelEvent(){return false}function ajax_getLeftPos(b){var c=b.offsetLeft;while((b=b.offsetParent)!=null){c+=b.offsetLeft}return c}function ajax_option_setValue(d,c){if(!c){c=this}var b=c.innerHTML;if(ajax_list_MSIE){b=c.innerText}else{b=c.textContent}if(!b){b=c.innerHTML}ajax_list_activeInput.value=b;if(document.getElementById(ajax_list_activeInput.name+"_hidden")){document.getElementById(ajax_list_activeInput.name+"_hidden").value=c.id}ajax_options_hide()}function ajax_options_hide(){if(ajax_optionDiv){ajax_optionDiv.style.display="none"}if(ajax_optionDiv_iframe){ajax_optionDiv_iframe.style.display="none"}}function ajax_options_rollOverActiveItem(b,c){if(ajax_list_activeItem){ajax_list_activeItem.className="optionDiv"}b.className="optionDivSelected";ajax_list_activeItem=b;if(c){if(ajax_list_activeItem.offsetTop>ajax_optionDiv.offsetHeight){ajax_optionDiv.scrollTop=ajax_list_activeItem.offsetTop-ajax_optionDiv.offsetHeight+ajax_list_activeItem.offsetHeight+2}if(ajax_list_activeItem.offsetTop<ajax_optionDiv.scrollTop){ajax_optionDiv.scrollTop=0}}}function ajax_option_list_buildList(g,c){ajax_optionDiv.innerHTML="";ajax_list_activeItem=false;if(ajax_list_cachedLists[c][g.toLowerCase()].length<=1){ajax_options_hide();return}ajax_list_optionDivFirstItem=false;var e=false;for(var d=0;d<ajax_list_cachedLists[c][g.toLowerCase()].length;d++){if(ajax_list_cachedLists[c][g.toLowerCase()][d].length==0){continue}e=true;var f=document.createElement("DIV");var b=ajax_list_cachedLists[c][g.toLowerCase()][d].split(/###/gi);if(ajax_list_cachedLists[c][g.toLowerCase()].length==1&&ajax_list_activeInput.value==b[0]){ajax_options_hide();return}f.innerHTML=b[b.length-1];f.id=b[0];f.className="optionDiv";f.onmouseover=function(){ajax_options_rollOverActiveItem(this,false)};f.onclick=ajax_option_setValue;if(!ajax_list_optionDivFirstItem){ajax_list_optionDivFirstItem=f}ajax_optionDiv.appendChild(f)}if(e){ajax_optionDiv.style.display="block";if(ajax_optionDiv_iframe){ajax_optionDiv_iframe.style.display=""}ajax_options_rollOverActiveItem(ajax_list_optionDivFirstItem,true)}}function ajax_option_list_showContent(d,b,c,g){if(g!=currentListIndex){return}var h=b.value;var e=ajax_list_objects[d].response;var f=e.split("|");ajax_list_cachedLists[c][h.toLowerCase()]=f;ajax_option_list_buildList(h,c)}function ajax_option_resize(b){ajax_optionDiv.style.top=(ajax_getTopPos(b)+b.offsetHeight+ajaxBox_offsetY)+"px";ajax_optionDiv.style.left=(ajax_getLeftPos(b)+ajaxBox_offsetX)+"px";if(ajax_optionDiv_iframe){ajax_optionDiv_iframe.style.left=ajax_optionDiv.style.left;ajax_optionDiv_iframe.style.top=ajax_optionDiv.style.top}}function ajax_showOptions(c,d,f){if(f.keyCode==13||f.keyCode==9){return}if(ajax_list_currentLetters[c.name]==c.value){return}if(!ajax_list_cachedLists[d]){ajax_list_cachedLists[d]=new Array()}ajax_list_currentLetters[c.name]=c.value;if(!ajax_optionDiv){ajax_optionDiv=document.createElement("DIV");ajax_optionDiv.id="ajax_listOfOptions";document.body.appendChild(ajax_optionDiv);if(ajax_list_MSIE){ajax_optionDiv_iframe=document.createElement("IFRAME");ajax_optionDiv_iframe.border="0";ajax_optionDiv_iframe.style.width=ajax_optionDiv.clientWidth+"px";ajax_optionDiv_iframe.style.height=ajax_optionDiv.clientHeight+"px";ajax_optionDiv_iframe.id="ajax_listOfOptions_iframe";document.body.appendChild(ajax_optionDiv_iframe)}var k=document.getElementsByTagName("INPUT");for(var m=0;m<k.length;m++){if(!k[m].onkeyup){k[m].onfocus=ajax_options_hide}}var h=document.getElementsByTagName("SELECT");for(var m=0;m<h.length;m++){h[m].onfocus=ajax_options_hide}var j=document.body.onkeydown;if(typeof j!="function"){document.body.onkeydown=ajax_option_keyNavigation}else{document.body.onkeydown=function(){j();ajax_option_keyNavigation()}}var g=document.body.onresize;if(typeof g!="function"){document.body.onresize=function(){ajax_option_resize(c)}}else{document.body.onresize=function(){g();ajax_option_resize(c)}}}if(c.value.length<minimumLettersBeforeLookup){ajax_options_hide();return}ajax_optionDiv.style.top=(ajax_getTopPos(c)+c.offsetHeight+ajaxBox_offsetY)+"px";ajax_optionDiv.style.left=(ajax_getLeftPos(c)+ajaxBox_offsetX)+"px";if(ajax_optionDiv_iframe){ajax_optionDiv_iframe.style.left=ajax_optionDiv.style.left;ajax_optionDiv_iframe.style.top=ajax_optionDiv.style.top}ajax_list_activeInput=c;ajax_optionDiv.onselectstart=ajax_list_cancelEvent;currentListIndex++;if(ajax_list_cachedLists[d][c.value.toLowerCase()]){ajax_option_list_buildList(c.value,d,currentListIndex)}else{var n=currentListIndex/1;ajax_optionDiv.innerHTML="";var l=ajax_list_objects.length;ajax_list_objects[l]=new sack();var b=ajax_list_externalFile+"?"+d+"=1&letters="+c.value.replace(" ","+");ajax_list_objects[l].requestFile=b;ajax_list_objects[l].onCompletion=function(){ajax_option_list_showContent(l,c,d,n)};ajax_list_objects[l].runAJAX()}}function ajax_option_keyNavigation(b){if(document.all){b=event}if(!ajax_optionDiv){return}if(ajax_optionDiv.style.display=="none"){return}if(b.keyCode==38){if(!ajax_list_activeItem){return}if(ajax_list_activeItem&&!ajax_list_activeItem.previousSibling){return}ajax_options_rollOverActiveItem(ajax_list_activeItem.previousSibling,true)}if(b.keyCode==40){if(!ajax_list_activeItem){ajax_options_rollOverActiveItem(ajax_list_optionDivFirstItem,true)}else{if(!ajax_list_activeItem.nextSibling){return}ajax_options_rollOverActiveItem(ajax_list_activeItem.nextSibling,true)}}if(b.keyCode==13||b.keyCode==9){if(ajax_list_activeItem&&ajax_list_activeItem.className=="optionDivSelected"){ajax_option_setValue(false,ajax_list_activeItem)}if(b.keyCode==13){return false}else{return true}}if(b.keyCode==27){ajax_options_hide()}}document.documentElement.onclick=autoHideList;function autoHideList(b){if(document.all){b=event}if(b.target){source=b.target}else{if(b.srcElement){source=b.srcElement}}if(source.nodeType==3){source=source.parentNode}if(source.tagName.toLowerCase()!="input"&&source.tagName.toLowerCase()!="textarea"){ajax_options_hide()}}function fAJAXRequest(c,f,h,b,d){var g=document.getElementById(c);if(g){if(b!=""){g.innerHTML=b}new oAJAXRequest(g,f,h,d)}}function fAJAXStateChange(c){if(c&&c.mRequest&&c.mRequest.readyState==4){var b=c.mRequest.responseText;if(c.mRequest.status=="200"&&b.substr(0,3)=="200"){c.mhTarget.innerHTML=b.substring(4)}else{if(c.msError!=""){c.mhTarget.innerHTML=c.msError}}}}function oAJAXRequest(b,e,f,d){var c=this;this.mRequest=null;this.mhTarget=b;this.msError=d;if(window.XMLHttpRequest){this.mRequest=new XMLHttpRequest()}else{if(window.ActiveXObject){this.mRequest=new ActiveXObject("Microsoft.XMLHTTP")}}if(this.mRequest){if(f!=""){this.mRequest.open("POST",e,true);this.mRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.mRequest.onreadystatechange=function(){fAJAXStateChange(c)};this.mRequest.send(f)}else{this.mRequest.open("GET",e,true);this.mRequest.onreadystatechange=function(){fAJAXStateChange(c)};this.mRequest.send(null)}}}var ddtabmenu={disabletablinks:true,snap2original:[true,100],currentpageurl:window.location.href.replace("http://"+window.location.hostname,"").replace(/^\//,""),definemenu:function(b,c){this[b+"-menuitems"]=null;this[b+"-dselected"]=-1;this.addEvent(window,function(){ddtabmenu.init(b,c)},"load")},showsubmenu:function(c,b){var d=this[c+"-menuitems"];this.clearrevert2default(c);for(i=0;i<d.length;i++){d[i].className="";if(typeof d[i].hasSubContent!="undefined"){document.getElementById(d[i].getAttribute("rel")).style.display="none"}}b.className="current";if(typeof b.hasSubContent!="undefined"){document.getElementById(b.getAttribute("rel")).style.display="block"}},isSelected:function(b){var b=b.replace("http://"+b.hostname,"").replace(/^\//,"");return(ddtabmenu.currentpageurl==b)},isContained:function(b,d){var d=window.event||d;var f=d.relatedTarget||((d.type=="mouseover")?d.fromElement:d.toElement);while(f&&f!=b){try{f=f.parentNode}catch(d){f=b}}if(f==b){return true}else{return false}},revert2default:function(b,c,d){if(!ddtabmenu.isContained(b,c,d)){window["hidetimer_"+c]=setTimeout(function(){ddtabmenu.showsubmenu(c,ddtabmenu[c+"-dselected"])},ddtabmenu.snap2original[1])}},clearrevert2default:function(b){if(typeof window["hidetimer_"+b]!="undefined"){clearTimeout(window["hidetimer_"+b])}},addEvent:function(c,d,b){var b=(window.addEventListener)?b:"on"+b;if(c.addEventListener){c.addEventListener(b,d,false)}else{if(c.attachEvent){c.attachEvent(b,d)}}},init:function(d,e){var g=document.getElementById(d).getElementsByTagName("a");this[d+"-menuitems"]=g;for(var b=0;b<g.length;b++){if(g[b].getAttribute("rel")){this[d+"-menuitems"][b].hasSubContent=true;if(ddtabmenu.disabletablinks){g[b].onclick=function(){return false}}if(ddtabmenu.snap2original[0]==true){var f=document.getElementById(g[b].getAttribute("rel"));g[b].onmouseout=function(h){ddtabmenu.revert2default(f,d,h)};f.onmouseover=function(){ddtabmenu.clearrevert2default(d)};f.onmouseout=function(h){ddtabmenu.revert2default(this,d,h)}}}else{g[b].onmouseout=function(h){this.className="";if(ddtabmenu.snap2original[0]==true){ddtabmenu.revert2default(this,d,h)}}}g[b].onmouseover=function(){ddtabmenu.showsubmenu(d,this)};if(e=="auto"&&typeof c=="undefined"&&this.isSelected(g[b].href)){ddtabmenu.showsubmenu(d,g[b]);this[d+"-dselected"]=g[b];var c=true}else{if(parseInt(e)==b){ddtabmenu.showsubmenu(d,g[b]);this[d+"-dselected"]=g[b]}}}}};function disable_form(){document.frm.cep.disabled=true;document.frm.cep.value=""}function mostraiframe(b){var b=document.getElementById(b);if(b.style.display=="none"){b.style.display=""}else{b.style.display="none"}}function alteraiframe(c,b){var c=document.getElementById(c);if(b=="exibe"){c.style.display=""}else{c.style.display="none"}}function enable_form(){document.frm.cep.disabled=false}function pesquisar_cep(d,b,e){var c=document.createElement("iframe");c.setAttribute("id","iframe_cep");c.setAttribute("name","iframe_cep");c.style.border="0px";c.style.width="0px";c.style.height="0px";c.setAttribute("src","cep_frete.asp?pais="+d+"&cep="+b+"&pesofrete="+e);IFrameObj=document.body.appendChild(c)}function valida_pesquisar_cep(){var b=document.frm.paises;var d=b.options[b.selectedIndex].value;var c=document.frm.cep.value.replace("-","");if(d=="BR"){if(c.length==8){executar_pesquisar_cep()}else{alert(ValPesqCepALERTcepinvalido);document.frm.cep.focus()}}else{executar_pesquisar_cep()}}function executar_pesquisar_cep(){var c=document.frm.paises;var e=c.options[c.selectedIndex].value;document.frmEditContact.pais_frete.value=e;var b=document.frm.cep.value.replace("-","");var d=document.frm.pesofrete.value;pesquisar_cep(e,b,d)}function send_frete(d){var c=d.split("#");SndFrtALERTopcaofreteTMP=SndFrtALERTopcaofrete.replace("varOpcaoFrete",""+c[0])+"";SndFrtALERTopcaofreteTMP=SndFrtALERTopcaofreteTMP.replace("varValorFrete",""+c[1])+"";var b=confirm(SndFrtALERTopcaofreteTMP);if(b==true){document.frmEditContact.opcao_frete.value=c[0];document.frmEditContact.frete.value=c[2];document.frmEditContact.cep_frete.value=c[3];document.frmEditContact.submit()}}
//###################################################################################
function handleResponse(informacoes) {

    /////////////////////
    var tbl = document.getElementById('freteTable'); 
    var lastRow = tbl.rows.length; 
    if (lastRow > 0) tbl.deleteRow(lastRow - 1);

    if (informacoes != 0) {
	
        var verify_informacoes = informacoes.indexOf("#");

        if (verify_informacoes>=0) {
		
            var CEP = document.frm.cep.value;
            var textoCEP = document.frm.textocep.value;
        
            var x=document.getElementById('freteTable').insertRow(0);
            var y=x.insertCell(0);
            y.innerHTML="<table id='"+ CEP +"' border='0' width='100%' cellpadding='0' cellspacing='2'></table>";

            /////////////////////

            var array_informacoes = informacoes.split("#");

            var x=document.getElementById(CEP).insertRow(0);
            var y=x.insertCell(0);
            x.height="25"
            x.bgColor="#FEE247"
            y.innerHTML='<b>&nbsp;&nbsp;&nbsp;' + textoCEP + " " + CEP + ':</b> (*Prazos somente apos postagem, em dias uteis )' ;

            var part_num=0;
            var count = 0;
            var mod = 0;
            var color;

            while (part_num < array_informacoes.length) {
                
                if (mod==0) {
                    mod = 1;
                    color = '#FFFFFF';
                } else {
                    mod = 0;
                    color = '#F5F5F5';
                }
                
                var array_frete = array_informacoes[part_num].split(":");
                
                if (array_frete[4] != "ok") {
                    // Insere o option na tabela
                    var nRows=document.getElementById(CEP).rows.length
                    var x=document.getElementById(CEP).insertRow(nRows)
                    var y=x.insertCell(0)
                    y.innerHTML= array_frete[0] + ": " + array_frete[4] 
                    count+=1;
                } else {
                    
                    if (array_frete[1] != "vazio") {
                        //Trata o valor do frete conforme a moeda utilizada
                        var verify_vlrFRETE = array_frete[1].indexOf("|");
                        if (verify_vlrFRETE>=0) {
                            var vlrFRETE = array_frete[1].split("|");
                            var vlrFRETE_REAL = vlrFRETE[0];
                            var vlrFRETE_VIS = vlrFRETE[1];
                        } else {
                            var vlrFRETE_REAL = array_frete[1];
                            var vlrFRETE_VIS = array_frete[1];
                        }
                        // Insere o option na tabela
		                var x=document.getElementById(CEP).insertRow(1)
		                var y=x.insertCell(0)
                        x.height="10"
                        x.bgColor=color
                        y.innerHTML="<input type='radio' name='opcao' value='"+ array_frete[0] + "#" + vlrFRETE_VIS + "#" + vlrFRETE_REAL + "#" + CEP + "' onclick='send_frete(this.value);'>" + array_frete[0] + " ( R$ " + vlrFRETE_VIS + " )" + " <b>Prazo:</b> " + array_frete[2] + " Info: " +array_frete[3]
   		                count+=1;
                    }
                
                }
                part_num+=1;
            }
            
            if (count == 0) {
                var x=document.getElementById('freteTable').insertRow(0)
                var y=x.insertCell(0)
                y.innerHTML=HndRespALERTsemfrete
            }
            
            enable_form();
        
        } else {
            
            var vfrete = informacoes.split(":");

            if (vfrete[4] != "ok") {
                
                var CEP = document.frm.cep.value;
                var textoCEP = document.frm.textocep.value;
            
                var x=document.getElementById('freteTable').insertRow(0);
                var y=x.insertCell(0);
                y.innerHTML="<table id='"+ CEP +"' border='0' width='100%' cellpadding='0' cellspacing='2'></table>";

                var x=document.getElementById(CEP).insertRow(0);
                var y=x.insertCell(0);
                x.height="25"
                x.bgColor="#FEE247"
                y.innerHTML='<b>&nbsp;&nbsp;&nbsp;' + textoCEP + " " + CEP + ':</b>' ;
                
                // Insere o option na tabela
                var x=document.getElementById(CEP).insertRow(1)
                var y=x.insertCell(0)
                y.innerHTML= vfrete[0] + ": " + vfrete[4] 
                count+=1;
            
            } else {

                //Trata o valor do frete conforme a moeda utilizada
                var verify_vlrFRETE = vfrete[1].indexOf("|");
                
                if (verify_vlrFRETE>=0) {
                    var vlrFRETE = vfrete[1].split("|");
                    var vlrFRETE_REAL = vlrFRETE[0];
                    var vlrFRETE_VIS = vlrFRETE[1];
                } else {
                    var vlrFRETE_REAL = vfrete[1];
                    var vlrFRETE_VIS = vfrete[1];
                }
                
                document.frmEditContact.opcao_frete.value = vfrete[0];
                document.frmEditContact.frete.value = vlrFRETE_REAL;
                document.frmEditContact.cep_frete.value = document.frm.cep.value;
                document.frmEditContact.submit();
	        
            }
        }
    
    } else {
        disable_form();
        document.frm.cep.disabled = false;
        var x=document.getElementById('freteTable').insertRow(0)
		var y=x.insertCell(0)
		y.innerHTML=HndRespALERTsemfrete
    }

}

//###################################################################################
function mostra_cep(){Form=document.carrinho;if((Form.cep1.value.length==5)&&(checatab)){Form.cep2.focus();checatab=false}}function cadastro_cep_verificar(b){if(!alterado_cep){alterado_cep=true;document.all.cep.focus();document.all.numero.value="";document.all.complemento.value=""}}function check_meiopag(c){var b=document.OpcaoPag;for(a=0;a<b.elements.length;a++){if(b.elements[a].value==c){b.elements[a].checked=true}}}var isNN=(navigator.appName.indexOf("Netscape")!=-1);function autoTab(d,b,h){var g=(isNN)?h.which:h.keyCode;var f=(isNN)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];if(d.value.length>=b&&!c(f,g)){d.value=d.value.slice(0,b);d.form[(j(d)+1)%d.form.length].focus()}function c(e,m){var l=false,k=0;while(!l&&k<e.length){if(e[k]==m){l=true}else{k++}}return l}function j(e){var k=-1,l=0,m=false;while(l<e.form.length&&k==-1){if(e.form[l]==e){k=l}else{l++}}return k}return true}function remover_produto(nome){eval("document.carrinho."+nome+".value = 0");document.carrinho.submit()}function atualizar_carrinho(){var c,b;b=document.carrinho;c=true;if(b.tipofrete.value=="SEDEX"&&(b.cep1.value.length!=0||b.cep2.value.length!=0)){c=valida_cep()}if(c==true){document.carrinho.submit()}}function calcular_frete(){var b;b=valida_cep();if(b==true){document.carrinho.submit()}}function mostra_calculo_frete(){var b;b=document.pagamento;janela=window.open("calculo_frete.asp?valor="+b.subtotal.value+"&frete="+b.taxa_envio.value+"&cepdestino="+b.cep.value+"&peso="+b.peso.value+"&tipo_sedex="+b.tipo_sedex.value,"promocao","width=600,height=250,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");if(janela!=null){janela.location.href="calculo_frete.asp?valor="+b.subtotal.value+"&frete="+b.taxa_envio.value+"&cepdestino="+b.cep.value+"&peso="+b.peso.value+"&tipo_sedex="+b.tipo_sedex.value}}function metodo_pagamento(nome){var carteira,i,sel,num_pag,temp,metodo_pag,ssl,acao;var Form;Form=document.carrinho;num_pag=document.pagamento.num_pagamentos.value;if(document.pagamento.tipo.value==false){alert(MtdPagALERTselpag);return false}if(document.pagamento.taxa_envio.value==0&&!document.carrinho.frete_teste){alert(MtdPagALERTcalcfrete);return false}else{if(num_pag=="1"){temp=document.pagamento.tipo.value;acao=document.pagamento.URL_Autentica.value+"?acao=login&forma_pagamento="+metodo_pag;eval("document.pagamento.action='"+acao+"'");document.pagamento.submit()}else{for(i=0;i<num_pag;i++){if(document.pagamento.tipo.value==true){sel=i;break}}temp=document.pagamento.tipo.value}metodo_pag=temp.substring(0,temp.length-1);if(metodo_pag=="AMEX"||metodo_pag=="AMEXPOS"||metodo_pag=="REDECARD"||metodo_pag=="RCARDPOS"||metodo_pag=="VISA"||metodo_pag=="VISAPOS"){metodo_pag="CARTAO"}ssl=temp.substring(temp.length-1,temp.length);if(ssl=="0"){acao=document.pagamento.URL_Autentica.value+"?acao=login&forma_pagamento="+metodo_pag}else{acao=document.pagamento.URL_Autentica_seguro.value+"?acao=login&forma_pagamento="+metodo_pag}if(metodo_pag=="CARTAO"){acao=acao+"&cartao="+temp.substring(0,temp.length-1)}eval("document.pagamento.action='"+acao+"'");document.pagamento.submit()}}function valida_busca(){Form=document.busca;if(Form.produto.value.length==0){alert(VldBuscaALERTcampobusca);Form.produto.focus();return false}if(Form.produto.value.length<3){alert(VldBuscaALERTminbusca);Form.produto.focus();return false}if(!Form.codigo_categoria){alert(VldBuscaALERTexistecatbusca);return false}if(Form.codigo_categoria.value==""){alert(VldBuscaALERTcatbusca);Form.codigo_categoria.focus();return false}}function valida_buscaMarca(){Form=document.buscaMarca;if(!Form.codigo_marca){alert(VldBuscaALERTexistemarca);return false}if(Form.codigo_marca.value==""){alert(VldBuscaALERTmarca);Form.codigo_marca.focus();return false}}function valida_cep(){Form=document.carrinho;if(Form.cep1.value.length==0){alert(VldCepALERTcampocep);Form.cep1.focus();return false}if(Form.cep2.value.length==0){alert(VldCepALERTcampocep);Form.cep2.focus();return false}s=limpa_string(Form.cep1.value);if(s.length!=5){alert(VldCepALERTcaractcep);Form.cep1.focus();return false}s=limpa_string(Form.cep2.value);if(s.length!=3){alert(VldCepALERTcaractcep);Form.cep2.focus();return false}return true}function limpa_string(f){var c="0123456789";var d="";var b="";for(var e=0;e<f.length;e++){b=f.charAt(e);if(c.indexOf(b)>=0){d=d+b}}return d}function mostra_cep(){Form=document.carrinho;if((Form.cep1.value.length==5)&&(checatab)){Form.cep2.focus();checatab=false}}function semtab(){checatab=false}function comtab(){checatab=true}checatab=true;function mostra_cep(){Form=document.carrinho;if((Form.cep1.value.length==5)&&(checatab)){Form.cep2.focus();checatab=false}}function menu_goto(b){selecteditem=b.local_frete_Exporta.selectedIndex;local_frete_Exporta=b.local_frete_Exporta.options[selecteditem].value;if(local_frete_Exporta.length!=0){location.href=local_frete_Exporta}}function valida_cadastro(e,b,d){var c;c=e;if(d=="SEM FRETE"){if(b=="CadPedido"){if((valida_endereco(c,"CadPedido")==false)||(valida_password(c)==false)){return false}}else{if(b=="CadUsuario"){if(valida_endereco(c,"CadUsuario")==false){return false}}}}else{if((valida_endereco(c,"CadPedido")==false)||(valida_password(c)==false)||(verifica_cep(d)==false)){return false}}}function valida_password(b){if(b.tipo_login.value=="user_new"){if(b.senha1.value!=b.senha2.value){alert(VldPwdALERTsenhadif);b.senha1.focus();return false}}}function valida_trocapassword(b){if(b.senha_atual.value.length==0){alert(VldTrocaPwdALERTcamposenhaatual);b.senha_atual.focus();return false}if(b.nova_senha.value.length==0||b.confirma_senha.value.length==0){alert(VldTrocaPwdALERTcamposenha);b.nova_senha.focus();return false}if(b.nova_senha.value!=b.confirma_senha.value){alert(VldTrocaPwdALERTsenhadif);b.nova_senha.focus();return false}}function valida_faleconosco(b){if(b.nome.value.length==0){alert(VldFaleConALERTcmpnome);b.nome.focus();return false}if(b.email.value.length==0){alert(VldFaleConALERTcmpemail);b.email.focus();return false}if(b.email.value.indexOf("@",0)==-1||b.email.value.indexOf(".",0)==-1){alert(VldFaleConALERTcmpemailinc);b.email.focus();return false}if(b.assunto.value.length==0){alert(VldFaleConALERTcmpassunto);b.assunto.focus();return false}if(b.comentarios.value.length==0){alert(VldFaleConALERTcmpcomentario);b.comentarios.focus();return false}return true}function valida_newsletter(b){if(b.nome.value.length==0){alert(VldNewsALERTcmpnome);b.nome.focus();return false}if(b.email.value.length==0){alert(VldNewsALERTcmpemail);b.email.focus();return false}if(b.email.value.indexOf("@",0)==-1||b.email.value.indexOf(".",0)==-1){alert(VldNewsALERTcmpemailinc);b.email.focus();return false}return true}function valida_endereco(c,b){var d;if((c.tipcliente[0].checked==false)&&(c.tipcliente[1].checked==false)){alert(VldEndALERTcmpfisjur);return false}if(valida_dadosCobranca(c)==false){return false}if(b=="CadPedido"){if(c.cobranca_diferente.checked==true){if(valida_dadosEntrega(c)==false){return false}}}else{if(b=="CadUsuario"){if(valida_dadosEntrega(c)==false){return false}}}}function valida_dadosCobranca(c){var e;if(c.tipcliente[1].checked==true){if(c.razaosocial_cobranca.value.length==0){alert(VldEndALERTcmprazaosocial);c.razaosocial_cobranca.focus();return false}if(c.pais_cobranca.options[c.pais_cobranca.selectedIndex].value=="BR"){var b=c.cnpj_cobranca_b1.value+c.cnpj_cobranca_b2.value+c.cnpj_cobranca_b3.value+c.cnpj_cobranca_b4.value+c.cnpj_cobranca_b5.value;if(b.length==0){alert(VldEndALERTcmpcnpj);c.cnpj_cobranca_b1.focus();return false}e=limpa_string(b);if(e.length==14){if(valida_CNPJ(b)==false){alert(VldEndALERTcmpcnpjinc);c.cnpj_cobranca_b1.focus();return false}}else{alert(VldEndALERTcmpcnpjinc);c.cnpj_cobranca_b1.focus();return false}c.cnpj_cobranca.value=b}}if(c.nome_cobranca.value.length==0){alert(VldEndALERTcmpnome);c.nome_cobranca.focus();return false}if(c.pais_cobranca.options[c.pais_cobranca.selectedIndex].value=="BR"){var d=c.cpf_cobranca_b1.value+c.cpf_cobranca_b2.value+c.cpf_cobranca_b3.value+c.cpf_cobranca_b4.value;if(d.length==0){alert(VldEndALERTcmpcpf);c.cpf_cobranca_b1.focus();return false}e=limpa_string(d);if(e.length==11){if(valida_CPF(d)==false){alert(VldEndALERTcmpcpfinc);c.cpf_cobranca_b1.focus();return false}}else{alert(VldEndALERTcmpcpfinc);c.cpf_cobranca_b1.focus();return false}c.cpf_cobranca.value=d;if(c.rg_cobranca.value.length==0){alert(VldEndALERTcmprg);c.rg_cobranca.focus();return false}}if(c.logradouro_cobranca.value.length==0){alert(VldEndALERTcmpend);c.logradouro_cobranca.focus();return false}if(c.numero_cobranca.value.length==0){alert(VldEndALERTcmpnum);c.numero_cobranca.focus();return false}if(c.pais_cobranca.options[c.pais_cobranca.selectedIndex].value=="BR"){var f=c.cep_cobranca_b1.value+c.cep_cobranca_b2.value;if(f.length==0){alert(VldEndALERTcmpcep);c.cep_cobranca_b1.focus();return false}e=limpa_string(f);if(e.length!=8){alert(VldEndALERTcmptamcep);c.cep_cobranca_b1.focus();return false}c.cep_cobranca.value=f}if(c.cidade_cobranca.value.length==0){alert(VldEndALERTcmpcidade);c.cidade_cobranca.focus();return false}if(c.pais_cobranca.options[c.pais_cobranca.selectedIndex].value=="BR"){if(c.ddd_cobranca.value.length==0){alert(VldEndALERTcmpddd);c.ddd_cobranca.focus();return false}}if(c.telefone_cobranca.value.length==0){alert(VldEndALERTcmptel);c.telefone_cobranca.focus();return false}c.data_nascimento_cobranca.value=c.data_nascimento_cobranca_b1.value+c.data_nascimento_cobranca_b2.value+c.data_nascimento_cobranca_b3.value}function valida_dadosEntrega(c){var e;if(c.tipcliente[1].checked==true){if(c.razaosocial_entrega.value.length==0){alert(VldEndALERTcmprazaosocial);c.razaosocial_entrega.focus();return false}if(c.pais_entrega.options[c.pais_entrega.selectedIndex].value=="BR"){var d=c.cnpj_entrega_b1.value+c.cnpj_entrega_b2.value+c.cnpj_entrega_b3.value+c.cnpj_entrega_b4.value+c.cnpj_entrega_b5.value;if(d.length==0){alert(VldEndALERTcmpcnpj);c.cnpj_entrega_b1.focus();return false}e=limpa_string(d);if(e.length==14){if(valida_CNPJ(d)==false){alert(VldEndALERTcmpcnpjinc);c.cnpj_entrega_b1.focus();return false}}else{alert(VldEndALERTcmpcnpjinc);c.cnpj_entrega_b1.focus();return false}c.cnpj_entrega.value=d}}if(c.nome_entrega.value.length==0){alert(VldEndALERTcmpnome);c.nome_entrega.focus();return false}if(c.pais_entrega.options[c.pais_entrega.selectedIndex].value=="BR"){var f=c.cpf_entrega_b1.value+c.cpf_entrega_b2.value+c.cpf_entrega_b3.value+c.cpf_entrega_b4.value;if(f.length==0){alert(VldEndALERTcmpcpf);c.cpf_entrega_b1.focus();return false}e=limpa_string(f);if(e.length==11){if(valida_CPF(f)==false){alert(VldEndALERTcmpcpfinc);c.cpf_entrega_b1.focus();return false}}else{alert(VldEndALERTcmpcpfinc);c.cpf_entrega_b1.focus();return false}c.cpf_entrega.value=f;if(c.rg_entrega.value.length==0){alert(VldEndALERTcmprg);c.rg_entrega.focus();return false}}if(c.logradouro_entrega.value.length==0){alert(VldEndALERTcmpend);c.logradouro_entrega.focus();return false}if(c.numero_entrega.value.length==0){alert(VldEndALERTcmpnum);c.numero_entrega.focus();return false}if(c.pais_entrega.options[c.pais_entrega.selectedIndex].value=="BR"){var b=c.cep_entrega_b1.value+c.cep_entrega_b2.value;if(b.length==0){alert(VldEndALERTcmpcep);c.cep_entrega_b1.focus();return false}e=limpa_string(b);if(e.length!=8){alert(VldEndALERTcmptamcep);c.cep_entrega_b1.focus();return false}c.cep_entrega.value=b}if(c.cidade_entrega.value.length==0){alert(VldEndALERTcmpcidade);c.cidade_entrega.focus();return false}if(c.telefone_entrega.value.length==0){alert(VldEndALERTcmptel);c.telefone_entrega.focus();return false}if(c.pais_entrega.options[c.pais_entrega.selectedIndex].value=="BR"){if(c.ddd_entrega.value.length==0){alert(VldEndALERTcmpddd);c.ddd_entrega.focus();return false}}if(c.email_entrega.value.length==0){alert(VldEndALERTcmpemail);c.email_entrega.focus();return false}if(c.email_entrega.value.indexOf("@",0)==-1||c.email_entrega.value.indexOf(".",0)==-1){alert(VldEndALERTcmpemailinc);c.email_entrega.focus();return false}c.data_nascimento_entrega.value=c.data_nascimento_entrega_b1.value+c.data_nascimento_entrega_b2.value+c.data_nascimento_entrega_b3.value}function valida_cartao(b){var c;c=limpa_string(b.ccn.value);if(c.length!=16){alert(VldCartaoALERTcmptamnumcartao);b.ccn.focus();return false}if(b.ccn.value.length==0){alert(VldCartaoALERTcmpnumcartao);b.ccn.focus();return false}if(b.exp.value.length==0){alert(VldCartaoALERTcmpdataval);b.exp.focus();return false}if(b.cvv2.value.length==0){alert(VldCartaoALERTcmpcodseg);b.cvv2.focus();return false}return true}function valida_visa(){if(valida_endereco()==true){document.Endereco.submit()}else{return}}function limpa_string(f){var c="0123456789";var d="";var b="";for(var e=0;e<f.length;e++){b=f.charAt(e);if(c.indexOf(b)>=0){d=d+b}}return d}function valida_CPF(e){var d;e=limpa_string(e);var g=e.substr(0,9);var b=e.substr(9,2);var f=0;for(d=0;d<9;d++){f+=g.charAt(d)*(10-d)}if(f==0){return false}f=11-(f%11);if(f>9){f=0}if(b.charAt(0)!=f){return false}f*=2;for(d=0;d<9;d++){f+=g.charAt(d)*(11-d)}f=11-(f%11);if(f>9){f=0}if(b.charAt(1)!=f){return false}return true}function valida_CNPJ(e){var d;e=limpa_string(e);var g=e.substr(0,12);var b=e.substr(12,2);var f=0;for(d=0;d<12;d++){f+=g.charAt(11-d)*(2+(d%8))}if(f==0){return false}f=11-(f%11);if(f>9){f=0}if(b.charAt(0)!=f){return false}f*=2;for(d=0;d<12;d++){f+=g.charAt(11-d)*(2+((d+1)%8))}f=11-(f%11);if(f>9){f=0}if(b.charAt(1)!=f){return false}return true}function valida_numeros(e){var d;var b=0;for(d=0;d<e.length;d++){var f=e.charAt(d);if(!((f>="0")&&(f<="9"))){b=1}}if(b==1){return false}return true}function copia_entrega(){var h="";var c="";var e="";var d=0;var f=document.Endereco;var b=f.length-1;if(f.cobranca_igual.checked){for(var g=0;g<=b;g++){h=f.elements[g].name;if(h.substring(0,2)=="b_"){e=h.substring(2,h.length);if(f.elements[e].type=="select-one"){d=f.elements[e].selectedIndex;f.elements[h].selectedIndex=d}else{c=f.elements[e].value;f.elements[h].value=c}}}}}function mostradados(c){var b=document.getElementById(c);if(b.style.display=="none"){b.style.display=""}else{b.style.display="none"}}function reenvio_pwd(){var b=document.autent;if(b.esquecisenha.checked==true){b.senha.disabled=true;b.senha.value="";b.enviar.value=RnvPwdALERTreenvsenha;b.user_id.value="Digite o seu E-mail cadastrado aqui";b.user_id.className="FORMboxfocus";b.senha.className="FORMboxdis"}else{b.senha.disabled=false;b.enviar.value=RnvPwdALERTautentusuario;b.user_id.value="";b.user_id.className="FORMbox";b.senha.size.value=30;b.senha.className="FORMbox"}}function check_login(){var b=document.autent;if(b.user_id.value.length==0){alert(CkLoginALERTcmpemail);b.user_id.focus();return false}if(b.user_id.value.indexOf("@",0)==-1||b.user_id.value.indexOf(".",0)==-1){alert(CkLoginALERTcmpemailinc);b.user_id.focus();return false}if(b.esquecisenha.checked==false){if(b.senha.value.length==0){alert(CkLoginALERTcmpsenha);b.senha.focus();return false}}return true}function check_newlogin(){var b=document.new_user;if(b.user_id.value.length==0){alert(CkNwLoginALERTcmpemail);b.user_id.focus();return false}if(b.user_id.value.indexOf("@",0)==-1||b.user_id.value.indexOf(".",0)==-1){alert(CkNwLoginALERTcmpemailinc);b.user_id.focus();return false}return true}function alteraTipCad(){var j=document.getElementById("tipCadTextJuridico_cobranca");var b=document.getElementById("tipCadInputJuridico_cobranca");var c=document.getElementById("tipCadTextJuridico_entrega");var g=document.getElementById("tipCadInputJuridico_entrega");var d=document.getElementById("tipCadTextJuridico2_cobranca");var f=document.getElementById("tipCadInputJuridico2_cobranca");var e=document.getElementById("tipCadTextJuridico2_entrega");var h=document.getElementById("tipCadInputJuridico2_entrega");if(document.Endereco.tipcliente[0].checked==true){j.style.display="none";b.style.display="none";c.style.display="none";g.style.display="none";d.style.display="none";f.style.display="none";e.style.display="none";h.style.display="none";document.getElementsByName("razaosocial_cobranca")[0].value="";document.getElementsByName("cnpj_cobranca_b1")[0].value="";document.getElementsByName("cnpj_cobranca_b2")[0].value="";document.getElementsByName("cnpj_cobranca_b3")[0].value="";document.getElementsByName("cnpj_cobranca_b4")[0].value="";document.getElementsByName("cnpj_cobranca_b5")[0].value="";document.getElementsByName("inscricaoestadual_cobranca")[0].value="";document.getElementsByName("razaosocial_entrega")[0].value="";document.getElementsByName("cnpj_entrega_b1")[0].value="";document.getElementsByName("cnpj_entrega_b2")[0].value="";document.getElementsByName("cnpj_entrega_b3")[0].value="";document.getElementsByName("cnpj_entrega_b4")[0].value="";document.getElementsByName("cnpj_entrega_b5")[0].value="";document.getElementsByName("inscricaoestadual_entrega")[0].value=""}else{j.style.display="";b.style.display="";c.style.display="";g.style.display="";d.style.display="";f.style.display="";e.style.display="";h.style.display=""}}function checkTipCad(b){var d;if(document.getElementsByName("razaosocial_"+b)[0].value!=""){d=true}else{d=false}var g=document.getElementById("tipCadTextJuridico_"+b);var c=document.getElementById("tipCadInputJuridico_"+b);var f=document.getElementById("tipCadTextJuridico2_"+b);var e=document.getElementById("tipCadInputJuridico2_"+b);if(d==false){g.style.display="none";c.style.display="none";f.style.display="none";e.style.display="none";document.getElementsByName("razaosocial_"+b)[0].value="";document.getElementsByName("cnpj_"+b+"_b1")[0].value="";document.getElementsByName("cnpj_"+b+"_b2")[0].value="";document.getElementsByName("cnpj_"+b+"_b3")[0].value="";document.getElementsByName("cnpj_"+b+"_b4")[0].value="";document.getElementsByName("cnpj_"+b+"_b5")[0].value="";document.getElementsByName("inscricaoestadual_"+b)[0].value=""}else{g.style.display="";c.style.display="";f.style.display="";e.style.display=""}}function verifica_cep(b){if(document.Endereco.tipo_acesso.value!="conta"){if(document.Endereco.cobranca_diferente.checked==true){if(b!=document.Endereco.cep_entrega.value){resposta=confirm(VrfCepALERTcepentdif);if(resposta==false){return false}else{document.Endereco.mode.value="changeItem";document.Endereco.cep_frete.value=document.Endereco.cep_entrega.value;document.Endereco.submit();return false}}}else{if(b!=document.Endereco.cep_cobranca.value){resposta=confirm(VrfCepALERTcepentcobdif);if(resposta==false){return false}else{document.Endereco.mode.value="changeItem";document.Endereco.cep_frete.value=document.Endereco.cep_cobranca.value;document.Endereco.submit();return false}}}}}function pagamento(){vpos=window.open("","vpos","toolbar=yes,menubar=yes,resizable=yes,status=no,scrollbars=yes,width=600,height=400");document.pagamento.submit()}function JanelaNova(b){window.open(b,"NOME","width=680,height=400,menubar,scrollbars,resizable")}function Start(c,b,d){vpos=window.open("","vpos","toolbar=no,menubar=no,resizable=yes,status=no,scrollbars=yes,width="+b+",height="+d+"");document.abnfinanc.submit()}function submit_bradesco(metodo_pag){Form=document.Confirmacao;if(metodo_pag=="cc"){eval("Form.action='inicia_transacao.asp?metodo_pag=CC'")}else{if(metodo_pag=="transfer"){eval("Form.action='inicia_transacao.asp?metodo_pag=TRANSFER'")}else{if(metodo_pag=="financiamento"){eval("Form.action='inicia_transacao.asp?metodo_pag=FINANCIAMENTO'")}}}document.Confirmacao.submit()}function formata_data(formato,keypress,objeto){campo=eval(objeto);if(formato=="DATA"){separador="/";conjunto1=2;conjunto2=5}if(campo.value.length==conjunto1){campo.value=campo.value+separador}if(campo.value.length==conjunto2){campo.value=campo.value+separador}}function mostraCarrinho(b){var c=document.getElementById(b);if(c.style.display=="none"){c.style.display=""}else{c.style.display="none"}}function PopUp(d,b,c){window.open(d,b,c)}function check_opcaopag(){var c=document.OpcaoPag;var b=false;for(a=0;a<c.elements.length;a++){if(c.elements[a].name=="tipo"){if(c.elements[a].checked==true){b=true;break}}}if(b==false){alert(CkOpPagALERTselpag)}else{c.submit()}}function valida_VisaMoset(b){if(b.ccn.value.length==0){alert(VldMosetALERTcmpnumcartao);b.ccn.focus();return false}if(b.email.value.length==0){alert(VldMosetALERTcmpemail);b.email.focus();return false}if(b.email.value.indexOf("@",0)==-1||b.email.value.indexOf(".",0)==-1){alert(VldMosetALERTcmpemailinc);b.email.focus();return false}if(b.assunto.value.length==0){alert(VldMosetALERTcmpassunto);b.assunto.focus();return false}if(b.comentarios.value.length==0){alert(VldMosetALERTcmpcomentario);b.comentarios.focus();return false}return true}function fncLimpaValue(b,c){if(c==b.value){b.value=""}}function fncPreencheValue(b,c){if(b.value==""){b.value=c}}function atualiza_carrinho(j){var g=document.frmEditContact;var e=0;var h=true;var f,d,c;var k;for(a=0;a<g.elements.length;a++){if(g.elements[a].name=="quantidade_produto"){e=e+1}}e=(e-1);if(e>=1){for(i=0;i<=e;i++){f=g.quantidade_produto[i].value;d=g.quantidade_atual[i].value;c=g.quantidade_maxima[i].value;k=f-d;var b=String(k);if(b.indexOf("-")==-1){b=Number(b);if((b>c)&&(c!=0)){alert(AtzCarALERTqtdestoque);g.quantidade_produto[i].focus();h=false;break}if((f>c)&&(c==0)&&(b!=0)){alert(AtzCarALERTqtdestoque);g.quantidade_produto[i].focus();h=false;break}}}}else{f=g.quantidade_produto.value;d=g.quantidade_atual.value;c=g.quantidade_maxima.value;k=f-d;var b=String(k);if(b.indexOf("-")==-1){b=Number(b);if((b>c)&&(c!=0)){alert(AtzCarALERTqtdestoque);g.quantidade_produto.focus();h=false}if((f>c)&&(c==0)&&(b!=0)){alert(AtzCarALERTqtdestoque);g.quantidade_produto.focus();h=false}}}if(h==true){if(j=="frete"){valida_pesquisar_cep()}else{g.submit()}}}function valida_indique(){Form=document.indique;if(Form.Nome_AmigoIndicador.value.length==0){alert(VldIndALERTcmpnome);Form.Nome_AmigoIndicador.focus();return false}if(Form.Email_AmigoIndicador.value.length==0){alert(VldIndALERTcmpemail);Form.Email_AmigoIndicador.focus();return false}if(Form.Email_AmigoIndicador.value.indexOf("@",0)==-1||Form.Email_AmigoIndicador.value.indexOf(".",0)==-1){alert(VldIndALERTcmpemailinc);Form.Email_AmigoIndicador.focus();return false}if(Form.Nome_AmigoIndicado.value.length==0){alert(VldIndALERTcmpnome);Form.Nome_AmigoIndicado.focus();return false}if(Form.Email_AmigoIndicado.value.length==0){alert(VldIndALERTcmpemail);Form.Email_AmigoIndicado.focus();return false}if(Form.Email_AmigoIndicado.value.indexOf("@",0)==-1||Form.Email_AmigoIndicado.value.indexOf(".",0)==-1){alert(VldIndALERTcmpemailinc);Form.Email_AmigoIndicado.focus();return false}if(Form.comentario.value.length==0){alert(VldIndALERTcmpcomentario);Form.comentario.focus();return false}return true}function travaCepFrete(c,b){b.value="";if(c=="BR"){b.maxLength="8"}else{b.maxLength="100"}}function ajustaCepFrete(c,b){if(c=="BR"){b.value=b.value.replace(/[^\d]*/gi,"")}}function valida_pesqu(){Form=document.indique;if(Form.Email_Receptor.value.length==0){alert(VldIndALERTcmpemail);Form.Email_Receptor.focus();return false}if(Form.Email_Receptor.value.indexOf("@",0)==-1||Form.Email_Receptor.value.indexOf(".",0)==-1){alert(VldIndALERTcmpemailinc);Form.Email_Receptor.focus();return false}return true}function disableSelection(b){if(typeof b.onselectstart!="undefined"){b.onselectstart=function(){return false}}else{if(typeof b.style.MozUserSelect!="undefined"){b.style.MozUserSelect="none"}else{b.onmousedown=function(){return false}}}b.style.cursor="default"}var ValPesqCepALERTcepinvalido="CEP inválido. Por favor verifique o mesmo";var SndFrtALERTopcaofrete="A opção de frete escolhida foi varOpcaoFrete no valor de varValorFrete?";var HndRespALERTsemfrete="Não há¡ um tipo de frete disponível para esse CEP.";var MtdPagALERTselpag="Selecione uma opção de pagamento";var MtdPagALERTcalcfrete="Por favor, calcule a taxa de envio...";var VldBuscaALERTcampobusca="Por favor preencha o campo de busca !";var VldBuscaALERTminbusca="A palavra digitada deve conter mais de 3 caracteres !";var VldBuscaALERTexistecatbusca="Erro! Não há categorias registradas.";var VldBuscaALERTcatbusca="Por favor escolha uma categoria para a busca !";var VldBuscaALERTexistemarca="Erro! Não há marcas registradas.";var VldBuscaALERTmarca="Por favor escolha uma marca para a busca !";var VldCepALERTcampocep="Por favor digite um CEP !";var VldCepALERTcaractcep="O CEP deve ter caracteres numericos !";var VldPwdALERTcamposenha="A senha é obrigatória!";var VldPwdALERTsenhadif="As senhas não são iguais !";var VldTrocaPwdALERTcamposenhaatual="A senha atual é obrigatória !";var VldTrocaPwdALERTcamposenha="A senha é obrigatória !";var VldTrocaPwdALERTsenhadif="As senhas não são iguais !";var VldFaleConALERTcmpnome="O nome é obrigatório !";var VldFaleConALERTcmpemail="O e-mail é um campo obrigatório !";var VldFaleConALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VldFaleConALERTcmpassunto="O assunto é obrigatório !";var VldFaleConALERTcmpcomentario="O comentário é obrigatório !";var VldNewsALERTcmpnome="O nome é obrigatório !";var VldNewsALERTcmpemail="O e-mail é um campo obrigatório !";var VldNewsALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VldEndALERTcmpfisjur="Escolha a opção de cadastro entre Pessoa Física ou Pessoa Jurídica !";var VldEndALERTcmprazaosocial="A Razão Social é um campo obrigatório !";var VldEndALERTcmpcnpj="O CNPJ é um campo obrigatório !";var VldEndALERTcmpcnpjinc="O CNPJ não é válido !";var VldEndALERTcmpnome="O nome é um campo obrigatório !";var VldEndALERTcmpcpf="O CPF é um campo obrigatório !";var VldEndALERTcmpcpfinc="O CPF não é vállido !";var VldEndALERTcmprg="O RG é um campo obrigatório !";var VldEndALERTcmpend="O endereço é um campo obrigatório !";var VldEndALERTcmpnum="O número é um campo obrigatório !";var VldEndALERTcmpcep="O CEP é um campo obrigatório !";var VldEndALERTcmptamcep="O CEP deve ter 8 caracteres numericos !";var VldEndALERTcmpcidade="A cidade é um campo obrigatório !";var VldEndALERTcmpddd="O DDD é um campo obrigatório !";var VldEndALERTcmptel="O telefone é um campo obrigatório !";var VldEndALERTcmpemail="O e-mail é um campo obrigatório !";var VldEndALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VldCartaoALERTcmptamnumcartao="O campo cartão deve conter 16 caracteres numéricos !";var VldCartaoALERTcmpnumcartao="O número do cartão é obrigatório !";var VldCartaoALERTcmpdataval="A data de validade do cartão é obrigatória !";var VldCartaoALERTcmpcodseg="O código de segurança do cartão é obrigatório !";var RnvPwdALERTreenvsenha="Reenviar senha";var RnvPwdALERTautentusuario="Autenticar usuário";var CkLoginALERTcmpemail="O e-mail é um campo obrigatório !";var CkLoginALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var CkLoginALERTcmpsenha="A senha é um campo obrigatório !";var CkNwLoginALERTcmpemail="O e-mail é um campo obrigatório !";var CkNwLoginALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VrfCepALERTcepentdif="O cep informado para cálculo de frete é diferente do informado para entrega, dessa forma, será refeito o cálculo do frete. Deseja prosseguir?";var VrfCepALERTcepentcobdif="O cep informado para cálculo de frete é diferente do informado para cobranÃ§a/entrega, dessa forma, será refeito o cálculo do frete. Deseja prosseguir?";var CkOpPagALERTselpag="Selecione uma opção de pagamento";var VldMosetALERTcmpnumcartao="O número do cartãoo é obrigatório !";var VldMosetALERTcmpemail="O e-mail é um campo obrigatório !";var VldMosetALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VldMosetALERTcmpassunto="O assunto é obrigatório !";var VldMosetALERTcmpcomentario="O comentário é obrigatório !";var AtzCarALERTqtdestoque="A quantidade escolhida para o produto é superior a disponÃvel em nosso estoque.";var VldIndALERTcmpnome="O nome é um campo obrigatório !";var VldIndALERTcmpemail="O e-mail é um campo obrigatório !";var VldIndALERTcmpemailinc="Por favor, preencha corretamente o campo e-mail.";var VldIndALERTcmpcomentario="O comentário é obrigatório !";
