var isN4=(document.layers)?true:false;var isIE=(document.all)?true:false;var isDOM=(document.getElementById && !document.all)?true:false;function PrintPage(){if(isIE)window.print();else alert('Por favor selecione a opcao "Arquivo -> Imprimir" do menu superior para imprimir.');} function GoToNext(size,obj1,obj2){if(document.getElementById(obj1.id).value.length>=size){document.getElementById(obj2.id).focus();}} function OpenPopup(idPopup,url,popupW,popupH){window.open(url,idPopup,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+popupW+',height='+popupH+',top=55,left=55');} function OpenPopupRemenber(url){window.open(url,'ProductRemember','toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no,top=100,left=50,width=435,height=380');} function OpenPopupEvaluation(url){window.open(url,'ProductEvaluation','toolbar=no,status=no,menubar=no,scrollbars=yes,resizeable=no,top=100,left=50,width=330,height=360');} function OpenPopupEvaluationMessage(url){window.open(url,'ProductEvaluationMessage','toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no,top=100,left=50,width=320,height=500');}function OpenGiftCardPopup(idPopup,url,popupW,popupH){window.open(url,idPopup,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+popupW+',height='+popupH+',top=55,left=55');} function OpenGiftCardPopup(idPopup,url,popupW,popupH){window.open(url,idPopup,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+popupW+',height='+popupH+',top=55,left=55');} function oPenPopupShipCost(zipCode,zipCodeComplement){var zipfull=zipCode+zipCodeComplement;window.open('popupshipcost.aspx?zip='+zipfull,null,'width=500,height=200');return false;} function ValidateNumberOfChars(textBox,limit,divResponse){var validKey=true;var obj=document.getElementById(textBox);var divResponse=document.getElementById(divResponse);var diff=limit-obj.value.length;if(diff<0 && window.event.keyCode!=8 && window.event.keyCode!=17 && !(window.event.keyCode>=33 && window.event.keyCode<=40) && window.event.keyCode!=46){obj.value=obj.value.substr(0,limit);alert('Atenção: Você não pode exceder '+limit+' caracteres neste campo!');validKey=false;}divResponse.innerHTML="Total de <font color=\"red\"><strong>"+obj.value.length+"</strong></font> caracteres digitados de no máximo <strong>"+limit+"</strong>.";return validKey;} function OpenPopupIndicate(webPath, idProduct){pLX=455;pAY=550;xx=parseInt(((screen.width-pLX-8)/2));yy=parseInt(((screen.height-pAY-15)/2));pUrl=webPath + 'productpopupindicate.aspx?idproduct='+idProduct;s=window.open(pUrl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+pLX+', height='+pAY+', top='+yy+', left='+xx+', screenX='+xx+', screenY='+yy);} function OpenPopupStaticText(url,vwidth,vheight){window.open(url,'StaticText','toolbar=no,status=no,menubar=no,scrollbars=yes,resizeable=no,top=100,left=50,width='+vwidth+',height='+vheight+'');} function ChangeZoomImage(sPath,sImgZoomName,oImgZoom){var script="<object id='sliceflash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='300px' height='300px'><param name='movie' value='images/product/"+sImgZoomName+"'/><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='images/product/"+sImgZoomName+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='300px' height='300px' wmode='transparent'></embed></object>";var extensao=new Object();extensao=sImgZoomName.split(".");if(isDOM){if(extensao[1]=="swf"){document.getElementById('divFlash').className="visiblediv";document.getElementById('refProduct').className="invisiblediv";document.getElementById('divFlash').innerHTML=script;}else{document.getElementById('divFlash').className="invisiblediv";document.getElementById('refProduct').className="visiblediv";document.getElementById(oImgZoom).src=sPath+"/images/product/"+sImgZoomName;}}else if(isN4){document.layers[oImgZoom].src=sPath+"/images/product/"+sImgZoomName;}else if(isIE){if(extensao[1]=="swf"){document.all['divFlash'].className="visiblediv";document.all['refProduct'].className="invisiblediv";document.all['divFlash'].innerHTML=script;}else{document.all['divFlash'].className="invisiblediv";document.all['refProduct'].className="visiblediv";document.all[oImgZoom].src=sPath+"/images/product/"+sImgZoomName;}}} function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a && i<a.length && (x=a[i]) && x.oSrc;i++)x.src=x.oSrc;} function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0 && parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);} if(!(x=d[n]) && d.all)x=d.all[n];for(i=0;!x && i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x && d.layers && i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x && d.getElementById)x=d.getElementById(n);return x;}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}function OpenChat(elementId){var pop_window=window.open("about:blank","janela","width=350,height=350,resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0");pop_window.focus();document.getElementById(elementId).submit();} function AjaxLoading() {document.getElementById("divBackground").style.height=document.getElementById("ctl00_oBody").clientHeight+"px";document.getElementById("divBackground").style.width=document.getElementById("ctl00_oBody").clientWidth+"px";if(isIE){document.getElementById("divAjax").style.left="0%";document.getElementById("divAjax").style.top="0%";} else if(isDOM){document.getElementById("divAjax").style.left="0";document.getElementById("divAjax").style.top="0";}} function setDivMaxScreenSize(div) {document.getElementById('logo').focus();document.getElementById(div).style.height=getMaxScrollHeight()+"px";document.getElementById(div).style.width=getMaxScrollWidth()+"px";} function cancelDiv() {document.body.style.overflow='';document.getElementById('trans').className='invisiblediv';document.getElementById('divImagem').className='invisiblediv';if(document.all['ctl00_ContentSite_refProduct'].className=="visiblediv" && document.all['ctl00_ContentSite_divFlash'].className=="invisiblediv") {document.all['imgProductBig'].className="visiblediv imagePane";document.all['imgProductZoom'].className="visiblediv imagePane";
document.all['divZoom'].className="visiblediv zoomPane";document.all['ctl00_ContentSite_refProduct'].className="visiblediv";} else if(document.all['ctl00_ContentSite_divFlash'].className=="visiblediv" && document.all['ctl00_ContentSite_refProduct'].className=="invisiblediv") document.all['ctl00_ContentSite_divFlash'].className="visiblediv";} function getMaxScrollWidth() {return document.body.offsetWidth;} function getMaxScrollHeight(){return screen.availHeight*3;} function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a && i<a.length && (x=a[i]) && x.oSrc;i++)x.src=x.oSrc;} function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++) if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}} function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0 && parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);} if(!(x=d[n]) && d.all)x=d.all[n];for(i=0;!x && i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x && d.layers && i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x && d.getElementById)x=d.getElementById(n);return x;} function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3) if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}} function OpenChat(){var pop_window=window.open("http://atendimento.s12.com.br/saudeja/pedido.php?login=saudeja&yid=1&deptid=0","atendimento","width=350,height=350,resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0");pop_window.focus();} function show(webpath){if(isDOM){document.getElementById('FadeMenuCentrosEspeciais').className='visiblediv';document.getElementById('imgManualSaude').src=webpath+'images/x123/bt_saude2.gif';} else if(isN4){document.layers['FadeMenuCentrosEspeciais'].className='visiblediv';document.layers['imgManualSaude'].src=webpath+'images/x123/bt_saude2.gif';} else if(isIE){document.all['FadeMenuCentrosEspeciais'].className='visiblediv';document.all['imgManualSaude'].src=webpath+'images/x123/bt_saude2.gif';}} function hideFields(totalFieldsDiv){if(isDOM){for(g=0;g<totalFieldsDiv;g++){document.getElementById('divMenuFields'+g).className='invisiblediv';document.getElementById('tbFields').className='invisiblediv';}} else if(isN4){for(g=0;g<totalFieldsDiv;g++){document.layers['divMenuFields'+g].className='invisiblediv';document.layers['tbFields'].className='invisiblediv';}} else if(isIE){for(g=0;g<totalFieldsDiv;g++){document.all['divMenuFields'+g].className='invisiblediv';document.all['tbFields'].className='invisiblediv';}}} var g=0;function hide(webPath){if(isDOM){document.getElementById('FadeMenuCentrosEspeciais').className='invisiblediv';document.getElementById('imgManualSaude').src=webPath+'images/x123/bt_saude.gif';} else if(isN4){document.layers['FadeMenuCentrosEspeciais'].className='invisiblediv';document.layers['imgManualSaude'].src=webPath+'images/x123/bt_saude.gif';} else if(isIE){document.all['FadeMenuCentrosEspeciais'].className='invisiblediv';document.all['imgManualSaude'].src=webPath+'images/x123/bt_saude.gif';}} function catalog(webPath, evt){var h=document.getElementById('FadeMenuCentrosEspeciais').style.height;var w=document.getElementById('FadeMenuCentrosEspeciais').style.width;var top=document.getElementById("FadeMenuCentrosEspeciais").offsetTop;var left=document.getElementById("FadeMenuCentrosEspeciais").offsetLeft;var e=(window.event)?window.event:evt;var x=e.clientX;var y=e.clientY;if((x<=(w+left)) && (x>=left)||(y<=(h+top))||(y>=h)){show(webPath);}} function showfields(index, totalFieldsDiv) { if (isDOM) { for (g = 0; g < totalFieldsDiv; g++) { if (g == index){ document.getElementById('divMenuFields' + g).className = 'visiblediv'; document.getElementById('tbFields').className = 'visiblediv';} else document.getElementById('divMenuFields' + g).className = 'invisiblediv';}} else if (isN4) { for (g = 0; g < totalFieldsDiv; g++) { if (g == index) { document.layers['divMenuFields' + g].className = 'visiblediv'; document.layers['tbFields'].className = 'visiblediv';} else document.layers['divMenuFields' + g].className = 'invisiblediv';}} else if (isIE) { for (g = 0; g < totalFieldsDiv; g++) { if (g == index){ document.all['divMenuFields' + g].className = 'visiblediv'; document.all['tbFields'].className = 'visiblediv';} else document.all['divMenuFields' + g].className = 'invisiblediv';}}} function hidefields(index) { if (isDOM) { document.getElementById('divMenuFields' + index).className = 'invisiblediv';} else if (isN4) {document.layers['divMenuFields' + index].className = 'invisiblediv';} else if (isIE) { document.all['divMenuFields' + index].className = 'invisiblediv';}} function hidefields(index){if(isDOM){document.getElementById('divMenuFields'+index).className='invisiblediv';} else if(isN4){document.layers['divMenuFields'+index].className='invisiblediv';} else if(isIE){document.all['divMenuFields'+index].className='invisiblediv';}} function ShowMenuDiv(index,total){if(isDOM){iPaddingLeft=0;for(i=0;i<total;i++){if(i==index){document.getElementById('divMenu'+i).className='visiblediv';document.getElementById('divMenu'+i).style.paddingLeft=iPaddingLeft+"px";} else{document.getElementById('divMenu'+i).className='invisiblediv';} iPaddingLeft+=document.getElementById('imgDept'+i).width;}} else if(isN4){iPaddingLeft=0;for(i=0;i<total;i++){if(i==index){document.layers['divMenu'+i].className='visiblediv';document.layers['divMenu'+i].style.paddingLeft=iPaddingLeft+"px";} else{document.layers['divMenu'+i].className='invisiblediv';} iPaddingLeft+=document.layers['imgDept'+i].width;}} else if(isIE){isZoomEnabled = false; iPaddingLeft=0;for(i=0;i<total;i++){if(i==index){document.all['divMenu'+i].className='visiblediv';document.all['divMenu'+i].style.paddingLeft=iPaddingLeft+"px";} else{document.all['divMenu'+i].className='invisiblediv';} iPaddingLeft+=document.all['imgDept'+i].width;}}} function ShowImgMain(webPath,index,total,iddept){if(isDOM){for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_suplementos2.gif';else if(iddept==20000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_emagrecimento2.gif';else if(iddept==30000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_fitoterapicos2.gif';else if(iddept==40000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_moda_fitness2.gif';else if(iddept==50000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_acessorios_esportivos2.gif';else if(iddept==60000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_cuidados_pessoais2.gif';}}} else if(isN4){for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_suplementos2.gif';else if(iddept==20000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_emagrecimento2.gif';else if(iddept==30000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_fitoterapicos2.gif';else if(iddept==40000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_moda_fitness2.gif';else if(iddept==50000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_acessorios_esportivos2.gif';else if(iddept==60000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_cuidados_pessoais2.gif';}}} else if(isIE){for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.all['imgDept'+i].src=webPath+'images/dept/bt_suplementos2.gif';else if(iddept==20000) document.all['imgDept'+i].src=webPath+'images/dept/bt_emagrecimento2.gif';else if(iddept==30000) document.all['imgDept'+i].src=webPath+'images/dept/bt_fitoterapicos2.gif';else if(iddept==40000) document.all['imgDept'+i].src=webPath+'images/dept/bt_moda_fitness2.gif';else 
if(iddept==50000) document.all['imgDept'+i].src=webPath+'images/dept/bt_acessorios_esportivos2.gif';else if(iddept==60000) document.all['imgDept'+i].src=webPath+'images/dept/bt_cuidados_pessoais2.gif';}}}} function HideMenuDiv(index){if(isDOM){document.getElementById('divMenu'+index).className='invisiblediv';} else if(isN4){document.layers['divMenu'+index].className='invisiblediv';} else if(isIE){document.all['divMenu'+index].className='invisiblediv';}} function HideImgMain(webPath,index,total,iddept){if(isDOM){ document.getElementById('divMenu'+index).className='invisiblediv';for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_suplementos.gif';else if(iddept==20000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_emagrecimento.gif';else if(iddept==30000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_fitoterapicos.gif';else if(iddept==40000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_moda_fitness.gif';else if(iddept==50000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_acessorios_esportivos.gif';else if(iddept==60000) document.getElementById('imgDept'+i).src=webPath+'images/dept/bt_cuidados_pessoais.gif';}}} else if(isN4){document.layers['divMenu'+index].className='invisiblediv';for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_suplementos.gif';else if(iddept==20000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_emagrecimento.gif';else if(iddept==30000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_fitoterapicos.gif';else if(iddept==40000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_moda_fitness.gif';else if(iddept==50000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_acessorios_esportivos.gif';else if(iddept==60000) document.layers['imgDept'+i].src=webPath+'images/dept/bt_cuidados_pessoais.gif';}}} else if(isIE){document.all['divMenu'+index].className='invisiblediv';for(i=0;i<total;i++){if(i==index){if(iddept==10000) document.all['imgDept'+i].src=webPath+'images/dept/bt_suplementos.gif';else if(iddept==20000) document.all['imgDept'+i].src=webPath+'images/dept/bt_emagrecimento.gif';else if(iddept==30000) document.all['imgDept'+i].src=webPath+'images/dept/bt_fitoterapicos.gif';else if(iddept==40000) document.all['imgDept'+i].src=webPath+'images/dept/bt_moda_fitness.gif';else if(iddept==50000) document.all['imgDept'+i].src=webPath+'images/dept/bt_acessorios_esportivos.gif';else if(iddept==60000) document.all['imgDept'+i].src=webPath+'images/dept/bt_cuidados_pessoais.gif';}}}} 
function ShowMenuLevel3(iddept){if(isDOM){document.getElementById('divMenuChild'+iddept).className='visiblediv';document.getElementById('divToShowMenuLevel3'+iddept).className='conteudo_div_2_nivel';} else if(isN4){document.layers['divMenuChild'+iddept].className='visiblediv';document.layers['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel';} else if(isIE){document.all['divMenuChild'+iddept].className='visiblediv';document.all['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel';}} function HideMenuLevel3(iddept){if(isDOM){document.getElementById('divMenuChild'+iddept).className='invisiblediv';document.getElementById('divToShowMenuLevel3'+iddept).className='conteudo_div_2_nivel_no_selected';} else if(isN4){document.layers['divMenuChild'+iddept].className='invisiblediv';document.layers['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_no_selected';} else if(isIE){document.all['divMenuChild'+iddept].className='invisiblediv';document.all['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_no_selected';}} function HideMenuLevel3_Last(iddept){if(isDOM){document.getElementById('divMenuChild'+iddept).className='invisiblediv';document.getElementById('divToShowMenuLevel3'+iddept).className='conteudo_div_2_nivel_no_selected_last';} else if(isN4){document.layers['divMenuChild'+iddept].className='invisiblediv';document.layers['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_no_selected_last';} else if(isIE){document.all['divMenuChild'+iddept].className='invisiblediv';document.all['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_no_selected_last';}} function PhoneFormat(campo){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==4){document.getElementById(campo.id).value+='-';}} function CepFormat(campo){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==5){document.getElementById(campo.id).value+='-';}} function RGFormat(campo,evt){var tamanho=document.getElementById(campo.id).value.length;if(isDOM){var key=evt.which;if(tamanho==2||tamanho==6){if(key==8||key==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='.';}}if(tamanho==10){if(key==8||key==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='-';}}}if(isIE){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==2||tamanho==6){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='.';}}if(tamanho==10){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='-';}}}} function CPFFormat(campo,evt){if(isDOM){var tamanho=document.getElementById(campo.id).value.length;var key=evt.which;if(tamanho==3||tamanho==7){if(key==8||key==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='.';}}if(tamanho==11){if(key==8||key==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='-';}}}if(isIE){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==3||tamanho==7){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='.';}}if(tamanho==11){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='-';}}}} function CnpjFormat(campo){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==2||tamanho==6){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='.';}}if(tamanho==10){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='/';}}if(tamanho==15){if(window.event.keyCode==8||window.event.keyCode==127){document.getElementById(campo.id).value+='';}else{document.getElementById(campo.id).value+='-';}}} function SelectRadio(campo){if(isDOM)document.getElementById(campo.id).checked=true;else if(isN4)document.layers[campo.id].checked=true;else if(isIE)document.all[campo.id].checked=true;} function PhoneFormat(campo){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==4){document.getElementById(campo.id).value+='-';}} function CepFormat(campo){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==5){document.getElementById(campo.id).value+='-';}} function ChangeFieldFocus(textbox1,textbox2,nuLength){var txt1;var txt2;if(isDOM){txt1=document.getElementById(textbox1.id);txt2=document.getElementById(textbox2.id);}else if(isN4){txt1=document.layers[textbox1.id];txt2=document.layers[textbox2.id];}else if(isIE){txt1=document.all[textbox1.id];txt2=document.all[textbox2.id];}if(txt1.value.length>=nuLength)txt2.focus();} function CepFormat(campo,evt){if(isDOM){var tamanho=document.getElementById(campo.id).value.length;if(tamanho==5){var key=evt.which;if(key==8)document.getElementById(campo.id).value+='';if(key!=8)document.getElementById(campo.id).value+='-';}}else if(isN4){var tamanho=document.layers[campo.id].value.length;if(tamanho==5){if(window.event.keyCode==8){document.layers[campo.id].value+='';}else{document.layers[campo.id].value+='-';}}}else if(isIE){var tamanho=document.all[campo.id].value.length;if(tamanho==5){if(window.event.keyCode==8||window.event.keyCode==127){document.all[campo.id].value+='';}else{document.all[campo.id].value+='-';}}}} function SelectRadio(campo){if(isDOM)document.getElementById(campo.id).checked=true;else if(isN4)document.layers[campo.id].checked=true;else if(isIE)document.all[campo.id].checked=true;}  function ChangeZoomImage(sPath,sImgZoomName,oImgZoom){var script="<object id='sliceflash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='300px' height='300px'><param name='movie' value='images/product/"+sImgZoomName+"'/><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='images/product/"+sImgZoomName+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='300px' height='300px' wmode='transparent'></embed></object>";var extensao=new Object();extensao=sImgZoomName.split(".");if(isDOM){if(extensao[1]=="swf"){document.getElementById(oImgZoom).className="visiblediv";document.getElementById('ctl00_ContentSite_ctlProdPopUp_refProductPop').className="invisiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="visiblediv";document.getElementById("ctl00_ContentSite_ctlProdPopUp_divFlashPop").innerHTML=script;}else{document.getElementById(oImgZoom).className="visiblediv";document.getElementById('ctl00_ContentSite_ctlProdPopUp_refProductPop').className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="invisiblediv";document.getElementById(oImgZoom).src=sPath+"images/product/"+sImgZoomName;}}else if(isN4){document.layers[oImgZoom].src=sPath+"images/product/"+sImgZoomName;}else if(isIE){if(extensao[1]=="swf"){document.all[oImgZoom].className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_refProductPop'].className="invisiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="visiblediv";document.getElementById("ctl00_ContentSite_ctlProdPopUp_divFlashPop").innerHTML=script;}else{document.all[oImgZoom].className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_refProductPop'].className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="invisiblediv";document.all[oImgZoom].src=sPath+"images/product/"+sImgZoomName;}}} function showDiv(url,sPath){setDivMaxScreenSize("trans");document.getElementById('divImagem').className='visiblediv';document.getElementById('trans').className='visiblediv';document.getElementById('trans').className='translucent';var script="<object id='sliceflash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='300px' height='300px'><param name='movie' value="+sPath+"'images/product/"+url+"'/><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src="+sPath+"'images/product/"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='400px' height='400px' wmode='transparent'></embed></object>";var extensao=new Object();extensao=url.split(".");if(isDOM){if(extensao[1]=="swf"){document.getElementById('ctl00_ContentSite_ctlProdPopUp_refProductPop').className="invisiblediv";document.getElementById("ctl00_ContentSite_ctlProdPopUp_divFlashPop").className="visiblediv";document.getElementById("ctl00_ContentSite_ctlProdPopUp_divFlashPop").innerHTML=script;}else{document.getElementById('imgProductBig').className="invisiblediv";document.getElementById('imgProductZoom').className="invisiblediv";document.getElementById('divZoom').className="invisiblediv";document.getElementById('ctl00_ContentSite_ctlProdPopUp_refProductPop').className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="invisiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_imgZoomPop'].src= sPath + url;}}else if(isN4){document.layers[oImgZoom].src=sPath+"images/product/"+sImgZoomName;}else if(isIE){if(extensao[1]=="swf"){document.all['ctl00_ContentSite_ctlProdPopUp_refProductPop'].className="invisiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="visiblediv";document.getElementById("ctl00_ContentSite_ctlProdPopUp_divFlashPop").innerHTML=script;}else{document.all['imgProductBig'].className="invisiblediv";document.all['imgProductZoom'].className="invisiblediv";document.all['divZoom'].className="invisiblediv";document.getElementById('ctl00_ContentSite_ctlProdPopUp_refProductPop').className="visiblediv";document.all['ctl00_ContentSite_ctlProdPopUp_divFlashPop'].className="invisiblediv";document.getElementById('ctl00_ContentSite_ctlProdPopUp_imgZoomPop').src=sPath + url;}}} function ChangeImage(sWebPath,sImgBig,sImgZoom,idProduct){var script="<object id='sliceflash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='300px' height='300px'><param name='movie' value='images/product/"+sImgBig+"'/><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='images/product/"+sImgBig+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='300px' height='300px' wmode='transparent'></embed></object>";var extensao=new Object();extensao=sImgBig.split(".");if(isDOM){if(extensao[1]=="swf"){document.getElementById('ctl00_ContentSite_divFlash').className="visiblediv";document.getElementById('ctl00_ContentSite_refProduct').className="invisiblediv";document.getElementById('ctl00_ContentSite_divFlash').innerHTML=script;document.getElementById('imgProductBig').className="invisiblediv";document.getElementById('imgProductZoom').className="invisiblediv";document.getElementById('divZoom').className="invisiblediv";document.getElementById('imgShowZoom').className="invisiblediv";}else{document.getElementById('imgProductBig').className="visiblediv imagePane";document.getElementById('imgProductZoom').className="visiblediv imagePane";document.getElementById('divZoom').className="visiblediv zoomPane";document.getElementById('ctl00_ContentSite_divFlash').className="invisiblediv";document.getElementById('ctl00_ContentSite_refProduct').className="visiblediv";document.getElementById("imgProductBig").src=sWebPath+"images/product/"+sImgBig;document.getElementById("imgProductBig").src=sWebPath+"images/product/"+sImgBig; document.getElementById("imgProductZoom").src=sWebPath+"images/product/"+sImgZoom; document.getElementById('imgShowZoom').className="visiblediv";document.getElementById('imgShowZoom').src=sWebPath+"images/x123/btn_over.png";}} else if(isN4) {if(extensao[1]=="swf") {document.layers['ctl00_ContentSite_divFlash'].className="visiblediv";document.layers['ctl00_ContentSite_refProduct'].className="invisiblediv";document.layers['ctl00_ContentSite_divFlash'].innerHTML=script;document.layers['imgProductBig'].className="invisiblediv";document.layers['imgProductZoom'].className="invisiblediv";document.layers['divZoom'].className="invisiblediv";document.layers['imgShowZoom'].className="invisiblediv";} else {document.layers['imgProductBig'].className="visiblediv imagePane";document.layers['imgProductZoom'].className="visiblediv imagePane";document.layers['divZoom'].className="visiblediv zoomPane";document.layers['ctl00_ContentSite_divFlash'].className="invisiblediv";document.layers['ctl00_ContentSite_refProduct'].className="visiblediv";document.layers['imgProductBig'].src=sWebPath+"images/product/"+sImgBig;document.layers['imgProductBig'].src=sWebPath+"images/product/"+sImgBig;document.layers['imgProductZoom'].src=sWebPath+"images/product/"+sImgZoom;document.layers['imgShowZoom'].className="visiblediv";document.layers['imgShowZoom'].src=sWebPath+"images/x123/btn_over.png";}} else if(isIE) {if(extensao[1]=="swf") {document.all['ctl00_ContentSite_divFlash'].className="visiblediv";document.all['ctl00_ContentSite_refProduct'].className="invisiblediv";document.all['ctl00_ContentSite_divFlash'].innerHTML=script;document.all['imgProductBig'].className="invisiblediv";document.all['imgProductZoom'].className="invisiblediv";document.all['divZoom'].className="invisiblediv";document.all['imgShowZoom'].className="invisiblediv";} else {document.all['imgProductBig'].className="visiblediv imagePane";document.all['imgProductZoom'].className="visiblediv imagePane";document.all['divZoom'].className="visiblediv zoomPane";document.all['ctl00_ContentSite_divFlash'].className="invisiblediv";document.all['ctl00_ContentSite_refProduct'].className="visiblediv";document.all['imgProductBig'].src=sWebPath+"images/product/"+sImgBig;document.all['imgProductBig'].src=sWebPath+"images/product/"+sImgBig;document.all['imgProductZoom'].src=sWebPath+"images/product/"+sImgZoom;document.all['imgShowZoom'].className="visiblediv";document.all['imgShowZoom'].src=sWebPath+"images/x123/btn_over.png";}} this.sImgBig=sImgBig;} function ShowDetailDiv(index,total) {if(isDOM) {for(i=0;i<total;i++) {if(i==index) {document.getElementById('divDescription'+i).className='visiblediv';document.getElementById('imgDescriptionTop'+i).src='images/x123/curva_esq_desc_laranja.gif';document.getElementById('tdDescriptionCenter'+i).background='images/x123/bg_descr_laranja.gif';document.getElementById('imgDescriptionBotton'+i).src='images/x123/curva_dir_desc_laranja.gif';} else {document.getElementById('divDescription'+i).className='invisiblediv';document.getElementById('imgDescriptionTop'+i).src='images/x123/curva_esq_desc_cinza.gif';document.getElementById('tdDescriptionCenter'+i).background='images/x123/bg_desc_cinza.gif';document.getElementById('imgDescriptionBotton'+i).src='images/x123/curva_dir_desc_cinza.gif';}}} else if(isN4) {for(i=0;i<total;i++) {if(i==index) {document.layers['divDescription'+i].className='visiblediv';document.layers['imgDescriptionTop'+i].src='images/x123/curva_esq_desc_laranja.gif';document.layers['tdDescriptionCenter'+i].background='images/x123/bg_descr_laranja.gif';document.layers['imgDescriptionBotton'+i].src='images/x123/curva_dir_desc_laranja.gif';} else {document.layers['divDescription'+i].className='invisiblediv';document.layers['imgDescriptionTop'+i].src='images/x123/curva_esq_desc_cinza.gif';document.layers['tdDescriptionCenter'+i].background='images/x123/bg_desc_cinza.gif';document.layers['imgDescriptionBotton'+i].src='images/x123/curva_dir_desc_cinza.gif';}}} else if(isIE) {for(i=0;i<total;i++) {if(i==index) {document.all['divDescription'+i].className='visiblediv';document.all['imgDescriptionTop'+i].src='images/x123/curva_esq_desc_laranja.gif';document.all['tdDescriptionCenter'+i].background='images/x123/bg_descr_laranja.gif';document.all['imgDescriptionBotton'+i].src='images/x123/curva_dir_desc_laranja.gif';} else {document.all['divDescription'+i].className='invisiblediv';document.all['imgDescriptionTop'+i].src='images/x123/curva_esq_desc_cinza.gif';document.all['tdDescriptionCenter'+i].background='images/x123/bg_desc_cinza.gif';document.all['imgDescriptionBotton'+i].src='images/x123/curva_dir_desc_cinza.gif';}}}} function UnCheckedSKU() {if(isDOM) {var oradiosku=document.getElementById('radProductSku');for(var i=0;i<oradiosku.length;i++) oradiosku[i].checked=false;} else if(isN4) {var oradiosku=document.layers['radProductSku'];for(var i=0;i<oradiosku.length;i++) oradiosku[i].checked=false;} else if(isIE) {var oradiosku=document.all['radProductSku'];for(var i=0;i<oradiosku.length;i++) oradiosku[i].checked=false;}} var bChecked;bChecked=true;function CheckAll() {var chk;var i;var theform;if(window.navigator.appName.toLowerCase().indexOf("microsoft")>-1){theform=document.aspnetForm;} else{theform=document.forms["aspnetForm"];} for(i=0;i<theform.elements.length;i++) {if(theform.elements[i].type=="checkbox") {chk=theform.elements[i];chk.checked=bChecked;}} if(bChecked) {bChecked=false;} else {bChecked=true;}} function SendZip(Zip,ZipComplement) {opener.document.getElementById("ctl00$ContentSite$CustomerAddress$txtZip").value=Zip;opener.document.getElementById("ctl00$ContentSite$CustomerAddress$txtZipComplement").value=ZipComplement;window.close();}var enter;enter=true;document.onkeypress=Go;function Go(e){var tecla=event.keyCode;if(tecla==13 && enter==true){event.returnValue=false;}}function ShowMenuLevel3_Last(iddept){if(isDOM){document.getElementById('divMenuChild'+iddept).className='visiblediv';document.getElementById('divToShowMenuLevel3'+iddept).className='conteudo_div_2_nivel_last';} else if(isN4){document.layers['divMenuChild'+iddept].className='visiblediv';document.layers['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_last';} else if(isIE){document.all['divMenuChild'+iddept].className='visiblediv';document.all['divToShowMenuLevel3'+iddept].className='conteudo_div_2_nivel_last';}} 