

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
   try{
	window.attachEvent("onload", correctPNG);
   }
   catch(e){}







function Vivo() {

windowprops = "top=100,right=50,resizable=no,toolbar=no,scrollbars=no" + ",width=502,height=313";
window.open("http://d2fm.com.br/aovivo", "popupPage", windowprops);
}






function studio() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=no" + ",width=600,height=375";
window.open("http://www.d2fm.com.br/studio/aovivo.html", "popupPage", windowprops);
}

function regra() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=500,height=400";
window.open("http://www.d2fm.com.br/promocoes/regulamento.html", "popupPage", windowprops);
}

function musica03() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=no" + ",width=500,height=180";
window.open("top20/bep.html", "popupPage", windowprops);
}

function Galeria() {

windowprops = "top=100,right=0,resizable=no,toolbar=no,scrollbars=no" + ",width=817,height=547";
window.open("http://d2fm.com.br/1/index", "popupPage", windowprops);
}


function regra2() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=500,height=400";
window.open("http://www.d2fm.com.br/promocoes/regulamento2.html", "popupPage", windowprops);
}

function regra3() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=500,height=400";
window.open("http://www.d2fm.com.br/promocoes/regulamento3.html", "popupPage", windowprops);
}

function regra10() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=500,height=400";
window.open("http://www.d2fm.com.br/promocoes/regulamento7.html", "popupPage", windowprops);
}

function cupom() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=410,height=450";
window.open("http://www.d2fm.com.br/promocoes/pop-up-rodel.html", "popupPage", windowprops);
}

function regra_britney() {

windowprops = "top=200,right=0,resizable=no,toolbar=no,scrollbars=yes" + ",width=410,height=450";
window.open("http://www.d2fm.com.br/promocoes/regulamento-britney.html", "popupPage", windowprops);
}


var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));


try {
var pageTracker = _gat._getTracker("2652969-2");
pageTracker._trackPageview();
} catch(err) {}




function abre_flash(nome,largura,altura){

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="'+nome+'" align="middle">');

document.write('<param name="allowScriptAccess" value="sameDomain" />');

document.write('<param name="movie" value="'+nome+'.swf" />');

document.write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');

document.write('<embed src="'+nome+'.swf" quality="high" bgcolor="#ffffff"'+
' width="'+largura+'" height="'+altura+'" name="'+nome+'" align="middle"'+
' allowScriptAccess="sameDomain" type="application/x-shockwave-flash"'+
' pluginspage="http://www.macromedia.com/go/getflashplayer" />');

document.write('</object>');

}


