function intranet(caminho){
	Wwidth  = 300;
	Wheight = 150;

	tamW = screen.width;
	tamH = screen.height;

	posW = (tamW/2) - (Wwidth/2);
	posH = (tamH/2) - (Wheight/2);	

	params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight;
	
	window.open(caminho,'Login',params);
}


function intranet2(){
	if(screen.width == "800"){
    document.location=('intranet_inicial.php');
		//window.open('intranet/index/index_intranet.php','Intranet','top=5; left=0; width=790; height=515,status=0');
		//window.close();
	}
	else{
		Wwidth  = 790;
		Wheight = 515;

		tamW = screen.width;
		tamH = screen.height;

		posW = (tamW/2) - (Wwidth/2);
		posH = (tamH/2) - (Wheight/2);	

		params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",status=0";
	  
    document.location=('intranet_inicial.php');
		//window.open('intranet/index/index_intranet.php','Intranet',params);

		//window.close();
	}
}

function intranet3(caminho, abre){
	Wwidth  = 300;
	Wheight = 150;

	tamW = screen.width;
	tamH = screen.height;

	posW = (tamW/2) - (Wwidth/2);
	posH = (tamH/2) - (Wheight/2);	

	params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight;

	if(abre)
		window.open(caminho,'Login',params);
  
	window.close();
}

function noX() {
	window.open('../chat/logoff.php', '', 'width=50, height=50, top=20736, left=20736');

}


function intranet4(){
	Wwidth  = 790;
	Wheight = 515;

	if(screen.width == "800"){
		window.open('index_manutencao.php','Manutencao','top=5; left=0; width=790; height=515,status=0, scrollbars=0');
		window.close();
	}
	else{
		tamW = screen.width;
		tamH = screen.height;

		posW = (tamW/2) - (Wwidth/2);
		posH = (tamH/2) - (Wheight/2);	

		params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",status=0, scrollbars=0";
	
		window.open('index_manutencao.php','Manutencao',params);

		window.close();
	}
}

function informacoes(caminho, janela, Wwidth, Wheight, barra){
//	Wwidth  = 300;
//	Wheight = 150;

	tamW = screen.width;
	tamH = screen.height;

	posW = (tamW/2) - (Wwidth/2);
	posH = (tamH/2) - (Wheight/2);	

	params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",scrollbars="+barra;

	window.open(caminho,janela,params);

	window.close();
}

function janela_trafego(){
	if(screen.width == "800"){
		window.open('sistema_trafego/index/index_sistema.php','Sistema','top=5; left=0; width=790; height=515,status=0');
	}
	else{
		Wwidth  = 790;
		Wheight = 515;

		tamW = screen.width;
		tamH = screen.height;

		posW = (tamW/2) - (Wwidth/2);
		posH = (tamH/2) - (Wheight/2);	

		params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",status=0";
	
		window.open('sistema_trafego/index/index_sistema.php','Sistema',params);

	}
}

function janela_autotrac(){
	if(screen.width == "800"){
		window.open('../../autotrac/index/moldura_consulta.php','Sistema_autotrac','top=5; left=0; width=790; height=530,status=0, scrollbars=yes');
	}
	else{
		Wwidth  = 790;
		Wheight = 530;

		tamW = screen.width;
		tamH = screen.height;

		posW = (tamW/2) - (Wwidth/2);
		posH = (tamH/2) - (Wheight/2);

		params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",status=0,scrollbars=yes";

		window.open('../../autotrac/index/moldura_consulta.php','Sistema_autotrac',params);
	}
}

function janela_manut(){
	if(screen.width == "800"){
		window.open('intranet_manutencao_xls.php','Sistema_manut','top=5; left=0; width=790; height=530,status=0, scrollbars=yes');
	}
	else{
		Wwidth  = 790;
		Wheight = 530;

		tamW = screen.width;
		tamH = screen.height;

		posW = (tamW/2) - (Wwidth/2);
		posH = (tamH/2) - (Wheight/2);

		params = ",left="+posW+",top="+posH+",width="+Wwidth+",height="+Wheight+",status=0,scrollbars=yes";

		window.open('../../autotrac/index/manutencao_xls.php','Sistema_manut',params);
	}
}