// JavaScript Document
var bgWidth=1000;
var bgLeft, winWidth, conteLeft, conteTop;
function centerBackGround(){	
	winWidth=window.getWidth();
	bgLeft=Math.ceil((winWidth-bgWidth)/2);
	//console.log(bgLeft);
	conteLeft=bgLeft+120;
	conteTop=24;
	$$('body')[0].setStyles({
		'background-image':'url(imgs/fondo02.jpg)',
		'background-repeat':'no-repeat',
		'background-color':'#429edd',
		'background-position': bgLeft+'px -80px'
	});
	$('conte').setStyles({'left' : conteLeft, 'top' : conteTop});
}

window.addEvent('domready', function(){
	centerBackGround();
	if(typeof(strImgTitle)!='undefined' && strImgTitle!= null && strImgTitle!=''){
		imgTitle=new Element('div',{id:'imgTitle'});
		$$('body')[0].grab(imgTitle);
		imgTitle.grab(new Element('img', {'id': 'imageTitle', 'src' : 'imgs/'+strImgTitle, 'class': 'fixPng'}));
		imgTitle.setStyles({'left' : conteLeft+6, 'top' : conteTop+60, 'position' : 'absolute', 'z-index' : 100});		
	}
	if(typeof(strImgLaPagina)!='undefined' && strImgLaPagina!= null && strImgLaPagina!=''){
		imgLaPag=new Element('div',{id:'imgLaPag'});
		$$('body')[0].grab(imgLaPag);
		imgLaPag.grab(new Element('img', {'id': 'imageTitle', 'src' : 'imgs/'+strImgLaPagina, 'class': 'fixPng'}));
		imgLaPag.setStyles({'left' : conteLeft+28, 'top' : conteTop+236, 'position' : 'absolute', 'z-index' : 100});
	}
	if(typeof(strImgLogoAra)!='undefined' && strImgLogoAra!= null && strImgLogoAra!=''){
		imgLogoAra=new Element('div',{id:'imgLogoAra'});
		$$('body')[0].grab(imgLogoAra);
		imgLogoAra.grab(new Element('img', {'id': 'imageTitle', 'src' : 'imgs/'+strImgLogoAra, 'class': 'fixPng'}));
		imgLogoAra.setStyles({'left' : conteLeft+56, 'top' : conteTop+520, 'position' : 'absolute', 'z-index' : 100});
	}
	
	if(typeof(strListNotas)!='undefined' && strListNotas!= null && habilitarMenuNoticias){
		listNotas=new Element('div',{id:'listNotas'});
		$$('body')[0].grab(listNotas);
		listNotas.set('html', strListNotas);
		listNotas.setStyles({'left' : conteLeft, 'top' : conteTop+264, 'position' : 'absolute', 'z-index' : 100});
		listNotasBG=new Element('div',{id:'listNotasBG'});
		$$('body')[0].grab(listNotasBG);
		listNotasBG.set('html', '&nbsp;');
		listNotasBG.setStyles({'left' : conteLeft, 'top' : conteTop+264, 'position' : 'absolute', 'z-index' : 80, opacity:.5});	
		listNotasBG.addClass('listNotasBG');
	}
	$$('.fixPng').each(function(png) {Browser.fixPNG(png);});
});
function abrir360(url){
	window.open(url,"pop360","scrollbars=no,toolbars=no,resizable=no,width=400,height=230");
}
