function popUp()
{
  newWin = window.open(this.href, this.target, this.settings);
  newWin.focus();
  return false;
}

function hidePopup()
{
 document.getElementById('popup').style.display="none"
 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) == "GIF"){
			//img.src = img.src;
		}
	}	
}

function showPopup(imageName, imageWidth, imageHeight, imageLink, tempo)
{
	l = screen.width;
	a = screen.height;
	
	document.write("<div id=\"popup\" style=\"width:"+imageWidth+"px; height:"+imageHeight+"px; top:10%; left:50%; margin-top:-; position:absolute; z-index:1000;")
	if(a == 864){
		document.write("235")
	}else if(a == 768){
		document.write("187")
	}else if(a == 600){
		document.write("110")
	}else{
		document.write("110")
	}
	document.write("px; margin-left:-" + (imageWidth/2+2) + "px;\">")
	document.write("<img src=\"" + imageName + "\" width=\"" + imageWidth + "\" height=\"" + imageHeight + "\" border=\"0\" usemap=\"#Map\" />");
	document.write("</div>");
	
	document.write("<map name=\"Map\" id=\"Map\">");
	document.write("<area shape=\"rect\" coords=\"" + (imageWidth-62) + ",4," + (imageWidth-3) + ",21\" href=\"javascript:hidePopup();\" />");
	if (imageLink > "")
		document.write("<area shape=\"rect\" coords=\"0,0," + (imageWidth-62) + ",21\" href=\"" + imageLink + "\" onclick=\"hidePopup();\" />");
		document.write("<area shape=\"rect\" coords=\"0,21," + imageWidth + "," + (imageHeight-4) + "\" href=\"" + imageLink + "\" onclick=\"hidePopup();\" />");
	document.write("</map>");	
	
	//timer do popup
    TimerID = setInterval("hidePopup()",tempo);
}

function showPopupFlash(flashName, flashWidth, flashHeight)
{
	l = screen.width;
	a = screen.height;
	
	document.write("<div id=\"popup\" style=\"width:"+flashWidth+"px; height:"+flashHeight+"px; top:50%; left:50%; margin-top:-");
	if(a == 864){
		document.write("231")
	}else if(a == 768){
		document.write("183")
	}else if(a == 600){
		document.write("106")
	}else{
		document.write("106")
	}
	document.write("px; margin-left:-" + (flashWidth/2) + "px; position:absolute;\">")
	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=\""+flashWidth+"\" height=\""+flashHeight+"\">");
	document.write("<param name=\"movie\" value=\"" + flashName + "\" />");
	document.write("<param name=\"quality\" value=\"high\" />");
	document.write("<param name=\"wmode\" value=\"transparent\" />");
	document.write("<embed src=\"" + flashName + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+flashWidth+"px\" height=\""+flashHeight+"\" wmode=\"transparent\"></embed>");
	document.write("</object>");
	document.write("</div>");

	//timer do popup
   TimerID = setInterval("hidePopup()",10000);
   // TimerID = setInterval("hidePopup()",90000);
}

function alerta(){
	alert('ALERTA');
}