function openfotoh(imagem)
{
	window.open("fotosdet.asp?img="+imagem,"openfotoh","width=600,outerwidth=600,height=450",resizable="no");
}

function openfotov(imagem)
{
	window.open("fotosdet.asp?img="+imagem,"openfotov","width=450,outerwidth=450,height=600",resizable="no");
}

function abrirPag(valor){
	var url = valor;
	
	xmlRequest.open("GET",url,true);
	xmlRequest.onreadystatechange = mudancaEstado;
	xmlRequest.send(null);
	
	return url;
}

function mudancaEstado(){
	if (xmlRequest.readyState == 4){
		document.getElementById("LeftMNav").innerHTML = xmlRequest.responseText;
	}
}

function GetXMLHttp() {  
	if(navigator.appName == "Microsoft Internet Explorer") {  
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  
	}  
	else {  
		xmlHttp = new XMLHttpRequest();  
	}  
	return xmlHttp;  
}  
var xmlRequest = GetXMLHttp();  

function ImprimirSaudacao()
{
	today = new Date()
	if(today.getMinutes() < 10){
		pad = "0"
	}
	else
		pad = "";
	if((today.getHours() >=0) && (today.getHours() <=12))
	{
		document.write("BOM DIA")
	}
	if((today.getHours() >12) && (today.getHours() <=18))
	{
		document.write("BOA TARDE")
	}
	if((today.getHours() >18) && (today.getHours() <=23))
	{
		document.write("BOA NOITE")
	}	
}

function ImprimirFrase()
{
	// Randomiza a Frase e exibe ...
	var rand = Math.floor((Math.random() * frases.length));
	document.write(frases[rand]);
}
