function Lojistas() {
	window.open('http://portal.mundicenter.com/amoreiras/main.aspx','lojistas','toolbar=no,width=700,height=527,location=no,status=yes,directories=no,menubar=no,scrollbars=yes,resizable=no');
}

function Imprensa(IDCentro) {
	theURL="http://www.mundicenter.com/";
	window.open(theURL+'imprensa/default.aspx?iIDCentro='+IDCentro.toString(),'imprensa','toolbar=no,width=700,height=500,location=no,status=no,directories=no,menubar=no,scrollbars=yes,resizable=no');
}

function Planta(id) {
	window.open('planta.aspx?ID='+id,'planta','toolbar=no,width=480,height=420,location=no,status=no,directories=no,menubar=no,scrollbars=no,resizable=no');
} 

function redirect(ID)
{
	if (ID > 0) {
		window.location = ('loja.aspx?id='+ID);
	}
}

function abrir(id) {
	window.open('obradearte.aspx?id='+id,'ObraDeArte','toolbar=no,width=500,height=500,location=no,status=yes,directories=no,menubar=no,scrollbars=yes,resizable=no');
}

function Aniversario2008() {
	window.open('/aniversario/','aniversario','toolbar=no,width=685,height=525,location=no,status=no,directories=no,menubar=no,scrollbars=auto,resizable=no');
}

function comp_noticias_video(xmlPath){
	document.write("<div style='width:100%;text-align:center;'>");
	 AC_FL_RunContent(
	   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
	   'width', '610',
	   'height', '300',
	   'src', '/flash/comp_noticia_video',
	   'quality', 'best',
	   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
	   'align', 'middle',
	   'play', 'true',
	   'loop', 'false',
	   'scale', 'showall',
	   'wmode', 'transparent',
	   'devicefont', 'false',
	   'id', 'menuTopo',
	   'bgcolor', '#ffffff',
	   'name', 'GaleriaDeImagens',
	   'menu', 'false',
	   'FlashVars','xmlPath='+xmlPath,
	   'allowFullScreen', 'false',
	   'allowScriptAccess','sameDomain',
	   'movie', '/flash/comp_noticia_video',
	   'salign', ''
	); //end AC code
	document.write("</div>");
}

function filmeTrailer(youtubeId){
	document.write("<br>");
	document.write("<br>");
	document.write("<object width='374' height='278'><param name='movie' value='http://www.youtube.com/v/"+youtubeId+"'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/"+youtubeId+"' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='374' height='278'></embed></object>");
}

var selected ='topAdultos';
function hover(id){
	if (selected != id.id) 
		{
			id.className = "topHeadersBackground";
		}
}
function out(id){
	if (selected != id.id)
		{	
			id.className = "topHeaders";
		}
}
function mouseOut(id){
		document.getElementById(id).className = "topHeaders";
		if (id == 'topAdultos')
		{
			document.getElementById('listAdultos').style.display='none';
			document.getElementById('listCrianca').style.display='block';
		}
		if (id == 'topCrianca')
		{
			document.getElementById('listAdultos').style.display='block';
			document.getElementById('listCrianca').style.display='none';
		}
		return;	
}
function select(id){
	if (selected != id) 
	{
		id.className = "topHeadersBackground";
	}
	selected = id;
	
}
function closeTopsLayer(){
	document.getElementById('topsLayer').style.display = "none";
}
function openTopsLayer(){
	document.getElementById('topsLayer').style.display = "block";
}

var layerwaiting;
var layerContentContainer;

function ajaxGetContents(url,layerId,container){
	layerwaiting = document.getElementById(layerId);
	layerwaiting.style.display = "block";
	layerContentContainer = document.getElementById(container);
	if (window.XMLHttpRequest)
	{
		req = new XMLHttpRequest();
		req.onreadystatechange = processReqChange;
		req.open("GET",url,true);
		req.send(null);
	}
		// Procura por uma versão ActiveX (IE)
	else if (window.ActiveXObject)
	{
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if (req)
		{
			req.onreadystatechange = processReqChange;
			req.open("GET",url,true);
			req.send();
		}
	}

}
function processReqChange(){
	// apenas quando o estado for "completado"
	if (req.readyState == 4)
	{
		// apenas se o servidor retornar "OK"
		if (req.status ==200)
		{
			// procura pela div id="pagina" e insere o conteudo
			// retornado nela, como texto HTML
			layerContentContainer.innerHTML = req.responseText;
		}
		else
		{
			layerContentContainer.innerHTML = "<div style='width:100%;height:300;text-align:center;'>Ocorreu um erro pedimos desculpa pelo incómodo causado.</div>";
		}
	}
	if(req.readyState == 1){
		layerContentContainer.innerHTML = "<div style='width:100%;height:300;text-align:center;padding:100 0 0 0;'><img src='/images/common/ajaxLoading.gif' alt='A Carregar'/></div>";
	}
}



