function enviaForm(frmNome, url, destino){
f = document.getElementById(frmNome);
var query=url;
for (i=0;i<f.elements.length;i++){
query += i==0 ? '?' : '&';
query += f.elements[i].name + '=' + f.elements[i].value;
}
carrega(query, destino);
}
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 detalhe(cd) {
	w = 367;
	h = 230;
	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)+",";
	window.open('../pt/bandas/info.php?cdbanda='+cd,'banda',prop);
}
function cPg(pg) {
	window.open("bandas.php?pg="+pg, "_self");
}
function validar(){
	if(document.getElementById("nome_emails").value==""){
		alert("Favor preencher o seu nome!");
		document.getElementById("nome_emails").focus();
		return false;
	}
	if(document.getElementById("emails_email").value==""){
		alert("Favor preencher seu email corretamente!");
		document.getElementById("emails_email").focus();
		return false;
	}
	document.form.submit();
}
function size()
 {
    var iframe = parent.document.getElementById("iframe");  
    var obj=document.body.scrollHeight; 
 	parent.document.getElementById('iframe').height = obj;		 
 }
 	function wmp(cd) {
		w = 329;
		h = 50;
		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)-100)+",";
		window.open(cd,"swfplayer",prop);
	}
function wmpwmp(page) {
        window.open(page,'player','scrollbars=no,width=329,height=50,top=220,left=200',marginwidth='0', marginheight='0');
}
function Play(){
	MediaPlayer.play();
}
function Stop(){
	MediaPlayer.stop();
}
function
openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
        newWindow =
window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
        newWindow.document.open();
        newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF"leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()"onClick="self.close()">'); 
        newWindow.document.write('<a href="javascript:window.close()"><img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+' border=0></a>');
        newWindow.document.write('</body></html>');
        newWindow.document.close();
        newWindow.focus();
}
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>');
}
/*
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
} 
window.onload=startList;
*/
// Data de Hoje
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;
// String que mostra a data atual
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();
}