// JavaScript Document




////////////// script para o flash ///////////////////////
function FUnblock(strName, nWidth, nHeight, strWMode){
 
 var strFlash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+nWidth+'" height="'+nHeight+'" id="'+strName+'">';
 strFlash += '<param name="allowScriptAccess" value="sameDomain" />';
 strFlash += '<param name="movie" value="'+strName+'.swf" />';
 strFlash += '<param name="wmode" value="transparent" />';
 strFlash += '<embed src="'+strName+'.swf" width="'+nWidth+'" height="'+nHeight+'" name='+strName+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
 strFlash += '</object>';
 
 document.write(strFlash); 
 
}


function frmBusca(){
	var dc = document.form1
	dc.action="produtos.aspx"
	dc.submit();
}


function validaContato(){
	var dc = document.form1
	if (dc.nome.value==""){alert("Preencha o campo Nome!");dc.nome.focus();return false;}
	if (dc.email.value==""){alert("Preencha o campo E-mail!");dc.email.focus();return false;}
	if (dc.assunto.value==""){alert("Preencha o campo Assunto!");dc.assunto.focus();return false;}
	if (dc.msn.value==""){alert("Preencha o campo Mensagem!");dc.msn.focus();return false;}
}


function validaDetalhes(){
	var dc = document.formDetalhes
	if (dc.qtde.value==""){
		alert("Informe a quantidade!");
		dc.qtde.focus();
		return false;
	}else{
		if(parseInt(dc.qtde.value) < parseInt(dc.qtdeMinima.value)){
			alert("Quantidade escolhida é menor que a permitida");
			dc.qtde.focus();
			return false;
		}
	}
	
}


function openBR(endereco,janela,parametros){
	window.open(endereco,janela,parametros)
}
