var browserType="";var browserVersion=0;if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var oprversion=new Number(RegExp.$1);if(oprversion>=10){browserType="Opera";browserVersion=10}else{if(oprversion>=9){browserType="Opera";browserVersion=9}else{if(oprversion>=8){browserType="Opera";browserVersion=8}else{if(oprversion>=7){browserType="Opera";browserVersion=7}}}}}else{if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var ffversion=new Number(RegExp.$1);if(ffversion>=3){browserType="Firefox";browserVersion=3}else{if(ffversion>=2){browserType="Firefox";browserVersion=2}else{if(ffversion>=1){browserType="Firefox";browserVersion=1}}}}else{if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1);if(ieversion>=8){browserType="IE";browserVersion=8}else{if(ieversion>=7){browserType="IE";browserVersion=7}else{if(ieversion>=6){browserType="IE";browserVersion=6}else{if(ieversion>=5){browserType="IE";browserVersion=5}}}}}}}function trim(f){var e=0,d=f.length-1;while(f.charAt(e)==" "){e++}while(f.charAt(d)==" "){d--}if(e>d){return""}return f.substring(e,d+1)}function clickOnce(b){b.disabled=true}function showhide(b){if(document.getElementById(b)){obj=document.getElementById(b);if(obj.style.display=="none"){obj.style.display=""}else{obj.style.display="none"}}}function show(b){if(document.getElementById(b)){obj=document.getElementById(b);obj.style.display=""}else{alert("function show(): Nao foi encontrado o objecto com ID = "+b)}}function hide(b){if(document.getElementById(b)){obj=document.getElementById(b);obj.style.display="none"}else{alert("function hide(): Nao foi encontrado o objecto com ID = "+b)}}function show_block(b){if(document.getElementById(b)){obj=document.getElementById(b);obj.style.display="block"}else{alert("function show_block(): Nao foi encontrado o objecto com ID = "+b)}}function copyValueComboToInput(c,d){d.value=c[c.selectedIndex].value}function copyTextComboToInput(c,d){d.value=c[c.selectedIndex].text}var tempX=0;var tempY=0;function getMousePos(b){if(document.layers||document.getElementById&&!document.all){tempX=b.pageX;tempY=b.pageY}else{if(document.all){tempX=Event.pointerX(event);tempY=Event.pointerY(event)}}if(false){document.getElementById("caixa_inscricao_tempx").innerHTML="tempX = "+tempX+"<br>tempY = "+tempY+"<br>"}}if(!window.captureEvents){document.onmousemove=getMousePos}if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE);window.onmousemove=getMousePos}function alteraCartPopup(){var b="/shoppingcart/alteracartpopupajax";new Ajax.Updater("popup2",b,{method:"get"})}var tr_count=0;var tr_count_maximo=50;var tr_width_aumento=10;var tr_timeout_tempo=20;var timeout_trans;function trans_poe_width(e,f,h){var g=document.getElementById(e);if(tr_count>0){tr_count--;g.style.filter="alpha(opacity="+(100-100*tr_count/tr_count_maximo)+")";if((100-100*tr_count/tr_count_maximo)==100){g.style.opacity="1.00"}else{if((100-100*tr_count/tr_count_maximo)-10<0){g.style.opacity="0.0"+(100-100*tr_count/tr_count_maximo)}else{g.style.opacity="0."+(100-100*tr_count/tr_count_maximo)}}timeout_trans=setTimeout("trans_poe_width('"+e+"', "+(f+tr_width_aumento)+", '"+h+"')",tr_timeout_tempo)}else{if(document.getElementById(h)){trans_show(h)}g.style.filter="alpha(opacity=100)";g.style.opacity="1.00";clearTimeout(timeout_trans);g.style.display="block";tr_count=tr_count_maximo;window.setTimeout("trans_poe_width_fade('"+e+"', "+f+", '"+h+"')",1000)}}function trans_poe_width_fade(e,f,h){var g=document.getElementById(e);if(tr_count>0){tr_count--;g.style.filter="alpha(opacity="+(tr_count*2)+")";if(tr_count*2==100){g.style.opacity="1.00"}else{if(tr_count*2<10){g.style.opacity="0.0"+(tr_count*2)}else{g.style.opacity="0."+(tr_count*2)}}timeout_trans=setTimeout("trans_poe_width_fade('"+e+"', "+(f+tr_width_aumento)+", '"+h+"')",tr_timeout_tempo)}else{if(document.getElementById(h)){trans_hide(h)}document.getElementById(e).style.left="-300px";document.getElementById(e).style.top="-300px";clearTimeout(timeout_trans)}}function trans_show(b){if(document.getElementById(b)){document.getElementById(b).style.display="block"}}function trans_hide(b){if(document.getElementById(b)){document.getElementById(b).style.display="none"}}function trans_showhide(d){var c=document.getElementById(d);if(c.style.display=="none"){c.style.display="block"}else{if(c.style.display=="block"){c.style.display="none"}}}function trans_show_transition(e,d){var f=document.getElementById(e);f.style.filter="alpha(opacity=0)";f.style.opacity="0.00";if(document.getElementById(d)){trans_hide(d)}clearTimeout(timeout_trans);f.style.display="block";tr_count=tr_count_maximo;timeout_trans=setTimeout("trans_poe_width('"+e+"', "+tr_width_aumento+", '"+d+"');",tr_timeout_tempo)}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"}function goGeral(p,m,r,q,o,s,l){var t=s;var u=decodeURIComponent(l);var n=o;if(p!=""){document.pagination.items_per_page.value=p}if(m!=""){document.pagination.sortField.value=m}if(r!=""){document.pagination.sortOrder.value=r}document.pagination.page.value=1;if(t==""){sUrl="/product/search"}else{if(t!=""){sUrl="/product/searchidautores/autor_id/"+t}}if(document.pagination.palavras.value!=""){sUrl+="/palavras/"+document.pagination.palavras.value}sUrl+="/items_per_page/"+document.pagination.items_per_page.value;sUrl+="/page/"+document.pagination.page.value;sUrl+="/sortField/"+document.pagination.sortField.value;sUrl+="/sortOrder/"+document.pagination.sortOrder.value;sUrl+="/facetcode/"+document.pagination.facetcode.value;if(document.pagination.restricts){sUrl+="/restricts/"+document.pagination.restricts.value}sUrl+="/fsel/"+n;sUrl+="/tipo/0";if(u!=""){sUrl+=u}document.location.href=sUrl}function ajaxsearchautores(s,p,v,n,m,r,o,u,t){var q="/product/ajaxsearch";var w="items_per_page="+r;w+="&page="+s;w+="&sortField="+o;w+="&sortOrder="+u;w+="&facetcode="+p;w+="&restricts="+v;w+="&numMax="+m;w+="&autorid="+t;w+="&tipo=0";doajaxsearch(n,w,q,s)}function ajaxsearch(z,v,C,s,q,x,u,B,y,r,t){var E=decodeURIComponent(t);var A=r;if(A=="diy"){var w="/product/ajaxsearchdiy"}else{var w="/product/ajaxsearch"}var D="items_per_page="+x;D+="&page="+z;D+="&sortField="+u;D+="&sortOrder="+B;D+="&facetcode="+v;D+="&restricts="+C;D+="&numMax="+q;if(E!=""){D+=E}D+="&palavras="+y;D+="&tipo=0";doajaxsearch(s,D,w,z)}function doajaxsearch(g,e,f,h){document.getElementById(g).innerHTML="<div style=\"text-align: center; margin-top: 10px; margin-bottom: 10px; \"><img border=0 src='/media/ico_searching.gif'/></div>";new Ajax.Updater(g,f,{method:"post",postBody:e,onComplete:function(a){if(b!=null){b=false}else{var b=false}redoMouseEvents(h);if(!__searchLocationFlag){changeLoginFormOrigem(__searchLocationValue)}}})}function show_pesquisa(b){if(document.getElementById(b)){obj=document.getElementById(b);obj.style.display="block"}else{alert("function show_pesquisa(): Nao foi encontrado o objecto com ID = "+b)}}function hide_pesquisa(b){if(document.getElementById(b)){obj=document.getElementById(b);obj.style.display="none"}else{alert("function hide_pesquisa(): Nao foi encontrado o objecto com ID = "+b)}}function hide_all_pesquisa(h,j,f,g,k){if(h!=""){hide_pesquisa(h);document.getElementById("ahref_"+h).className="tab_normal"}if(j!=""){hide_pesquisa(j);document.getElementById("ahref_"+j).className="tab_normal"}if(f!=""){hide_pesquisa(f);document.getElementById("ahref_"+f).className="tab_normal"}if(g!=""){hide_pesquisa(g);document.getElementById("ahref_"+g).className="tab_normal"}if(k!=""){hide_pesquisa(k);document.getElementById("ahref_"+k).className="tab_normal"}}function isDefined(b){return(typeof(window[b])!="undefined")}function selecciona(id,facetcode,restricts,numMax,tab1,tab2,tab3,tab4,todos,items_per_page,sortField,sortOrder,palavras){hide_all_pesquisa(tab1,tab2,tab3,tab4,todos);show_pesquisa(id);document.getElementById("ahref_"+id).className="tab_select";if(isDefined("var_"+id)){}else{ajaxsearch(1,facetcode,restricts,id,numMax,items_per_page,sortField,sortOrder,palavras);eval("var_"+id+" = 1")}}function __enviaEmailProcuramos(){var d="/product/enviaemailprocuramos/";var c=$j.trim($j("#emailProcuramosPorSi").val());if(c==null||c==""||!validateEmail(c)){alert("Necessita preencher o campo email!")}else{$j("#mensagemProcuramos").html("<div style=\"text-align: center; margin-top: 10px; margin-bottom: 10px; \"><img border=0 src='/media/ico_searching.gif'/></div>");$j.post(d,$j("#procuramosForm").serialize(),function(a){var b=a||"Ocorreu um erro no envio. Por favor tente mais tarde.";$j("#mensagemProcuramos").html(b)})}}var MAX_DUMP_DEPTH=10;function dumpObj(n,q,k,m){if(m>MAX_DUMP_DEPTH){return k+q+": <Maximum Depth Reached>\n"}if(typeof n=="object"){var l=null;var e=k+q+"\n";k+="\t";for(var p in n){try{l=n[p]}catch(o){l="<Unable to Evaluate>"}if(typeof l=="object"){e+=dumpObj(l,p,k,m+1)}else{e+=k+p+": "+l+"\n"}}return e}else{return n}}var origemJavaScript;function callAjax(l,h,g){if(origemJavaScript!=""){var j=origemJavaScript.substring(1)}else{var j=""}var k="/email/"+l+"/password/"+h+"/origem/"+j;var m=g+k;new Ajax.Request(m,{method:"post",onSuccess:function(a){var c=a.responseText||"no response text";var b=c.split("...:::...");switch(b[0]){case"0":document.getElementById("popup").style.visibility="hidden";document.getElementById("fLogin").reset();window.location=origemJavaScript;break;default:alert(b[1]);break}},onFailure:function(){alert("Ocorreu um erro no Ajax!")}})}function validaFormLogin(k){k.user.value=k.email.value;var g=Array("email","password");var j=Array("Email","Password");var h="Preencha por favor os seguintes campos:\n";var l=null;var m=___formValidator(k,g,j,h);if(m==""){if(validateEmail(k.email.value)){l=null}else{l="Verifique por favor o e-mail introduzido."}if(l==null){origemJavaScript=document.getElementById("origemPopup").value;return true}else{document.getElementById("msgErroPopUp").innerHTML=l;document.getElementById("msgErroPopUp").style.display="block";return false}}else{document.getElementById("msgErroPopUp").innerHTML=m;document.getElementById("msgErroPopUp").style.display="block";return false}}function errorLogin_show(b){__popup_show("popup","popup_drag","popup_exit","screen-top-left",500,300,"",b)}function recebeEmail(){if(!validateEmail(document.fLogin.email.value)){alert("O email é inválido.");document.fLogin.email.focus();return}var b="/customeraccount/pwrecoveryajax";b+="/email/"+document.fLogin.email.value;$("msgErroPopUp").innerHTML='<div style="text-align: center; margin-top: 10px; margin-bottom: 10px; "><img border=0 src="/media/ico_searching.gif"></div>';$("msgErroPopUp").style.display="none";new Ajax.Updater("msgErroPopUp",b,{method:"get",onComplete:sucessRecebeEmail()})}function sucessRecebeEmail(){$("msgErroPopUp").style.display="block"}function makeWindowed(h){var g=document.getElementById(h);if(g!=null){var k=document.all&&(navigator.userAgent.toLowerCase().indexOf("msie 6.")!=-1);if(k){var f='<iframe src="/media/transparent.png" style="position: absolute; display: block; z-index: -1; width: 100%; height: 100%; top: 0; left: 0;filter: mask(); background-color: #ffffff; "></iframe>';if(g){g.innerHTML+=f}var j=g.style.display;g.style.display="none";g.style.display=j}}else{}}var __flashVideoName="";var __flashVideoUrlExterno="";var ytplayer=null;function stopVideoOnclick(g){var f;if(typeof window.event!="undefined"){f=window.event}else{f=g}var h;if(typeof f.srcElement!="undefined"){h=f.srcElement}else{h=f.target}var e=h.id;if(e!=null){if(__flashVideoExterno.blank()){stopVideo(__flashVideoName)}else{alternateVideoExterno(__flashVideoName)}}}function associaEventosExit(g,e,f){__flashVideoName=e;__flashVideoExterno=f;var h=document.getElementById(g);if(h!=null){if(typeof window.attachEvent!="undefined"){h.attachEvent("onclick",stopVideoOnclick)}else{h.addEventListener("click",stopVideoOnclick,false)}}}function stopVideo(b){if(navigator.appName.indexOf("Microsoft")!=-1){window[b].stop_video()}else{document[b].stop_video}}function alternateVideoExterno(b){ytplayer.pauseVideo()}function $RF(h,e,f){if($(h).type&&$(h).type.toLowerCase()=="radio"){var e=$(h).name;var h=$(h).form}else{if($(h).tagName.toLowerCase()!="form"){return false}}var g=$(h).getInputs("radio",e).find(function(a){return a.checked});if(f!=null){return(g)?(g):null}else{return(g)?$F(g):null}}function processaNumero(g,h){var j="";var k=0;g=g.toString();g=g.replace(/^\s+|\s+$/g,"");h=h*1;posicaoPonto=g.lastIndexOf(".");if(posicaoPonto==0){g="0"+g;posicaoPonto=1}if(posicaoPonto==-1||posicaoPonto==g.length-1){if(h>0){j=g+".";for(k=0;k<h;k++){j+="0"}return j}else{return g}}var f=(g.length-1)-posicaoPonto;if(f==h){return g}if(f<h){j=g;for(k=f;k<h;k++){j+="0"}return j}}function showListTitleInfo(f,d){var e="";if(jsQtdListaCompras>0||jsQtdListaCompras<d){e="Lista de Compras ou desejos"}else{e="Lista de Compras ou desejos. Crie uma lista de produtos que deseja, envie-a aos seus amigos e seja informado sobre promoções."}$(f).writeAttribute("title",e)}function resetListTitleInfo(b){$(b).writeAttribute("title","")}var popup_dragging=false;var popup_target;var popup_mouseX;var popup_mouseY;var popup_mouseposX;var popup_mouseposY;var popup_oldfunction;function popup_mousedown(d){var c=navigator.appName=="Microsoft Internet Explorer";popup_mouseposX=c?window.event.clientX:d.clientX;popup_mouseposY=c?window.event.clientY:d.clientY}function popup_mousedown_window(d){var c=navigator.appName=="Microsoft Internet Explorer";if(c&&window.event.button!=1){return}if(!c&&d.button!=0){return}popup_dragging=true;popup_target=this["target"];popup_mouseX=c?window.event.clientX:d.clientX;popup_mouseY=c?window.event.clientY:d.clientY;if(c){popup_oldfunction=document.onselectstart}else{popup_oldfunction=document.onmousedown}if(c){document.onselectstart=new Function("return false;")}else{document.onmousedown=new Function("return false;")}}function popup_mousemove(j){var h=navigator.appName=="Microsoft Internet Explorer";var k=document.getElementById(popup_target);var e=h?window.event.clientX:j.clientX;var g=h?window.event.clientY:j.clientY;if(!popup_dragging){return}k.style.left=(k.offsetLeft+e-popup_mouseX)+"px";k.style.top=(k.offsetTop+g-popup_mouseY)+"px";popup_mouseX=h?window.event.clientX:j.clientX;popup_mouseY=h?window.event.clientY:j.clientY}function popup_mouseup(d){var f=navigator.appName=="Microsoft Internet Explorer";var e=document.getElementById(popup_target);if(!popup_dragging){return}popup_dragging=false;if(f){document.onselectstart=popup_oldfunction}else{document.onmousedown=popup_oldfunction}}function popup_exit(d){var f=navigator.appName=="Microsoft Internet Explorer";var e=document.getElementById(popup_target);popup_mouseup(d);e.style.display="none"}function __popup_show(m,n,k,j,o,q,p,l){popup_show(m,n,k,j,o,q,p);document.getElementById("origemPopup").value=l}function popup_show(z,t,C,v,q,r,s){var w=document.getElementById(z);var x=document.getElementById(t);var u=document.getElementById(C);var A=window.innerWidth?window.innerWidth:document.documentElement.clientWidth;var p=window.innerHeight?window.innerHeight:document.documentElement.clientHeight;w.style.position="absolute";w.style.display="block";w.style.visibility="visible";if(v=="element"||v=="element-right"||v=="element-bottom"){var y=document.getElementById(s);for(var B=y;B;B=B.offsetParent){if(B.style.position!="absolute"){q+=B.offsetLeft;r+=B.offsetTop}}if(v=="element-right"){q+=y.clientWidth}if(v=="element-bottom"){r+=y.clientHeight}w.style.left=q+"px";w.style.top=r+"px"}if(v=="mouse"){w.style.left=(document.documentElement.scrollLeft+popup_mouseposX+q)+"px";w.style.top=(document.documentElement.scrollTop+popup_mouseposY+r)+"px"}if(v=="screen-top-left"){w.style.left=(document.documentElement.scrollLeft+q)+"px";w.style.top=(document.documentElement.scrollTop+r)+"px"}if(v=="screen-center"){w.style.left=(document.documentElement.scrollLeft+(A-w.clientWidth)/2+q)+"px";w.style.top=(document.documentElement.scrollTop+(p-w.clientHeight)/2+r)+"px"}if(v=="screen-bottom-right"){w.style.left=(document.documentElement.scrollLeft+(A-w.clientWidth)+q)+"px";w.style.top=(document.documentElement.scrollTop+(p-w.clientHeight)+r)+"px"}x.target=z;x.onmousedown=popup_mousedown_window;u.onclick=popup_exit}if(navigator.appName=="Microsoft Internet Explorer"){document.attachEvent("onmousedown",popup_mousedown)}else{document.addEventListener("mousedown",popup_mousedown,false)}if(navigator.appName=="Microsoft Internet Explorer"){document.attachEvent("onmousemove",popup_mousemove)}else{document.addEventListener("mousemove",popup_mousemove,false)}if(navigator.appName=="Microsoft Internet Explorer"){document.attachEvent("onmouseup",popup_mouseup)}else{document.addEventListener("mouseup",popup_mouseup,false)}window.dhtmlHistory={isIE:false,isOpera:false,isSafari:false,isKonquerer:false,isGecko:false,isSupported:false,create:function(k){var q=this;window.historyStorage.setup(k);if(k&&k.baseTitle){if(k.baseTitle.indexOf("@@@")<0&&historyStorage.debugMode){throw new Error("Programmer error: options.baseTitle must contain the replacement parameter '@@@' to be useful.")}this.baseTitle=k.baseTitle}var p=navigator.userAgent.toLowerCase();var s=navigator.platform.toLowerCase();var o=navigator.vendor||"";if(o==="KDE"){this.isKonqueror=true;this.isSupported=false}else{if(typeof window.opera!=="undefined"){this.isOpera=true;this.isSupported=true}else{if(typeof document.all!=="undefined"){this.isIE=true;this.isSupported=true}else{if(o.indexOf("Apple Computer, Inc.")>-1){this.isSafari=true;this.isSupported=(s.indexOf("mac")>-1)}else{if(p.indexOf("gecko")!=-1){this.isGecko=true;this.isSupported=true}}}}}if(this.isSafari){this.createSafari()}else{if(this.isOpera){this.createOpera()}}var r=this.getCurrentLocation();this.currentLocation=r;if(this.isIE){if(k&&k.blankURL){var n=k.blankURL;this.blankURL=(n.indexOf("?")!=n.length-1?n+"?":n)}this.createIE(r)}var l=function(){q.firstLoad=null};this.addEventListener(window,"unload",l);if(this.isIE){this.ignoreLocationChange=true}else{if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.ignoreLocationChange=true;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.ignoreLocationChange=false;this.firstLoad=false;this.fireOnNewListener=true}}var m=function(){q.checkLocation()};setInterval(m,100)},initialize:function(b){this.originalTitle=document.title;if(this.isIE){if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.fireOnNewListener=false;this.firstLoad=true;historyStorage.put(this.PAGELOADEDSTRING,true)}else{this.fireOnNewListener=true;this.firstLoad=false}}if(b){this.addListener(b)}},addListener:function(b){this.listener=b;if(this.fireOnNewListener){this.fireHistoryEvent(this.currentLocation);this.fireOnNewListener=false}},changeTitle:function(g){var e=(g&&g.newTitle?this.baseTitle.replace("@@@",g.newTitle):this.originalTitle);if(document.title==e){return}document.title=e;if(this.isIE){this.iframe.contentWindow.document.title=e}if(!this.isIE&&!this.isOpera){var h=decodeURIComponent(document.location.hash);if(h!=""){var f=encodeURIComponent(this.removeHash(h));document.location.hash=f}else{}}},add:function(j,h){var k=this;var g=this.removeHash(j);if(this.isSafari){historyStorage.put(j,h);this.currentLocation=g;window.location.hash=g;this.putSafariState(g);this.changeTitle(h)}else{var f=function(){if(k.currentWaitTime>0){k.currentWaitTime=k.currentWaitTime-k.waitTime}if(document.getElementById(g)&&k.debugMode){var a="Exception: History locations can not have the same value as _any_ IDs that might be in the document, due to a bug in IE; please ask the developer to choose a history location that does not match any HTML IDs in this document. The following ID is already taken and cannot be a location: "+j;throw new Error(a)}historyStorage.put(j,h);k.ignoreLocationChange=true;k.ieAtomicLocationChange=true;k.currentLocation=g;window.location.hash=g;if(k.isIE){k.iframe.src=k.blankURL+g}k.ieAtomicLocationChange=false;k.changeTitle(h)};window.setTimeout(f,this.currentWaitTime);this.currentWaitTime=this.currentWaitTime+this.waitTime}},isFirstLoad:function(){return this.firstLoad},getVersion:function(){return this.VERSIONNUMBER},PAGELOADEDSTRING:"DhtmlHistory_pageLoaded",VERSIONNUMBER:"0.8",baseTitle:"@@@",originalTitle:null,blankURL:"blank.html?",listener:null,waitTime:200,currentWaitTime:0,currentLocation:null,iframe:null,safariHistoryStartPoint:null,safariStack:null,safariLength:null,ignoreLocationChange:null,fireOnNewListener:null,firstLoad:null,ieAtomicLocationChange:null,addEventListener:function(f,d,e){if(f.addEventListener){f.addEventListener(d,e,false)}else{if(f.attachEvent){f.attachEvent("on"+d,function(){e(window.event)})}}},createIE:function(f){this.waitTime=400;var e=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var g="rshHistoryFrame";var h='<iframe frameborder="0" id="'+g+'" style="'+e+'" src="'+this.blankURL+f+'"></iframe>';document.write(h);this.iframe=document.getElementById(g)},createOpera:function(){this.waitTime=400;var b='<img src="javascript:location.href=\'javascript:dhtmlHistory.checkLocation();\';" style="'+historyStorage.hideStyles+'" />';document.write(b)},createSafari:function(){var n="rshSafariForm";var o="rshSafariStack";var h="rshSafariLength";var j=historyStorage.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var k=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var l=(historyStorage.debugMode?"width:800px;height:20px;border:1px solid black;margin:0;padding:0;":historyStorage.hideStyles);var m='<form id="'+n+'" style="'+j+'"><textarea style="'+k+'" id="'+o+'">[]</textarea><input type="text" style="'+l+'" id="'+h+'" value=""/></form>';document.write(m);this.safariStack=document.getElementById(o);this.safariLength=document.getElementById(h);if(!historyStorage.hasKey(this.PAGELOADEDSTRING)){this.safariHistoryStartPoint=history.length;this.safariLength.value=this.safariHistoryStartPoint}else{this.safariHistoryStartPoint=this.safariLength.value}},getCurrentLocation:function(){var b=(this.isSafari?this.getSafariState():this.getCurrentHash());return b},getCurrentHash:function(){var c=window.location.href;var d=c.indexOf("#");return(d>=0?c.substr(d+1):"")},getSafariStack:function(){var b=this.safariStack.value;return historyStorage.fromJSON(b)},getSafariState:function(){var d=this.getSafariStack();var c=d[history.length-this.safariHistoryStartPoint-1];return c},putSafariState:function(c){var d=this.getSafariStack();d[history.length-this.safariHistoryStartPoint]=c;this.safariStack.value=historyStorage.toJSON(d)},fireHistoryEvent:function(d){var e=decodeURIComponent(d);var f=historyStorage.get(e);this.changeTitle(f);this.listener.call(null,e,f)},checkLocation:function(){if(!this.isIE&&this.ignoreLocationChange){this.ignoreLocationChange=false;return}if(!this.isIE&&this.ieAtomicLocationChange){return}var b=this.getCurrentLocation();if(b==this.currentLocation){return}this.ieAtomicLocationChange=true;if(this.isIE&&this.getIframeHash()!=b){this.iframe.src=this.blankURL+b}else{if(this.isIE){return}}this.currentLocation=b;this.ieAtomicLocationChange=false;this.fireHistoryEvent(b)},getIframeHash:function(){var c=this.iframe.contentWindow.document;var d=String(c.location.search);if(d.length==1&&d.charAt(0)=="?"){d=""}else{if(d.length>=2&&d.charAt(0)=="?"){d=d.substring(1)}}return d},removeHash:function(c){var d;if(c===null||c===undefined){d=null}else{if(c===""){d=""}else{if(c.length==1&&c.charAt(0)=="#"){d=""}else{if(c.length>1&&c.charAt(0)=="#"){d=c.substring(1)}else{d=c}}}}return d},iframeLoaded:function(d){if(this.ignoreLocationChange){this.ignoreLocationChange=false;return}var c=String(d.search);if(c.length==1&&c.charAt(0)=="?"){c=""}else{if(c.length>=2&&c.charAt(0)=="?"){c=c.substring(1)}}window.location.hash=c;this.fireHistoryEvent(c)}};window.historyStorage={setup:function(g){if(typeof g!=="undefined"){if(g.debugMode){this.debugMode=g.debugMode}if(g.toJSON){this.toJSON=g.toJSON}if(g.fromJSON){this.fromJSON=g.fromJSON}}var l="rshStorageForm";var j="rshStorageField";var h=this.debugMode?historyStorage.showStyles:historyStorage.hideStyles;var k=(historyStorage.debugMode?"width: 800px;height:80px;border:1px solid black;":historyStorage.hideStyles);var m='<form id="'+l+'" style="'+h+'"><textarea id="'+j+'" style="'+k+'"></textarea></form>';document.write(m);this.storageField=document.getElementById(j);if(typeof window.opera!=="undefined"){this.storageField.focus()}},put:function(e,f){var d=e;this.assertValidKey(d);if(this.hasKey(e)){this.remove(e)}this.storageHash[d]=f;this.saveHashTable()},get:function(e){var f=e;this.assertValidKey(f);this.loadHashTable();var d=this.storageHash[f];if(d===undefined){d=null}return d},remove:function(d){var c=d;this.assertValidKey(c);this.loadHashTable();delete this.storageHash[c];this.saveHashTable()},reset:function(){this.storageField.value="";this.storageHash={}},hasKey:function(d){var c=d;this.assertValidKey(c);this.loadHashTable();return(typeof this.storageHash[c]!=="undefined")},isValidKey:function(b){return(typeof b==="string")},showStyles:"border:0;margin:0;padding:0;",hideStyles:"left:-1000px;top:-1000px;width:1px;height:1px;border:0;position:absolute;",debugMode:false,storageHash:{},hashLoaded:false,storageField:null,assertValidKey:function(d){var c=this.isValidKey(d);if(!c&&this.debugMode){throw new Error("Please provide a valid key for window.historyStorage. Invalid key = "+d+".")}},loadHashTable:function(){if(!this.hashLoaded){var b=this.storageField.value;if(b!==""&&b!==null){this.storageHash=this.fromJSON(b);this.hashLoaded=true}}},saveHashTable:function(){this.loadHashTable();var b=this.toJSON(this.storageHash);this.storageField.value=b},toJSON:function(b){return b.toJSONString()},fromJSON:function(b){return b.parseJSON()}};function onKeyPressValidateSecureInput(h){var f=window.event?h.keyCode:h.which;var g=String.fromCharCode(f);var e=/[^<>&%\\/"']/;return e.test(g)}function onKeyPressBlockNumbers(d){var e=window.event?d.keyCode:d.which;var f=String.fromCharCode(e);reg=/\d/;return !reg.test(f)}function onKeyPressValidateNumbers(c){var d=(c.which)?c.which:event.keyCode;if(d>31&&(d<48||d>57)){return false}return true}function validateEmail(d){var c=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;if(!c.test(d)){return false}return true}function IsNumeric(e){var g="0123456789.";var h=true;var f;for(i=0;i<e.length&&h==true;i++){f=e.charAt(i);if(g.indexOf(f)==-1){h=false}}return h}function validateNumber(b){if(isNaN(b)||b<0||Math.round(b)!=b){return false}return true}function doubleConfirmation(d,c){if(d.value==c.value){return true}return false}function validateMinimumSize(c,d){if(c.value.length>=d){return true}return false}function formValidator(o,l,m,r){var s=r.length;for(var n=0;n<l.length;n++){var p=o.elements[l[n]];if(p){switch(p.type){case"select-one":if(p.selectedIndex==-1||p.options[p.selectedIndex].text==""){r+=" - "+m[n]+"\n"}break;case"select-multiple":if(p.selectedIndex==-1){r+=" - "+m[n]+"\n"}break;case"text":case"textarea":case"password":if(p.value==""||p.value==null){r+=" - "+m[n]+"\n"}break;default:}if(p.type==undefined){var j=false;for(var q=0;q<p.length;q++){if(p[q].checked){j=true}}if(!j){r+=" - "+m[n]+"\n"}}}}if(r.length==s){return true}else{alert(r);return false}}function ___formValidator(o,l,m,r){var s=r.length;for(var n=0;n<l.length;n++){var p=o.elements[l[n]];if(p){switch(p.type){case"select-one":if(p.selectedIndex==-1||p.options[p.selectedIndex].text==""){r+=" - "+m[n]+"\n"}break;case"select-multiple":if(p.selectedIndex==-1){r+=" - "+m[n]+"\n"}break;case"text":case"textarea":case"password":if(p.value==""||p.value==null){r+=" - "+m[n]+"\n"}break;default:}if(p.type==undefined){var j=false;for(var q=0;q<p.length;q++){if(p[q].checked){j=true}}if(!j){r+=" - "+m[n]+"\n"}}}}if(r.length==s){return""}else{return r}}function isDate(m,n,o){var h=new Date(m,n-1,o);var l=h.getYear();if(l<2000){l=l+1900}var k=parseInt(h.getMonth()+1);var j=h.getDate();if((l==m)&&(k==n)&&(j==o)){return true}else{return false}}function validaFormPWRecovery(b){alertMsg=null;if(validateEmail(b.email.value)){alertMsg=null}else{alertMsg="O email é inválido."}if(alertMsg==null){return true}else{alert(alertMsg);return false}}function validaFormVales(k){var g=Array("nib1","nib2","nib3","nib4");var j=Array("NIB 1.parte","NIB 2. parte","NIB 3.parte","NIB 4.parte");var h="Preencha por favor os seguintes campos:\n";var l=null;var m=k.nib1.value+k.nib1.value+k.nib3.value+k.nib4.value;if(formValidator(k,g,j,h)){if(validateMinimumSize(k.nib1,4)){if(IsNumeric(m)){if(k.opcao.options[k.opcao.selectedIndex].value!="0"){l=null}else{l="Selecione um Vale"}}else{l="NIB não numérico"}}else{l="NIB incorrecto"}if(l==null){return true}else{alert(l);return false}}else{return false}}function validaFormRegisto(n,o){selectCPInput(n,o);var m="!@#$%^&*()+=-[]\\';,./{}|\":<>?";if(n.paisID.options[n.paisID.selectedIndex].value==o){var j=Array("nome","email","password","moradaDesc","morada","cp4","cp3","localidade");var l=Array("Nome","Email","Password","Identificação da morada","Morada","Código Postal 1","Código Postal 2","Localidade")}else{var j=Array("nome","email","password","moradaDesc","morada","cpE","localidade");var l=Array("Nome","Email","Password","Identificação da morada","Código Postal","Localidade")}var k="Preencha por favor os seguintes campos:\n";var p=null;if(formValidator(n,j,l,k)){if(validateMinimumSize(n.password,4)){if(doubleConfirmation(n.password,n.passwordConf)){if(validateEmail(n.email.value)){if(doubleConfirmation(n.email,n.emailConf)){if(isDate(n.anoN.value,n.mesN.value,n.diaN.value)||(n.anoN.value==0&&n.mesN.value==0&&n.diaN.value==0)){p=null}else{p="A data de nascimento não é uma data válida."}}else{p="Confirme por favor o email que escolheu."}}else{p="O email é inválido."}}else{p="Confirme por favor a password que escolheu."}}else{p="A password deve ter pelo menos 4 caracteres."}for(var q=0;q<n.password.value.length;q++){if(m.indexOf(n.password.value.charAt(q))!=-1){p="A sua password contém caracteres inválidos. \nEstes não são permitidos. Por favor remova-os e tente de novo."}}if(p==null){return true}else{alert(p);return false}}else{return false}}function selectCPInput(g,h){var e="cp_nacio";var f="cp_inter";if(typeof(g.moradaID)!="undefined"){e=e+g.moradaID.value;f=f+g.moradaID.value}if(g.paisID.options[g.paisID.selectedIndex].value==h){document.getElementById(f).style.display="none";document.getElementById(e).style.display="block"}else{document.getElementById(e).style.display="none";document.getElementById(f).style.display="block"}}function clearAllCPs(){$("cpE").value="";$("cp3").value="";$("cp4").value=""}function __validaFormEditMorada(c,d){return __validaFormNewMorada(c,d)}function __validaFormNewMorada(m,n){if(m.paisID.options[m.paisID.selectedIndex].value==n){var j=Array("nome","morada","localidade","cp4","cp3","moradaDefault","moradaDesc");var l=Array("Nome","Morada","Localidade","Código Postal 1","Código Postal 2","Morada Principal","Descrição da Morada");var q=9;var o=9}else{var j=Array("nome","morada","localidade","cpE","moradaDefault","moradaDesc");var l=Array("Nome","Morada","Localidade","Código Postal","Morada Principal","Descrição da Morada");var q=9;var o=15}var k="Preencha por favor os seguintes campos:\n";var p=null;if(formValidator(m,j,l,k)){if(__validaTelefone(m.telefone.value,50)){if(__validaNIF(m.nif.value,18)){if(m.paisID.options[m.paisID.selectedIndex].value==n){if(validaTelefone(m.telefone.value,o)){if(validaNIF(m.nif.value)){if(validaCodigoPostal(m.cp4.value+"-"+m.cp3.value)){p=null}else{p="O Código Postal é inválido."}}else{p="Confirme por favor o NIF que escolheu ( "+q+" números)."}}else{p="Confirme por favor o telefone que escolheu ("+o+" números)."}}}else{p="Confirme por favor o NIF que escolheu."}}else{p="Confirme por favor o telefone que escolheu."}if(p==null){return true}else{alert(p);return false}}else{return false}}function deleteMorada(g,h,f,e){document.getElementById(h).style.backgroundColor=f;if(confirm("Tem a certeza que quer eliminar esta morada?")){g.action="/customeraccount/deleteaccountaddress";g.submit()}else{document.getElementById(h).style.backgroundColor=e}}function validaCodigoPostal(d){var c=/^\d{4}([\-]\d{3})?$/;return(c.test(d))}function validaTelefone(e,f){if(e!=null&&!e.strip().blank()){switch(f){case 15:var d=/^\d{15}?$/;break;default:var d=/^\d{9}?$/;break}if(e.match(d)){return true}else{return false}}else{return true}}function validaNIF(d){if(d!=null&&!d.strip().blank()){var c=/^\d{9}?$/;if(d.match(c)){return true}else{return false}}else{return true}}function __validaNIF(numero,n){if(numero!=null&&!numero.strip().blank()){eval("var rexp = /^[0-9A-Za-z ]{0,"+(n-1)+"}$/;");if(numero.match(rexp)){return true}else{return false}}else{return true}}function __validaTelefone(numero,n){if(numero!=null&&!numero.strip().blank()){eval("var rexp = /^[0-9]{0,"+(n-1)+"}$/;");if(numero.match(rexp)){return true}else{return false}}else{return true}}function _ValidaCodPostalAction(inputName1,inputName2,divRetorno,controller){var inputName1=inputName1;var inputName2=inputName2;var divRetorno=divRetorno;var controller="/"+controller;var codPostal4=$j("input#"+inputName1).val();if(codPostal4.length==4){var codPostal3=$j("input#"+inputName2).val();var path="";var url=controller+"/validacodpostalajax/";var sURL=path+url;vars="&cod4="+codPostal4+"&cod3="+codPostal3;alert(vars);$j.ajax({type:"POST",url:sURL,data:vars,error:function(XMLHttpRequest,textStatus,errorThrown){alert("Ocorreu um erro a processar o seu pedido. Por favor tente mais tarde.")},success:function(data,textStatus,XMLHttpRequest){var response=data||eval(alert("O código postal introduzido não está correcto!"));eval(response)}})}}function _ValidaCodPostalAction1(inputName1,inputName2,divRetorno,controller){var inputName1=inputName1;var inputName2=inputName2;var divRetorno=divRetorno;var controller="/"+controller;var codPostal4=$j(inputName1).val();if(codPostal4.length==4){var codPostal3=$j(inputName2).val();var path="";var url=controller+"/validacodpostalajax/";var sURL=path+url;vars="&cod4="+codPostal4+"&cod3="+codPostal3;$j.ajax({type:"POST",url:sURL,data:vars,error:function(XMLHttpRequest,textStatus,errorThrown){alert("Ocorreu um erro a processar o seu pedido. Por favor tente mais tarde.")},success:function(data,textStatus,XMLHttpRequest){var response=data||eval(alert("O código postal introduzido não está correcto!"));eval(response)}})}}function verifyAmericanExpress(c){if(c!=null){var d=c.options[c.selectedIndex].value;if(d!=null&&(idAmericanExpress==d)){flgAmericanExpress=true}else{flgAmericanExpress=false}}}function MostraDadosPagamento(c){c.desc_pag.value=c.tipo_pag.options[c.tipo_pag.selectedIndex].text;for(var d=0;d<c.tipo_pag.length;d++){hide("dados_pag_"+c.tipo_pag.options[d].value)}show("dados_pag_"+c.tipo_pag.options[c.tipo_pag.selectedIndex].value);if((c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_CC_OFFLINE)||(c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_CC_ONLINE)){if(document.getElementById("imagens_CC")){show("imagens_CC")}}else{if(document.getElementById("imagens_CC")){hide("imagens_CC")}}if(c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_CC_ONLINE){if(document.getElementById("tipo_cartao")){show("tipo_cartao")}}else{if(document.getElementById("tipo_cartao")){hide("tipo_cartao")}}if(c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_TLMB){if(document.getElementById("imagens_TLMB")){show("imagens_TLMB")}}else{if(document.getElementById("imagens_TLMB")){hide("imagens_TLMB")}}if(c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_MB){if(document.getElementById("imagens_MB")){show("imagens_MB")}}else{if(document.getElementById("imagens_MB")){hide("imagens_MB")}}if(c.tipo_pag.options[c.tipo_pag.selectedIndex].value==PAG_CHEQUE){if(document.getElementById("imagens_CHEQUE")){show("imagens_CHEQUE")}}else{if(document.getElementById("imagens_CHEQUE")){hide("imagens_CHEQUE")}}}function validate_required(field,alerttxt){with(field){if(value==null||value==""){alert(alerttxt);return false}else{return true}}}function validate_length(field,len_min,alerttxt){with(field){if(value==null||value.length<len_min){alert(alerttxt);return false}else{return true}}}function valida_ntelemovel(b){b=b+"";switch(b.substring(0,2)){case"91":return true;break;case"92":return true;break;case"93":return true;break;case"96":return true;break;default:return false;break}}function validateFrmPaymentOptions(thisForm){valor_tipo_pag=thisForm.tipo_pag.options[thisForm.tipo_pag.selectedIndex].value;if(valor_tipo_pag==PAG_CC_ONLINE){if(thisForm.tipo_cartao.selectedIndex==0){alert("Seleccione um tipo de cartão.");thisForm.tipo_cartao.focus();return false}if(validate_required(thisForm.ncartao,"Indique o número do cartão")==false){thisForm.ncartao.focus();return false}if(validate_length(thisForm.ncartao,12,"O número do cartão tem poucos algarismos")==false){thisForm.ncartao.focus();return false}if(parseFloat(thisForm.data_cartao_ano_on.value)==parseFloat(CARTAO_ANO_ON)){if(parseFloat(thisForm.data_cartao_mes_on.value)<parseFloat(CARTAO_MES_ON)){alert("Verifique o mês de validade do cartão.");thisForm.data_cartao_mes_on.focus();return false}}if(validate_required(thisForm.nome_cartao_on,"Insira o nome do cartão")==false){thisForm.nome_cartao_on.focus();return false}if(!flgAmericanExpress){if(validate_required(thisForm.codigo_seguranca,"Indique o código de segurança do seu cartão de crédito.")==false){thisForm.codigo_seguranca.focus();return false}if(validate_length(thisForm.codigo_seguranca,3,"O código de segurança tem poucos algarismos")==false){thisForm.codigo_seguranca.focus();return false}}else{with(thisForm.codigo_seguranca){if(value!=null&&value!=""){if(validate_length(thisForm.codigo_seguranca,3,"O código de segurança tem poucos algarismos")==false){thisForm.codigo_seguranca.focus();return false}}}}}else{if(valor_tipo_pag==PAG_CC_OFFLINE){if(parseFloat(thisForm.data_cartao_ano_off.value)==parseFloat(CARTAO_ANO_ON)){if(parseFloat(thisForm.data_cartao_mes_off.value)<parseFloat(CARTAO_MES_ON)){alert("Verifique o mês de validade do cartão.");thisForm.data_cartao_mes_off.focus();return false}}if(validate_required(thisForm.nome_cartao_off,"Indique o nome em que está emitido o cartão")==false){thisForm.nome_cartao_off.focus();return false}}else{if(valor_tipo_pag==PAG_TLMB){if(thisForm.operador.selectedIndex==0){alert("Seleccione um operador.");thisForm.operador.focus();return false}if(validate_required(thisForm.ntelemovel,"Indique um nº de telemóvel válido.")==false){thisForm.ntelemovel.focus();return false}if(validate_length(thisForm.ntelemovel,9,"Indique um nº de telemóvel válido.")==false){thisForm.ntelemovel.focus();return false}if(!valida_ntelemovel(thisForm.ntelemovel.value)){alert("Indique um nº de telemóvel válido.");thisForm.ntelemovel.focus();return false}}else{if(valor_tipo_pag==PAG_MB){}}}}return true}function __callValidaValeAction(){if($j("select#vales_disponiveis")!=null&&$j.trim($j("select#vales_disponiveis option:selected").val()).length>0){var paramCodigoSelect=$j("select#vales_disponiveis option:selected").val()}else{var paramCodigoSelect=null}if($j("input#cod_vale")!=null&&$j("input#cod_vale").val()!=null){var paramCodigoInput=$j("input#cod_vale").val()}else{var paramCodigoInput=null}if(paramCodigoInput==null&&paramCodigoSelect==null){alert("Tem que seleccionar um código de vale.");return}var paramCodigo=null;if((paramCodigoInput!=null&&$j.trim(paramCodigoInput).length>0||(paramCodigoSelect!=null&&$j.trim(paramCodigoSelect).length>0))){if((paramCodigoInput!=null&&paramCodigoSelect!=null)&&(paramCodigoInput!=paramCodigoSelect)){if($j.trim(paramCodigoInput).length>0){paramCodigo=paramCodigoInput}else{paramCodigo=paramCodigoSelect}alert("O vale a validar será o: "+paramCodigo)}else{paramCodigo=paramCodigoInput}}else{alert("Não existem vales a serem validados.");return}if($j("div#waitingResponse")!=null){$j("div#waitingResponse").html('<img src="/media/ico_searching.gif" title="A processar o pedido..." alt="A processar o pedido...">')}var path="";var url="/checkout/validavaleajax/";var vars="&codigo="+escape(paramCodigo);var sURL=path+url;function Order(){this.tipoPagaID="";this.numCartaoCredito=""}var infoPagamentoOrder=new Order();var numCartao=null;$j("select#tipo_pag option:selected").each(function(){infoPagamentoOrder.tipoPagaID=$j(this).val();numCartao=$j("#ncartao input:text").val();if(numCartao.replace(/\s/g,"")!=""){infoPagamentoOrder.numCartaoCredito=numCartao}});vars+="&tip_paga="+escape(infoPagamentoOrder.tipoPagaID)+"&ncartao="+escape(infoPagamentoOrder.numCartaoCredito);$j.ajax({type:"POST",url:sURL,data:vars,error:function(XMLHttpRequest,textStatus,errorThrown){if($j("div#waitingResponse")!=null){$j("div#waitingResponse").html("")}alert("Ocorreu um erro a processar o seu pedido. Por favor tente mais tarde.")},success:function(data,textStatus,XMLHttpRequest){var response=data||"alert(Ocorreu um erro a processar o seu pedido. Por favor tente mais tarde.)";if($j("div#waitingResponse")!=null){$j("div#waitingResponse").html("")}eval(response)}})}var swfobject=function(){var m="undefined",U="object",B="Shockwave Flash",e="ShockwaveFlash.ShockwaveFlash",T="application/x-shockwave-flash",A="SWFObjectExprInst",f="onreadystatechange",x=window,M=document,W=navigator,C=false,a=[K],R=[],w=[],r=[],O,z,n,k,s=false,D=false,Q,p,P=true,v=function(){var ai=typeof M.getElementById!=m&&typeof M.getElementsByTagName!=m&&typeof M.createElement!=m,ae=W.userAgent.toLowerCase(),ag=W.platform.toLowerCase(),ab=ag?/win/.test(ag):/win/.test(ae),Y=ag?/mac/.test(ag):/mac/.test(ae),ac=/webkit/.test(ae)?parseFloat(ae.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,af=!+"\v1",ad=[0,0,0],X=null;if(typeof W.plugins!=m&&typeof W.plugins[B]==U){X=W.plugins[B].description;if(X&&!(typeof W.mimeTypes!=m&&W.mimeTypes[T]&&!W.mimeTypes[T].enabledPlugin)){C=true;af=false;X=X.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ad[0]=parseInt(X.replace(/^(.*)\..*$/,"$1"),10);ad[1]=parseInt(X.replace(/^.*\.(.*)\s.*$/,"$1"),10);ad[2]=/[a-zA-Z]/.test(X)?parseInt(X.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof x.ActiveXObject!=m){try{var Z=new ActiveXObject(e);if(Z){X=Z.GetVariable("$version");if(X){af=true;X=X.split(" ")[1].split(",");ad=[parseInt(X[0],10),parseInt(X[1],10),parseInt(X[2],10)]}}}catch(ah){}}}return{w3:ai,pv:ad,wk:ac,ie:af,win:ab,mac:Y}}(),N=function(){if(!v.w3){return}if((typeof M.readyState!=m&&M.readyState=="complete")||(typeof M.readyState==m&&(M.getElementsByTagName("body")[0]||M.body))){I()}if(!s){if(typeof M.addEventListener!=m){M.addEventListener("DOMContentLoaded",I,false)}if(v.ie&&v.win){M.attachEvent(f,function(){if(M.readyState=="complete"){M.detachEvent(f,arguments.callee);I()}});if(x==top){(function(){if(s){return}try{M.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}I()})()}}if(v.wk){(function(){if(s){return}if(!/loaded|complete/.test(M.readyState)){setTimeout(arguments.callee,0);return}I()})()}V(I)}}();function I(){if(s){return}try{var X=M.getElementsByTagName("body")[0].appendChild(l("span"));X.parentNode.removeChild(X)}catch(Y){return}s=true;var Z=a.length;for(var ab=0;ab<Z;ab++){a[ab]()}}function t(X){if(s){X()}else{a[a.length]=X}}function V(Y){if(typeof x.addEventListener!=m){x.addEventListener("load",Y,false)}else{if(typeof M.addEventListener!=m){M.addEventListener("load",Y,false)}else{if(typeof x.attachEvent!=m){L(x,"onload",Y)}else{if(typeof x.onload=="function"){var X=x.onload;x.onload=function(){X();Y()}}else{x.onload=Y}}}}}function K(){if(C){c()}else{q()}}function c(){var Z=M.getElementsByTagName("body")[0];var X=l(U);X.setAttribute("type",T);var Y=Z.appendChild(X);if(Y){var ab=0;(function(){if(typeof Y.GetVariable!=m){var ac=Y.GetVariable("$version");if(ac){ac=ac.split(" ")[1].split(",");v.pv=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}else{if(ab<10){ab++;setTimeout(arguments.callee,10);return}}Z.removeChild(X);Y=null;q()})()}else{q()}}function q(){var ad=R.length;if(ad>0){for(var ac=0;ac<ad;ac++){var ah=R[ac].id;var X=R[ac].callbackFn;var aj={success:false,id:ah};if(v.pv[0]>0){var ab=F(ah);if(ab){if(o(R[ac].swfVersion)&&!(v.wk&&v.wk<312)){d(ah,true);if(X){aj.success=true;aj.ref=h(ah);X(aj)}}else{if(R[ac].expressInstall&&j()){var af={};af.data=R[ac].expressInstall;af.width=ab.getAttribute("width")||"0";af.height=ab.getAttribute("height")||"0";if(ab.getAttribute("class")){af.styleclass=ab.getAttribute("class")}if(ab.getAttribute("align")){af.align=ab.getAttribute("align")}var ae={};var ag=ab.getElementsByTagName("param");var Y=ag.length;for(var Z=0;Z<Y;Z++){if(ag[Z].getAttribute("name").toLowerCase()!="movie"){ae[ag[Z].getAttribute("name")]=ag[Z].getAttribute("value")}}y(af,ae,ah,X)}else{S(ab);if(X){X(aj)}}}}}else{d(ah,true);if(X){var ai=h(ah);if(ai&&typeof ai.SetVariable!=m){aj.success=true;aj.ref=ai}X(aj)}}}}}function h(X){var Z=null;var ab=F(X);if(ab&&ab.nodeName=="OBJECT"){if(typeof ab.SetVariable!=m){Z=ab}else{var Y=ab.getElementsByTagName(U)[0];if(Y){Z=Y}}}return Z}function j(){return !D&&o("6.0.65")&&(v.win||v.mac)&&!(v.wk&&v.wk<312)}function y(ac,ae,Z,ad){D=true;n=ad||null;k={success:false,id:Z};var Y=F(Z);if(Y){if(Y.nodeName=="OBJECT"){O=J(Y);z=null}else{O=Y;z=Z}ac.id=A;if(typeof ac.width==m||(!/%$/.test(ac.width)&&parseInt(ac.width,10)<310)){ac.width="310"}if(typeof ac.height==m||(!/%$/.test(ac.height)&&parseInt(ac.height,10)<137)){ac.height="137"}M.title=M.title.slice(0,47)+" - Flash Player Installation";var X=v.ie&&v.win?"ActiveX":"PlugIn",af="MMredirectURL="+x.location.toString().replace(/&/g,"%26")+"&MMplayerType="+X+"&MMdoctitle="+M.title;if(typeof ae.flashvars!=m){ae.flashvars+="&"+af}else{ae.flashvars=af}if(v.ie&&v.win&&Y.readyState!=4){var ab=l("div");Z+="SWFObjectNew";ab.setAttribute("id",Z);Y.parentNode.insertBefore(ab,Y);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}aa(ac,ae,Z)}}function S(Y){if(v.ie&&v.win&&Y.readyState!=4){var X=l("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(J(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(J(Y),Y)}}function J(X){var ac=l("div");if(v.win&&v.ie){ac.innerHTML=X.innerHTML}else{var ab=X.getElementsByTagName(U)[0];if(ab){var Y=ab.childNodes;if(Y){var Z=Y.length;for(var ad=0;ad<Z;ad++){if(!(Y[ad].nodeType==1&&Y[ad].nodeName=="PARAM")&&!(Y[ad].nodeType==8)){ac.appendChild(Y[ad].cloneNode(true))}}}}}return ac}function aa(af,ad,ah){var ag,aj=F(ah);if(v.wk&&v.wk<312){return ag}if(aj){if(typeof af.id==m){af.id=ah}if(v.ie&&v.win){var ae="";for(var ab in af){if(af[ab]!=Object.prototype[ab]){if(ab.toLowerCase()=="data"){ad.movie=af[ab]}else{if(ab.toLowerCase()=="styleclass"){ae+=' class="'+af[ab]+'"'}else{if(ab.toLowerCase()!="classid"){ae+=" "+ab+'="'+af[ab]+'"'}}}}}var ac="";for(var Z in ad){if(ad[Z]!=Object.prototype[Z]){ac+='<param name="'+Z+'" value="'+ad[Z]+'" />'}}aj.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ae+">"+ac+"</object>";w[w.length]=af.id;ag=F(af.id)}else{var ai=l(U);ai.setAttribute("type",T);for(var Y in af){if(af[Y]!=Object.prototype[Y]){if(Y.toLowerCase()=="styleclass"){ai.setAttribute("class",af[Y])}else{if(Y.toLowerCase()!="classid"){ai.setAttribute(Y,af[Y])}}}}for(var X in ad){if(ad[X]!=Object.prototype[X]&&X.toLowerCase()!="movie"){H(ai,X,ad[X])}}aj.parentNode.replaceChild(ai,aj);ag=ai}}return ag}function H(X,Z,ab){var Y=l("param");Y.setAttribute("name",Z);Y.setAttribute("value",ab);X.appendChild(Y)}function g(Y){var X=F(Y);if(X&&X.nodeName=="OBJECT"){if(v.ie&&v.win){X.style.display="none";(function(){if(X.readyState==4){E(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function E(Y){var X=F(Y);if(X){for(var Z in X){if(typeof X[Z]=="function"){X[Z]=null}}X.parentNode.removeChild(X)}}function F(Y){var Z=null;try{Z=M.getElementById(Y)}catch(X){}return Z}function l(X){return M.createElement(X)}function L(Y,Z,X){Y.attachEvent(Z,X);r[r.length]=[Y,Z,X]}function o(Y){var X=v.pv,Z=Y.split(".");Z[0]=parseInt(Z[0],10);Z[1]=parseInt(Z[1],10)||0;Z[2]=parseInt(Z[2],10)||0;return(X[0]>Z[0]||(X[0]==Z[0]&&X[1]>Z[1])||(X[0]==Z[0]&&X[1]==Z[1]&&X[2]>=Z[2]))?true:false}function b(X,ab,Y,ae){if(v.ie&&v.mac){return}var ac=M.getElementsByTagName("head")[0];if(!ac){return}var Z=(Y&&typeof Y=="string")?Y:"screen";if(ae){Q=null;p=null}if(!Q||p!=Z){var ad=l("style");ad.setAttribute("type","text/css");ad.setAttribute("media",Z);Q=ac.appendChild(ad);if(v.ie&&v.win&&typeof M.styleSheets!=m&&M.styleSheets.length>0){Q=M.styleSheets[M.styleSheets.length-1]}p=Z}if(v.ie&&v.win){if(Q&&typeof Q.addRule==U){Q.addRule(X,ab)}}else{if(Q&&typeof M.createTextNode!=m){Q.appendChild(M.createTextNode(X+" {"+ab+"}"))}}}function d(Y,Z){if(!P){return}var X=Z?"visible":"hidden";if(s&&F(Y)){F(Y).style.visibility=X}else{b("#"+Y,"visibility:"+X)}}function u(X){var Y=/[\\\"<>\.;]/;var Z=Y.exec(X)!=null;return Z&&typeof encodeURIComponent!=m?encodeURIComponent(X):X}var G=function(){if(v.ie&&v.win){window.attachEvent("onunload",function(){var Y=r.length;for(var X=0;X<Y;X++){r[X][0].detachEvent(r[X][1],r[X][2])}var ac=w.length;for(var ad=0;ad<ac;ad++){g(w[ad])}for(var ab in v){v[ab]=null}v=null;for(var Z in swfobject){swfobject[Z]=null}swfobject=null})}}();return{registerObject:function(Y,Z,ac,X){if(v.w3&&Y&&Z){var ab={};ab.id=Y;ab.swfVersion=Z;ab.expressInstall=ac;ab.callbackFn=X;R[R.length]=ab;d(Y,false)}else{if(X){X({success:false,id:Y})}}},getObjectById:function(X){if(v.w3){return h(X)}},embedSWF:function(X,ae,ab,ad,ag,ai,ah,Z,ac,Y){var af={success:false,id:ae};if(v.w3&&!(v.wk&&v.wk<312)&&X&&ae&&ab&&ad&&ag){d(ae,false);t(function(){ab+="";ad+="";var ak={};if(ac&&typeof ac===U){for(var am in ac){ak[am]=ac[am]}}ak.data=X;ak.width=ab;ak.height=ad;var an={};if(Z&&typeof Z===U){for(var al in Z){an[al]=Z[al]}}if(ah&&typeof ah===U){for(var aj in ah){if(typeof an.flashvars!=m){an.flashvars+="&"+aj+"="+ah[aj]}else{an.flashvars=aj+"="+ah[aj]}}}if(o(ag)){var ao=aa(ak,an,ae);if(ak.id==ae){d(ae,true)}af.success=true;af.ref=ao}else{if(ai&&j()){ak.data=ai;y(ak,an,ae,Y);return}else{d(ae,true)}}if(Y){Y(af)}})}else{if(Y){Y(af)}}},switchOffAutoHideShow:function(){P=false},ua:v,getFlashPlayerVersion:function(){return{major:v.pv[0],minor:v.pv[1],release:v.pv[2]}},hasFlashPlayerVersion:o,createSWF:function(Y,X,Z){if(v.w3){return aa(Y,X,Z)}else{return undefined}},showExpressInstall:function(X,Y,Z,ab){if(v.w3&&j()){y(X,Y,Z,ab)}},removeSWF:function(X){if(v.w3){g(X)}},createCSS:function(X,Y,ab,Z){if(v.w3){b(X,Y,ab,Z)}},addDomLoadEvent:t,addLoadEvent:V,getQueryParamValue:function(X){var Y=M.location.search||M.location.hash;if(Y){if(/\?/.test(Y)){Y=Y.split("?")[1]}if(X==null){return u(Y)}var ab=Y.split("&");for(var Z=0;Z<ab.length;Z++){if(ab[Z].substring(0,ab[Z].indexOf("="))==X){return u(ab[Z].substring((ab[Z].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(D){var X=F(A);if(X&&O){X.parentNode.replaceChild(O,X);if(z){d(z,true);if(v.ie&&v.win){O.style.display="block"}}if(n){n(k)}}D=false}}}}();