function popcom(page,w,h) { 
prop = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+w+",height="+h+",";
prop+= "left="+Math.floor((screen.width-w)/2)+",";
prop+= "top="+Math.floor((screen.height-h)/2)+",";
var numero = 10 + Math.floor(Math.random() * 11);
window.open(page,numero,prop);
} 
function popsem(page,w,h) { 
prop = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+w+",height="+h+",";
prop+= "left="+Math.floor((screen.width-w)/2)+",";
prop+= "top="+Math.floor((screen.height-h)/2)+",";
prop+= "top="+Math.floor((screen.height-h)/2)+",";
var numero = 10 + Math.floor(Math.random() * 11);
window.open(page,numero,prop);
}
function flash(largura, altura, arquivo){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largura+'" height="'+altura+'" id="teste" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="'+arquivo+'" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="'+arquivo+'" wmode="transparent" quality="best" width="'+largura+'" height="'+altura+'" name="teste" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
var now = new Date();
var mName = now.getMonth() + 1;
var dayNr = now.getDate();
var yearNr=now.getYear();
if(mName==1) Month = "janeiro";
if(mName==2) Month = "fevereiro";
if(mName==3) Month = "março";
if(mName==4) Month = "abril";
if(mName==5) Month = "maio";
if(mName==6) Month = "junho";
if(mName==7) Month = "julho";
if(mName==8) Month = "agosto";
if(mName==9) Month = "setembro";
if(mName==10) Month = "outubro";
if(mName==11) Month = "novembro";
if(mName==12) Month = "dezembro";
if(yearNr < 2000) Year = 1900 + yearNr;
else Year = yearNr;
var todaysDate =(" " + dayNr + " de " + Month + " de " + Year);
function valida(pedido){
	if (document.pedido.nmpedido.value.length <3){
		alert('Informe seu Nome');
		document.pedido.nmpedido.focus();
		return false;
	}
	else if (document.pedido.musicapedido.value.length <6){
		alert('Informe o nome da música e cantor');
		document.pedido.musicapedido.focus();
		return false;
	}
	else if (document.pedido.parapedido.value.length <3){
		alert('Informe para quem você oferece a música');
		document.pedido.parapedido.focus();
		return false;
	}
	else if (document.pedido.msg.value.length <3){
		alert('Preencha o campo Recado');
		document.pedido.msg.focus();
		return false;
	}
	else if (document.pedido.security_code.value.length <4){
		alert('Oops! Faltou o código de segurança!');
		document.pedido.security_code.focus();
		return false;
	}
	document.pedido.submit();
}
