function v(caminho,largura,altura,vars)
{
	
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">');
document.write('<param name="movie" value="'+caminho+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="Flashvars" value="'+vars+'">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="menu" value="false">');
document.write('<embed src="'+caminho+'" quality="high" wmode="transparent" Flashvars="'+vars+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
document.write('</object>');
	
	
}


function campoIMG(escolha,resp,img)
{
	if(escolha==" ")
	{
		document.getElementById(resp).innerHTML = "Escolha Opção";		
	}
	else if(escolha=="n")
	{
		document.getElementById(resp).innerHTML = "&nbsp;A Imagem n&atilde;o ser&aacute; alterada"; 		
	}
	else if(escolha=="e")
	{
		document.getElementById(resp).innerHTML = "&nbsp;A Imagem ser&aacute; exclu&iacute;da"; 		
	}
	else if(escolha=="s")
	{
		document.getElementById(resp).innerHTML = "&nbsp;Localize a nova imagem&nbsp;<input name='"+img+"' type='file' id='"+img+"' size='30'>"; 		
	}
	else
	{
		document.getElementById(resp).innerHTML = "";
	}	
}




function campoIMG1(escolha)
{
	
	if(escolha==" ")
	{
		document.getElementById("resp").innerHTML = "Escolha Opção";		
	}
	else if(escolha=="n")
	{
		document.getElementById("resp").innerHTML = "&nbsp;A Imagem n&atilde;o ser&aacute; alterada"; 		
	}
	else if(escolha=="e")
	{
		document.getElementById("resp").innerHTML = "&nbsp;A Imagem ser&aacute; exclu&iacute;da"; 		
	}
	else if(escolha=="s")
	{
		document.getElementById("resp").innerHTML = "&nbsp;Localize a nova imagem&nbsp;<input name='img' type='file' id='img' size='30'>"; 		
	}
	else
	{
		document.getElementById('"'+resp+'"').innerHTML = "";
	}	
	
}












function Nfots()
{
	
	LimpaCP();
	nFotos = document.cads.nFtos.value;	
	
	imgCP = 1;
	for(i=0;i<nFotos;i++)
	{
		cp = imgCP+i;
		document.getElementById('img'+cp).innerHTML = "<input name='img"+cp+"' type='file' id='img"+cp+"' size='30'>";
	}

	
}


function vd(v){
	

	if(v=="s")
	{
		
		document.getElementById('vds').innerHTML = "<textarea name='vdlk' rows='3' cols='50'></textarea>";
		
	}
	else
	{
		document.getElementById('vds').innerHTML = "";
		
	}
	
	
	
}


function LimpaCP()
{
	
	nFotos = 8;//document.cads.nFtos.value;	
	
	imgCP = 1;
	for(i=0;i<nFotos;i++)
	{
		cp = imgCP+i;
		document.getElementById('img'+cp).innerHTML = "";
	}

	
}

function valida()
{
 with(document.cads)
    {
	if(nm.value.length==" ")
    {
	alert("Digite Seu Nome!");
	cads.focus();
	return false;
	}
	if(ml.value== " " ||  ml.value.indexOf('@', 0) == -1) 
    {
	alert("E-mail Inválido");
	cads.focus();
	return false;
	}
	if(minhacara.value.length==" ")
    {
	alert("Mostra cara, faltou sua Imagem!");
	cads.focus();
	return false;
	}	
	
	
	submit();
	}
}

function abre(arquivo)
{

window.open(arquivo,'abre','status=no, toolbar=0, location=0, directories=0,status=0,menubar=0,scrollbars=0,resizable=0, width=210,height=210');
}




function abreNova(arquivo,altura,largura)
{

window.open(arquivo,'abre','status=no, toolbar=0, location=0, directories=0,status=0,menubar=0,scrollbars=0,resizable=0, width='+altura+',height='+largura);
}




function MostraHisto(dv,conteudo,tp)
{
	
	if(tp=="mostra")
	{
		document.getElementById('dir'+dv).innerHTML = conteudo;
	}
	else
	{
		
	}
	

	
}







