<!-- Zoom
function zoomTXT(idDIV,NomeClasseZOOM) {
	document.getElementById(idDIV).className = NomeClasseZOOM;
}
// Zoom-->
<!-- popup2
function PopUp(pagina,largura,altura,invisivel){
var direita=(screen.width) ? ((screen.width-largura)/2) : 0;
var topo=(screen.height) ? ((screen.height-altura)/2) : 0;
var Open=window.open(pagina,"_blank","top="+topo+",left="+direita+",height="+altura+",width="+largura);
if(invisivel==true){ Open.blur(); window.focus(); }
}
// -->

<!-- hora
var timerID = null;
var timerRunning = false;
function startclock () 
{
stopclock();
time();
}
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function time()
{
var now = new Date();
var ampm = (now.getHours() >= 12) ? " PM" : " AM"
var hours = now.getHours();
hours = ((hours > 12) ? hours - 12 : hours);
var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
var Time=(hours + minutes + seconds + " " + ampm );
window.status=Time;
timerID = setTimeout("time()",1000);
timerRunning = true;
}
function clearStatus()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
window.status="";   
}
//hora-->
<!-- no code
if (window.Event) 
document.captureEvents (Event.MOUSEUP); 
function nocontextmenu() 
{ 
return false; 
//event.cancelBubble = true 
//event.returnValue = false; 
} 
function norightclick(e) 
{ 
if (window.Event) 
{ 
if (e.which == 2 || e.which == 3) 
return false; 
} 
else 
if (event.button == 2 || event.button == 3) 
{ 
event.cancelBubble = true 
event.returnValue = false; 
return false; 
} 
} 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); 
} 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick; 

function disableselect (e) { 
return false
} 
function reEnable(){ 
return true 
} 
document.onselectstart=new Function ("return false") 
if (window.sidebar){ 
//document.onmousedown=disableselect 
document.onclick=reEnable 
} 
//-->
<!--
function Apaga() 
{ 
form1.nome.value = "" 
return false 
} 
//-->
<!--
function Apaga2() 
{ 
form1.email.value = ""
return false 
} 
//-->
<!--
function Apaga3() 
{ 
document.form1.desc.value = "" 
return false 
} 
function abre_popup(arquivo,nome_janela,config)
	{
			window.open(arquivo,nome_janela,config)
	}

function MM_swapImgRestore() { //v3.0
  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() { //v3.0
  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) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function showfet()
{
	MM_showHideLayers('mnuFet','','show');
	MM_showHideLayers('mnuVideos','','show');
}
function send_busca()
{
	if(document.form_busca.busca.value != '')
	{
		document.location.href = '/shopping/produtos.asp?Chave=' + document.form_busca.busca.value;
	}
	else
	{
		alert('Digite uma palavra chave para realizar a busca!')
		document.form_busca.busca.focus();
		//return false;
	}
}
function checa_log()
{
}
function check_news(fl)
{
	
	with(fl)
	{
		if (Nome.value.length < 5)
		{
				alert('É necessario preencher seu nome corretamente para conclusão do cadastro!')
				Nome.focus();
					window.scroll(0,250)
				return false;
		}
		if(!valida_mail(Email.value))
		{
			Email.focus();
			window.scroll(0,360)
			return false
		}
		if (DataNascimento.value.length < 10)
		{
				alert('É necessario preencher sua Data de Nascimento corretamente!')
				DataNascimento.focus();
				window.scroll(0,300)
				return false;
		}
		
		if (DataNascimento.value != '')
		{
			vardata = DataNascimento.value
			vdata = vardata.split('/')
			if(vdata[0]>=32 || vdata[1]>=13 || isNaN(parseFloat(vdata[0]))==true || vardata.length < 8)
			{
				alert('Data de Nascimento invalida!')
				DataNascimento.focus();
				window.scroll(0,300)
				return false
			}
		}
	}
}
////////////////////////////// Funções de validação
function modulo(str) {
    	soma=0;
    	ind=2;
    	for(pos=str.length-1;pos>-1;pos=pos-1) {
    		soma = soma + (parseInt(str.charAt(pos)) * ind);
    		ind++;
    		if(str.length>11) {
    			if(ind>9) ind=2;
    		}
		}
    	resto = soma - (Math.floor(soma / 11) * 11);
    	if(resto < 2) {
	    	return 0
    	}
    	else {
    		return 11 - resto
    	}
	}
///////////////////////
function verificar_cpf(sCPF)
{
    if (sCPF == "") return 3;
    var i;
    var intDigito;
    var varQuociente;
    var iCPF = new Array();
    var iDig = new Array();
    sCPF=formatear_cpf(sCPF);
    if (sCPF == "") return 4;
    for (i = 1;i<10;i++) {
        iCPF[i] = sCPF.substr(i-1, 1);
        iCPF[i] = parseInt(iCPF[i]);}
    iDig[1] = sCPF.substr(9, 1);
    iDig[1] = parseInt(iDig[1]);
    iDig[2] = sCPF.substr(10, 1);
    iDig[2] = parseInt(iDig[2]);
    intDigito = (iCPF[9] * 2) + (iCPF[8] * 3) + (iCPF[7] * 4);
    intDigito = intDigito + (iCPF[6] * 5) + (iCPF[5] * 6) + (iCPF[4] * 7);  
    intDigito = intDigito + (iCPF[3] * 8) + (iCPF[2] * 9) + (iCPF[1] * 10);
    intDigito = (intDigito * 10) % 11;
    if (intDigito == 10) intDigito = 0;
    if (intDigito !== iDig[1])return 1;
    intDigito = (iDig[1] * 2) + (iCPF[9] * 3) + (iCPF[8] * 4) + (iCPF[7] * 5);
    intDigito = intDigito + (iCPF[6] * 6) + (iCPF[5] * 7) + (iCPF[4] * 8);
    intDigito = intDigito + (iCPF[3] * 9) + (iCPF[2] * 10) + (iCPF[1] * 11);
    intDigito = (intDigito * 10) % 11;
    if (intDigito == 10) intDigito = 0;
    if (intDigito !== iDig[2]) return 2;
	return 0;
}
///////////////////////////
function formatear_cpf(sCGC)
{
    var POS;
    if (sCGC == "") return;
    do {POS = sCGC.indexOf(".",0);
        if (POS == -1)break;
        sCGC = sCGC.substr(0, POS) + sCGC.substr(POS + 1);}
    while (POS !== -1);
    do {POS = sCGC.indexOf("/",0);
        if (POS == -1)break;
        sCGC = sCGC.substr(0, POS) + sCGC.substr(POS + 1);}
    while (POS !== -1);
    do {POS = sCGC.indexOf("-",0);
        if (POS == -1)break;
        sCGC = sCGC.substr(0, POS) + sCGC.substr(POS + 1);}
    while (POS !== -1);
    return sCGC;
}
//////////////////////////
function valida_mail(valor)
{
	valor = valor.toLowerCase();
	mensagem_p = "Preencha seu e-mail corretamente para prosseguir!"
	mensagem_g = "No seu endereço de e-mail, não utilize acentos nas letras, nem caracteres como : , ( ) [ }] # $ % !\nEstes caracteres não são válidos para o endereço de e-mail"
	mensagem_uol = "Se você tem um e-mail da UOL, você deve clicar em alterar plano e escolher o plano como assinante UOL!"
	prim = valor.indexOf("@"); 
	if(prim < 2){ alert(mensagem_p); return false ;}
	ponto = valor.indexOf(".");
	if(ponto < 1){ alert(mensagem_p); return false ;}
	if((ponto - prim) == 1){ alert(mensagem_p); return false;}
	if(ponto - prim < 2 && ponto - prim > -1){ alert("blz"); return false;}
	if(valor.indexOf("zipmail.com") > -1 && valor.indexOf("zipmail.com.br") == -1){ alert(mensagem_p); return false;}
	if(valor.indexOf("aol.com.br") > -1){ alert("O e-mail @aol.com.br não é válido,\nO correto para este caso é @aol.com apenas, sem o br no final!"); return false;}
	if(valor.indexOf("bol.com") > -1 && valor.indexOf("bol.com.br") == -1){ alert("O e-mail @bol.com não é válido,\nO correto para este caso é @bol.com.br, acrescente o br ao final!"); return false;}
	if(valor.indexOf("mtv.com") > -1 && valor.indexOf("mtv.com.br") == -1){ alert("O e-mail @mtv.com não é válido,\nO correto para este caso é @mtv.com.br, acrescente o br ao final!"); return false;}
	if(valor.indexOf("cade.com") > -1 && valor.indexOf("cade.com.br") == -1){ alert("O e-mail @cade.com não é válido,\nO correto para este caso é @cade.com.br, acrescente o br ao final!"); return false;}
	if(valor.indexOf("ig.com") > -1 && valor.indexOf("ig.com.br") == -1){ alert("O e-mail @ig.com não é válido,\nO correto para este caso é @ig.com.br, acrescente o br ao final!"); return false;}
	if(valor.indexOf("terra.com") > -1 && valor.indexOf("terra.com.br") == -1){ alert("O e-mail @terra.com não é válido,\nO correto para este caso é @terra.com.br, acrescente o br ao final!"); return false;}if(valor.indexOf("hotmail.com.br") > -1){ alert("O e-mail @hotmail.com.br não é válido,\nO correto para este caso é @hotmail.com apenas, sem o br no final!"); return false;}
	if(valor.indexOf("..") > -1 || valor.indexOf(":") > -1 || valor.indexOf("(") > -1 || valor.indexOf(")") > -1 || valor.indexOf("[") > -1 || valor.indexOf("]") > -1 || valor.indexOf(",") > -1 || valor.indexOf("#") > -1 || valor.indexOf("&") > -1 || valor.indexOf("*") > -1 || valor.indexOf("!") > -1 || valor.indexOf("á") > -1 || valor.indexOf("ã") > -1 || valor.indexOf("é") > -1 || valor.indexOf("ó") > -1 || valor.indexOf("ô") > -1 || valor.indexOf("ê") > -1 || valor.indexOf("â") > -1){ alert(mensagem_g); return false;}
	if(valor.indexOf(" ") > 1){ alert('Espaço não é um caracter válido para o endereço de e-mail!'); return false;}
	return true;
}
///////////
function checa1(valor) {
		cpfcompleto = valor
		valorfinal = cpfcompleto.replace(".","");
		valorfinalb = valorfinal.replace(".","");
		valor = valorfinalb.replace("-","")
		//alert(valor)
		if (valor.length != 11 || valor == 11111111111 || valor == 00000000000 || valor == 22222222222 || valor == 33333333333 || valor == 44444444444 || valor == 55555555555 || valor == 66666666666 || valor == 77777777777 || valor == 88888888888 || valor == 99999999999) {
    		alert("Os dados do seu CPF aparentam não ser válidos.\nTente novamente!")
    		return false;
		}
    	if(modulo(valor.substring(0,valor.length - 2)) + "" + 

modulo(valor.substring(0,valor.length - 1)) != valor.substring(valor.length - 2,valor.length)) {
    		alert("Os dados do seu CPF aparentam não ser válidos.\nRedigite-os sem pontos (.) traços (-) ou vírgulas (,).");
    		return false;
    	}
		return true;
	}
////////////////
function isCreditCard(st) {
  // Encoding only works on cards with less than 19 digits
  if (st.length > 19)
    return (false);

  sum = 0; mul = 1; l = st.length;
  for (i = 0; i < l; i++) {
    digit = st.substring(l-i-1,l-i);
    tproduct = parseInt(digit ,10)*mul;
    if (tproduct >= 10)
      sum += (tproduct % 10) + 1;
    else
      sum += tproduct;
    if (mul == 1)
      mul++;
    else
      mul--;
  }

  if ((sum % 10) == 0)
    return (true);
  else
    return (false);
}
function twoisCEP ()
{
	var cep=document.cadastro.Cep.value;
	if (cep != '')
	{
		if((cep.length<8) || (isInt(cep) == false))
			{
				document.form1.cep.focus();
				alert('CEP inválido!');
			}
		else 
			{
				//document.form1.status_cep.value='Verificando CEP...';
				frame2.document.location = 'www.digitozero.com.br/cep.asp?cep='+cep
			}
	}
}
function limpa(val)
{
val.value="";
}


var url;
function link_pop(mylink,w,h,scr)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href,'sinopse','width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=0,scrollbars='+scr+',status=0,toolbar=0,marginleft=0,margintop=0,left=150,top=150');
return false;
}

//-->