// Popup links
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
function openCredits(ev)
{
	var w = 300;
	var h = 300;
	var centerX = (screen.width/2)-(w/2);
	var centerY = (screen.height/2)-(h/2);
	var url = "credits.htm";
	popUpWindow(url, centerX, centerY, w, h);
	YAHOO.util.Event.preventDefault(ev);	
}
function openPolicy(ev)
{
	var w = 450;
	var h = 600;
	var centerX = (screen.width/2)-(w/2);
	var centerY = (screen.height/2)-(h/2);
	var url = "policy.htm";
	popUpWindow(url, centerX, centerY, w, h);
	YAHOO.util.Event.preventDefault(ev);
}
function openNotelegali(ev)
{
	var w = 450;
	var h = 350;
	var centerX = (screen.width/2)-(w/2);
	var centerY = (screen.height/2)-(h/2);
	var url = "notelegali.htm";
	popUpWindow(url, centerX, centerY, w, h);
	YAHOO.util.Event.preventDefault(ev);
}
function openPromo(ev)
{
	var w = 800;
	var h = 600;
	var centerX = (screen.width/2)-(w/2);
	var centerY = (screen.height/2)-(h/2);
	var url = "/pdf/medicair_campagna_lancio.pdf";
	popUpWindow(url, centerX, centerY, w, h);
	YAHOO.util.Event.preventDefault(ev);
}
YAHOO.util.Event.addListener("credits","click",function(ev){
openCredits(ev)
});
YAHOO.util.Event.addListener("policy","click",function(ev){
	openPolicy(ev)
});
YAHOO.util.Event.addListener("notelegali","click",function(ev){
	openNotelegali(ev)
});