// JavaScript Document

//Correcoes de css para ie
if (navigator.appName=="Microsoft Internet Explorer"){
	document.write('<link href="css/ie_css.css" rel="stylesheet" type="text/css" />');
}

//JS do lightbox
function abreLightbox(){
	tamanho();
	Effect.Appear('fade', { to: 0.8 });
	Effect.Appear('light', { duration: 2.0 });
}

function tamanho(){
	var largura = getWidth();
	var altura = getHeight();
	//alert(document.getElementById('light').style.width);
	document.getElementById('light').style.left = (largura/2)-(504/2)+"px";
	document.getElementById('light').style.top = (altura/2)-(400/2)+"px";
	document.getElementById('fade').style.width = largura+"px";
	document.getElementById('fade').style.height = altura+"px";
}

function getWidth(){  
	return window.innerWidth ? window.innerWidth : /* For non-IE */  
	document.documentElement ? document.documentElement.clientWidth : /* IE 6+ (Standards Compilant Mode) */  
	document.body ? document.body.clientWidth : /* IE 4 Compatible */  
	window.screen.width; /* Others (It is not browser window size, but screen size) */  
}  

function getHeight(){  
	return window.innerHeight ? window.innerHeight : /* For non-IE */  
	document.documentElement ? document.documentElement.clientHeight : /* IE 6+ (Standards Compilant Mode) */  
	document.body ? document.body.clientHeight : /* IE 4 Compatible */  
	window.screen.height; /* Others (It is not browser window size, but screen size) */  
}  		

function abreSubMenu(numero){
	if(numero == 1){
		document.getElementById('submenu2').style.display='none';
		document.getElementById('submenu3').style.display='none';
		document.getElementById('submenu1').style.display='block';
		//Effect.SlideDown('submenu1', {duration:0.5});
	}else if(numero == 2){
		document.getElementById('submenu1').style.display='none';
		document.getElementById('submenu3').style.display='none';
		document.getElementById('submenu2').style.display='block';
		//Effect.SlideDown('submenu2', {duration:0.5});
	}else if(numero == 3){
		document.getElementById('submenu1').style.display='none';
		document.getElementById('submenu2').style.display='none';
		document.getElementById('submenu3').style.display='block';
		//Effect.SlideDown('submenu3', {duration:0.5});
	}else{
		document.getElementById('submenu1').style.display='none';
		document.getElementById('submenu2').style.display='none';
		document.getElementById('submenu3').style.display='none';
	}
}

function checkSenha(msg){
	alert(msg);	
}