﻿// JavaScript Document
var queSite = "/daisynew";
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// rotinas para testar o browser /
function objbrowser(n)
{
if(document.getElementById)
	return document.getElementById(n);
return document.all[n];
}

// diz se estamos no NS6 /
function browserns6()
{
	if(navigator.appName == "Netscape")
		return true;
	return false;
}
// ROTINAS DO MENU
function abrecad(){
	
	cadw = "pag/envia_email/blanco.cfm";
	acao = "window.open(cadw,'cadastro','width=600,height=450')";
	window.open(cadw,'cadastro','width=600,height=450');
	//document.all.cadform.submit();	
	document.getElementById("cadform").submit();	
}
function nada(){
}


function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null ;
}

 function CriaCookie(nome){
			valorcook = readCookie(nome);
			document.cookie = nome + valorcook +";";
			} 


function AutoWindow(theURL,winName,width,height,features) { 

	if(window.screen){
		per_ancho=(width/800)*100;
		per_alto=(height/width)*100;
		win_ancho=(screen.width*per_ancho)/100;
		win_alto=(win_ancho*per_alto)/100;
		x=(screen.width-win_ancho)/2;
		y=(screen.height-win_alto)/2;
	}else{
		x=0;
		y=0;
		win_ancho=w;
		win_alto=y;
	}
	winfeatures=("top="+y+",left="+x+",width="+win_ancho+",height="+win_alto+","+features);
	window.open(theURL,winName,winfeatures);
}
 
