function montaFlash(swf, width, height, id, wmode, cache)
{
noCache = cache || cache == undefined ? "" : "?" + new Date();
monta_swf = "";
monta_swf += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" id=\""+ id +"\" width=\""+ width +"\" height=\""+ height +"\" title=\"\">";
monta_swf += "<param name=\"movie\" value=\""+ swf + noCache +"\" />";
monta_swf += "<param name=\"wmode\" value=\""+ wmode +"\" />";
monta_swf += "<param name=\"quality\" value=\"high\" />";
monta_swf += "<param name=\"menu\" value=\"0\" />";
monta_swf += "<param name=\"volume\" value=\"1\" />";
monta_swf += "<embed src=\""+ swf + noCache +"\" quality=\"high\" wmode=\""+ wmode +"\" volume=\"100\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" id=\""+ id +"\" width=\""+ width +"\" height=\""+ height +"\"></embed>";
monta_swf += "</object>";
document.write(monta_swf);
}

function monta_video(wmv,width,height,id,cache) {
noCache = cache || cache == undefined ? "" : "?" + new Date();
monta_wmv = "";
monta_wmv += "<object id=\""+id+"\" width=\""+width+"\" height=\""+height+"\" classid=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"video/x-ms-wmv\">";
monta_wmv += "<param name=\"url\" value=\""+wmv+"\">";
monta_wmv += "<param name=\"UiMode\" value=\"none\">";
monta_wmv += "<param name=\"ShowControls\" value=\"false\">";
monta_wmv += "<param name=\"ShowDisplay\" value=\"false\">";
monta_wmv += "<param name=\"ShowStatusBar\" value=\"false\">";
monta_wmv += "<param name=\"autoStart\" value=\"true\">";
monta_wmv += "<param name=\"loop\" value=\"false\">";
monta_wmv += "<param name=\"controls\" value=\"none\">";
monta_wmv += "<param name=\"volume\" value=\"100\">";
monta_wmv += "<embed type=\"application/x-mplayer2\" pluginspage=\"http://microsoft.com/windows/mediaplayer/en/download/\" id=\""+id+"\" controls=\"none\" onError=\"null\" AllowChangeDisplaySize=\"0\" SCRIPTCALLBACKS=\"OnPlayStateChange\" showdisplay=\"0\" UiMode=\"0\" showstatusbar=\"0\" videoborder3d=\"0\" showcontrols=\"0\" SHOWTRACKER=\"-1\" volume=\"100\" SHOWDISPLAY=\"0\" width=\""+width+"\" height=\""+height+"\" src=\""+wmv+"\" autostart=\"1\" loop=\"0\">";
monta_wmv += "</embed>";
monta_wmv += "</object>";

document.write(monta_wmv);
}

var url_site="http://www.chrystianeralf.com" 
var titulo_site="Chrystian e Ralf - Website Oficial da Dupla" 
function adiciona_bookmark(){if (document.all)window.external.AddFavorite(url_site,titulo_site)} 


function marca_enq() {
    parent.document.formxw.selecao.value = '1';
}
function check_enquete() {
	var f = document.formxw;
	if (f.selecao.value=='') {
		alert("Por favor, Selecione uma opção!");
		return false;
	} else {
		enquete('enqresult');
	}
}

function enquete(theURL) {
	 window.open('',theURL,"top=150,left=250,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=300,height=420");
}

function popWin(URL,NAME,WIDTH,HEIGHT,RESIZE,SCROLL) {
   winId = window.open(URL,NAME,'width='+WIDTH+',height='+HEIGHT+',resizable='+RESIZE+',scrollbars='+SCROLL+',menubar=no,toolbar=no,location=no,directories=no,status=no');
	var clientWidth = screen.availWidth;
	var clientHeight = screen.availHeight;
	var xPos = (clientWidth - WIDTH)/2;
	var yPos = (clientHeight - HEIGHT)/2;
	winId.moveTo(xPos,yPos);
}

function CheckMail(str){
	var testresults
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
		testresults=false
	else { 
		testresults=true
	     }
	return (testresults)
}

function formatar(src, mask) {	
		var i = src.value.length;
		var saida = mask.substring(0,1);
		
		var texto = mask.substring(i)
		
		if (texto.substring(0,1) != saida) {
			src.value += texto.substring(0,1);
		}		
}

function popWin(URL,NAME,WIDTH,HEIGHT,RESIZE,SCROLL) {
   winId = window.open(URL,NAME,'width='+WIDTH+',height='+HEIGHT+',resizable='+RESIZE+',scrollbars='+SCROLL+',menubar=no,toolbar=no,location=no,directories=no,status=no');
	var clientWidth = screen.availWidth;
	var clientHeight = screen.availHeight;
	var xPos = (clientWidth - WIDTH)/2;
	var yPos = (clientHeight - HEIGHT)/2;
	winId.moveTo(xPos,yPos);
}
function numeral(e, obj){
           	if (e.keyCode < 48 || e.keyCode > 57) {
           			if(e.keyCode != 44 || document.getElementById(obj).value.indexOf(",") != -1){
           				e.returnValue = false;
           				return;
           			}
           		}      		
}

function mOvr(src,clrOver) {
 if (!src.contains(event.fromElement)) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
  src.color = 'black'
 }
}

function mOut(src,clrIn) {
 if (!src.contains(event.toElement)) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
 }
}

function mClk(src) {
 if(event.srcElement.tagName=='TD'){
  src.children.tags('A')[0].click();
 }
}

var musica = '';