
var NS4=(document.layers);var IE4=(document.all);var win=this;var n=0;function Pesquisa(str){var txt,i,found,tam;if(str==""){return false}tam=str.length;if(tam==1||tam==2){alert("Digite uma palavra com mais letras!");return false}if(!IE4){if(!win.find(str)){while(win.find(str,false,true))n++}else{n++;if(n==0)alert(str+" n?o foi encontrado nesta p?gina.")}}if(IE4){txt=win.document.body.createTextRange();for(i=0;i<=n&&(found=txt.findText(str))!=false;i++){txt.moveStart("character",1);txt.moveEnd("textedit")}if(found){txt.moveStart("character",-1);txt.findText(str);txt.select();txt.scrollIntoView();n++;{}}else{if(n>0){n=0;Pesquisa(str)}else alert("'"+str+"' n?o foi encontrado nesta p?gina.")}}return false}function PayMethodView(){var divPayMethod=document.getElementById("divPayView");var btnShowPayMethods=document.getElementById("ctl00_body_btnPayMethod");var btTop=0;if(divPayMethod&&btnShowPayMethods){btTop=findPosition(btnShowPayMethods)[0];divPayMethod.style.top=(btTop-200)+"px";divPayMethod.style.display="block"}}function PayMethodHidden(){document.getElementById("divPayView").style.display="none"}function toggleDelivery(){if(arguments[0]){$get('tbDeliveryMessage').style.display='block'}else{$get('tbDeliveryMessage').style.display='none'}var divDelivery=$get('divDeliveryTime');if(divDelivery){toggleModal('divDeliveryTime',1,true)}}function toggleIndicate(){if(arguments[0]===true||arguments[0]===false){if(arguments[0]){$get('tbIndicateMessage').style.display='block';$get('tbIndicate').style.display='none'}else $get('tbIndicateMessage').style.display='none'}var divIndicate=$get('divIndicate');if(divIndicate&&arguments[0]!==true){if(divIndicate.style.display=='none')$get('tbIndicate').style.display='block';toggleModal(divIndicate.id,1,true)}else divIndicate.style.top=(parseInt(divIndicate.style.top,10)+100)+"px"}var iLastDescrIdx=-1;var iMinIdx=0;var iMaxIdx=1;function hackStyle(){iMinIdx=1;var imgBg=$get('imgBgBtn1');imgBg.style.padding="0px";var imgBg=$get('imgBgBtn1bot');imgBg.style.padding="0px"}function toggleDescription(objSpan){var img01on=$get('img01on');var img01off=$get('img01off');var img03on=$get('img03on');var img03off=$get('img03off');var img02on=$get('img02on');var img02off=$get('img02off');var img04on=$get('img04on');var img04off=$get('img04off');var iIdx=0;if(typeof objSpan=="number")iIdx=objSpan;else iIdx=parseInt(objSpan.getAttribute("idx"),10);var sImageUrl=(("https:"==document.location.protocol)?"https://www.":"http://imagens.")+'fastshop.com.br/images/';var defaultBgOn="url("+sImageUrl+"bt_descr_bg_azul.gif)";var defaultBgOff="url("+sImageUrl+"bt_descr_bg_cinza.gif)";var defaultBulletOn=sImageUrl+"bt_descr_bullet_azul.gif";var defaultBulletOnBot=sImageUrl+"bt_descr_bullet_azul_2.gif";var defaultBulletOff=sImageUrl+"bt_descr_bullet_cinza.gif";var bUseDefaults=false;if(iLastDescrIdx<0||iIdx==iLastDescrIdx)bUseDefaults=true;var imgBgBtnOff=$get('imgBgBtn'+iLastDescrIdx);var imgBgBtnOn=$get('imgBgBtn'+iIdx);var imgBgBtnOffBot=$get('imgBgBtn'+iLastDescrIdx+'bot');var imgBgBtnOnBot=$get('imgBgBtn'+iIdx+'bot');var imgBulletOnToOff=$get('imgBulletBtn'+iLastDescrIdx);var imgBulletOnToOffBot=$get('imgBulletBtn'+iLastDescrIdx+'bot');var imgBulletOffToOn=$get('imgBulletBtn'+iIdx);var imgBulletOffToOnBot=$get('imgBulletBtn'+iIdx+'bot');var bgOn=(!bUseDefaults&&imgBgBtnOff)?imgBgBtnOff.style.backgroundImage:defaultBgOn;var bulletOn=(!bUseDefaults&&imgBulletOnToOff)?imgBulletOnToOff.src:defaultBulletOn;var bulletOnBot=(!bUseDefaults&&imgBulletOnToOffBot)?imgBulletOnToOffBot.src:defaultBulletOnBot;var bgOff=(!bUseDefaults&&imgBgBtnOn)?imgBgBtnOn.style.backgroundImage:defaultBgOff;var bulletOff=(!bUseDefaults&&imgBulletOffToOn)?imgBulletOffToOn.src:defaultBulletOff;if(imgBgBtnOff){imgBgBtnOff.style.backgroundImage=bgOff;imgBgBtnOffBot.style.backgroundImage=bgOff}if(imgBgBtnOn){imgBgBtnOn.style.backgroundImage=bgOn;imgBgBtnOnBot.style.backgroundImage=bgOn}if(imgBulletOnToOff){imgBulletOnToOff.src=bulletOff;imgBulletOnToOffBot.src=bulletOff;$get('txtLabel'+iLastDescrIdx).style.color='#777';$get('txtLabel'+iLastDescrIdx+'bot').style.color='#777'}if(imgBulletOffToOn){imgBulletOffToOn.src=bulletOn;imgBulletOffToOnBot.src=bulletOnBot;$get('txtLabel'+iIdx).style.color='#337';$get('txtLabel'+iIdx+'bot').style.color='#337'}img01on.style.display='none';img02on.style.display='none';img03on.style.display='none';img04on.style.display='none';img01off.style.display='inline';img02off.style.display='inline';img03off.style.display='inline';img04off.style.display='inline';if(iIdx==iMinIdx){img01on.style.display='inline';img01off.style.display='none';img03on.style.display='inline';img03off.style.display='none'}if(iIdx==iMaxIdx){img02on.style.display='inline';img02off.style.display='none';img04on.style.display='inline';img04off.style.display='none'}var offDiv=$get('divDescr'+iLastDescrIdx);if(!bUseDefaults&&offDiv)offDiv.style.display='none';$get('divDescr'+iIdx).style.display='block';iLastDescrIdx=iIdx}function toggleGlossary(e){e=$.browser.crossBrowserEvent(e);var srcElement=e.srcElement;if(!srcElement||!srcElement.id)return;var tempArray=srcElement.id.split('_');var idGlossary=0;var idMatch=0;var objSpan=null;var objDiv=null;var cmdToEval="";var bShowGlossaryInfo=false;var offsetWidthFix=0;var iTop=0,iLeft=0;var spanPosition=new Array();if(tempArray.length==3&&tempArray[0]=="spanGlossary"){if(arguments.length!=3)throw"N?mero de argumentos incorreto!";bShowGlossaryInfo=true;idGlossary=tempArray[1];idMatch=tempArray[2];objSpan=$get(srcElement.id);objDiv=$get(arguments[2])}else{objDiv=$get(srcElement.id);objSpan=(!objDiv)?null:(objDiv.getAttribute('spanId')?$get(objDiv.getAttribute('spanId')):null);if(!objSpan)return;if(arguments.length!=1)throw"N?mero de argumentos incorreto!";bShowGlossaryInfo=false}switch(bShowGlossaryInfo){case true:spanPosition=findPosition(objSpan);offsetWidthFix=findPosition($get('principal'))[1];spanPosition[1]=spanPosition[1]-offsetWidthFix;iTop=spanPosition[0]-2;iLeft=spanPosition[1];$get('glossaryInfoText').innerHTML=objSpan.innerHTML;objDiv.setAttribute('spanId',objSpan.id);objDiv.style.top=iTop+'px';objDiv.style.left=iLeft+'px';objDiv.style.display='block';cmdToEval="$get('"+objDiv.id+"').onmouseout = function(event) { "+objSpan.getAttribute('onmouseoutToAttach')+" };";window.setTimeout(cmdToEval,25);SetGlossaryDescription();$.ajax({type:"POST",url:"FastshopAjaxMethod.aspx/GetGlossaryByID",data:"{'idGlossary':"+idGlossary+"}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(result){SetGlossaryDescription({value:result.d})}});break;case false:objDiv.style.display='none';break}}function SetGlossaryDescription(ret){var objGlossaryDescription=$get('glossaryInfoDescription');if(!objGlossaryDescription)return;if(!ret){objGlossaryDescription.innerHTML='<img src="'+(("https:"==document.location.protocol)?"https://www.":"http://imagens.")+'fastshop.com.br/images/ajaxLoadingSmall.gif" alt="Aguarde, carregando informa??es..." />';return}var objGlossary=ret.value;if(!objGlossary)return;objGlossaryDescription.innerHTML=objGlossary.dsDescription}function imgAltLoading(){var divImg=document.getElementById('dvAltImgBig');if(divImg)divImg.innerHTML='<img src="'+(("https:"==document.location.protocol)?"https://www.":"http://imagens.")+'fastshop.com.br/images/ajax-loader.gif" alt="Aguarde, carregando imagem..." style="display: block; margin-left: auto; margin-right: auto; margin-top: 200px;" />'}function doDescriptionSearch(e){var cmdDescriptionSearch=document.getElementById('cmdDescriptionSearch');var iKeyCode=$.browser.crossBrowserEvent(e).key;if(iKeyCode==13){if(cmdDescriptionSearch){cmdDescriptionSearch.click();return false}}return true}function ValidateShipFast(dsZip){if(dsZip.length!=5)document.getElementById("infoResult").innerHTML="Entre com os 5 primeiros d&#237;gitos de seu CEP";else{$.ajax({type:"POST",url:"../FastshopAjaxMethod.aspx/ValidateShipFast",data:"{'dsZip':'"+dsZip+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(result){ValidateShipFastReturn({value:result.d})}})}}function ValidateShipFastReturn(ret){var bReturn;bReturn=ret.value;if(bReturn){document.getElementById("infoResult").innerHTML="<br /><span style='color:Red'>CEP atendido pela Lista de Casamento</span>"}else{document.getElementById("infoResult").innerHTML="<br /><span style='color:Red'>CEP n&#227;o atendido pela Lista de Casamento"}}var searchhi_string='';var _woolyss_count=0;var _woolyss_position=0;var _woolyss_goNext=true;var _woolyss_maxPos=0;function highlightWord(node,word){if(node&&node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){if(node.childNodes[hi_cn]&&node.childNodes[hi_cn].id!="divPayView"&&node.childNodes[hi_cn].className!="deliveryTime")highlightWord(node.childNodes[hi_cn],word)}}if(node&&node.nodeType==3){tempNodeVal=node.nodeValue.toLowerCase();tempWordVal=word.toLowerCase();if(tempNodeVal.indexOf(tempWordVal)!=-1){pn=node.parentNode;if(pn.className!="searchword"){nv=node.nodeValue;ni=tempNodeVal.indexOf(tempWordVal);before=document.createTextNode(nv.substr(0,ni));docWordVal=nv.substr(ni,word.length);after=document.createTextNode(nv.substr(ni+word.length));hiwordtext=document.createTextNode(docWordVal);hiword=document.createElement("span");hiword.className="searchword";hiword.appendChild(hiwordtext);pn.insertBefore(before,node);pn.insertBefore(hiword,node);pn.insertBefore(after,node);pn.removeChild(node);if(_woolyss_count>=0){if(_woolyss_count==_woolyss_position&&_woolyss_goNext){_woolyss_goNext=false;_woolyss_position++;if(typeof pn.scrollIntoView=="function")pn.scrollIntoView();}}_woolyss_count++}}}}function unhighlightWord(node,word){if(node&&node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){highlightWord(node.childNodes[hi_cn],word)}}if(node&&node.nodeType==3){tempNodeVal=node.nodeValue.toLowerCase();tempWordVal=word.toLowerCase();if(tempNodeVal.indexOf(tempWordVal)!=-1){pn=node.parentNode;if(pn.className=="searchword"){prevSib=pn.previousSibling;nextSib=pn.nextSibling;nextSib.nodeValue=prevSib.nodeValue+node.nodeValue+nextSib.nodeValue;prevSib.nodeValue='';node.nodeValue=''}}}}function unhighlight(node){_woolyss_goNext=true;_woolyss_count=0;if(node&&node.hasChildNodes){var hi_cn;for(hi_cn=0;hi_cn<node.childNodes.length;hi_cn++){unhighlight(node.childNodes[hi_cn])}}if(node&&node.nodeType==3){pn=node.parentNode;if(pn.className=="searchword"){prevSib=pn.previousSibling;nextSib=pn.nextSibling;nextSib.nodeValue=prevSib.nodeValue+node.nodeValue+nextSib.nodeValue;prevSib.nodeValue='';node.nodeValue=''}}}function googleSearchHighlight(){if(!document.createElement)return;ref=document.referrer;ref=ref.replace(/\/search\/web\//,'?search&q=');if(ref.indexOf('?')==-1)return;qs=ref.substr(ref.indexOf('?')+1);qsa=qs.split('#');qs=qsa[0];qs=qs.replace(/(^|&)p=Q&ts=e&/,'&');qs=qs.replace(/(^|&)query=/,'&q=');qs=qs.replace(/(^|&)key=/,'&q=');qs=qs.replace(/(^|&)keywords=/i,'&q=');qs=qs.replace(/(^|&)searchfor=/,'&q=');qs=qs.replace(/(^|&)qt=/,'&q=');qs=qs.replace(/(^|&)s=/,'&q=');qsa=qs.split('&');for(i=0;i<qsa.length;i++){qsip=qsa[i].split('=');if(qsip.length==1)continue;if(qsip[0]=='q'||qsip[0]=='p'||qsip[0]=='w'){qsip[1]=unescape(qsip[1]).replace(/^\s+|\s+$/g,"");if(qsip[1]=='')continue;phrases=qsip[1].replace(/\+/g,' ').split(/\"/);for(p=0;p<phrases.length;p++){phrases[p]=unescape(phrases[p]).replace(/^\s+|\s+$/g,"");if(phrases[p]=='')continue;if(p%2==0)words=phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);else{words=Array(1);words[0]=phrases[p]}for(w=0;w<words.length;w++){if(words[w]=='')continue;highlightWord(document.getElementsByTagName("body")[0],words[w]);if(p%2==0)searchhi_string=searchhi_string+' '+words[w];else searchhi_string=searchhi_string+' "'+words[w]+'"'}}}}}function localSearchHighlight(searchStr,elementToSearch,tryQ){if(!document.createElement)return;if(searchStr=='')return;if(searchStr.indexOf('?')==-1)qs=searchStr.substr(0);else qs=searchStr.substr(1);qsa=qs.split('&');for(i=0;i<qsa.length;i++){qsip=qsa[i].split('=');if(qsip.length==1)continue;if(qsip[0]=='h'||(tryQ&&(qsip[0]=='q'||qsip[0]=='p'))){qsip[1]=unescape(qsip[1]).replace(/^\s+|\s+$/g,"");if(qsip[1]=='')continue;phrases=qsip[1].replace(/\+/g,' ').split(/\"/);for(p=0;p<phrases.length;p++){phrases[p]=unescape(phrases[p]).replace(/^\s+|\s+$/g,"");if(phrases[p]=='')continue;if(p%2==0)words=phrases[p].replace(/([+,()]|%(29|28)|\W+(AND|OR)\W+)/g,' ').split(/\s+/);else{words=Array(1);words[0]=phrases[p]}for(w=0;w<words.length;w++){if(words[w]=='')continue;highlightWord(elementToSearch,words[w]);_woolyss_maxPos=_woolyss_count;if(_woolyss_position>=_woolyss_maxPos)_woolyss_position=0;if(p%2==0)searchhi_string=searchhi_string+' '+words[w];else searchhi_string=searchhi_string+' "'+words[w]+'"';}}}}}function postSearchHighlight(){searchhi_string=searchhi_string.replace(/^\s+|\s+$/g,"");if(location.hash.length>1)location.hash=location.hash}function SearchHighlight(){if(document.createElement){var docrefpage=document.referrer.split('?',2);var locrefpage=location.href.split('?',1);if((docrefpage[0].toUpperCase()!=locrefpage[0].toUpperCase())&&((docrefpage[1]&&docrefpage[1].match(/(^|&)(p=Q&ts=e&|query=|key=|keywords=|searchfor=|qt=|q=)/))||document.referrer.match(/\/search\/web\//))){googleSearchHighlight();localSearchHighlight(location.search)}else{var locsearch=location.search;if(locsearch.indexOf('?')==-1){locsearch=locsearch.replace(/\/search\//,'?search&q=');}localSearchHighlight(location.search,1)}postSearchHighlight()}}function SmartHighlight(){var today=new Date();var now=today.getUTCSeconds();var cookie=document.cookie;var cookieArray=cookie.split('; ');for(var loop=0;loop<cookieArray.length;loop++){var nameValue=cookieArray[loop].split("=");if(nameValue[0].toString()=='SHTS'){var cookieTime=parseInt(nameValue[1])}else if(nameValue[0].toString()=='SHTSP'){var cookieName=nameValue[1]}}if(cookieName&&cookieTime&&cookieName==escape(location.href)&&Math.abs(now-cookieTime)<5){searchhi_unl=0}else{SearchHighlight()}}function SmartHLUnload(){if(searchhi_unl>0){var today=new Date();var now=today.getUTCSeconds();document.cookie='SHTS='+now+';';document.cookie='SHTSP='+escape(location.href)+';'}else{document.cookie='SHTS=;';document.cookie='SHTSP=;'}}function NotRefreshHL(){searchhi_unl=0;return true}var searchhi_unl=1;