﻿//Função que chama os links dos flashs-------------------------------------->
function openWindow(opcao) {
    //Cabecalho do Site - Brasao Home
    if (opcao == 1)
        showPage('home.php');
    //Cabecalho do Site - Link Servidor
    else if (opcao == 2)
        window.open('http://servidor.pmcgs.pr.gov.br', '_blank');
    //Cabecalho do Site - Link Turista
    else if (opcao == 3)
        //showPage('turista/index.php');
		window.open('http://turismo.pmcgs.pr.gov.br', '_blank');
    //Cabecalho do Site - Link Empreendedor
    else if (opcao == 4)
    window.open('http://desenvolvimento.pmcgs.pr.gov.br', '_blank');
	//showPage('empreendedor/index.php');	
    //Cabecalho do Site - Link Cidadao
    else if (opcao == 5)
        showPage('cidadao/index.php');
		
		
		
		
		

    //Banner NOVIDADES - banner 01
    else if (opcao == 6)
        showPage('secao.php?secao=30');
    //Banner NOVIDADES - banner 02
    else if (opcao == 7)
        //showPage('secao.php?secao=40');
		window.open('http://servidor.pmcgs.pr.gov.br/home/index.php?option=com_phocadownload&view=category&id=1:concurso&Itemid=83', '_blank');
    //Banner NOVIDADES - banner 03
    else if (opcao == 8)
	window.open('http://servidor.pmcgs.pr.gov.br/home/index.php?option=com_phocadownload&view=category&id=2:processo-seletivo&Itemid=83', '_blank');
        //showPage('secao.php?secao=35');
		
		
		
		
		
        
    //Banner SLIDE SHOW - banner 01
    else if (opcao == 10)
	//window.open('http://www.pmcgs.pr.gov.br/portal/arquivos/juridico/DOCUMENTOS.pdf', '_blank');
	//showPage('noticiaLer.php?idNoticia=964');
	showPage('secao.php?secao=30');
	//showPage('home.php');
	
    //Banner SLIDE SHOW - banner 02
    else if (opcao == 11)	
	showPage('home.php');
	//showPage('noticiaLer.php?idNoticia=962');// esse é do obras
	//window.open('http://blip.tv/play/hrcOguWEawA.html?p=1','mywin',500,300,'yes','center');
	//window.open('http://educacao.pmcgs.pr.gov.br/', '_blank');
		
    //Banner SLIDE SHOW - banner 03
    else if (opcao == 12)
	showPage('noticiaLer.php?idNoticia=971');
	//window.open('http://radiocampina.pmcgs.pr.gov.br/', '_blank');
     //window.open('http://blip.tv/play/hrcOguaSCgA.html?p=1','mywin',500,300,'yes','center');
     // showPage('secao.php?secao=33');
	  // showPage('home.php');
	   
    //Banner SLIDE SHOW - banner 04
    else if (opcao == 13)
	showPage('home.php');
       // window.open('http://desenvolvimento.pmcgs.pr.gov.br/', '_blank');
		//showPage('noticiaLer.php?idNoticia=963');
		//window.open('http://blip.tv/play/hrcOguf3XAA.html?p=1','mywin',500,300,'yes','center');
		//showPage('secao.php?secao=150');

    else if (opcao == 14)
		       showPage('noticiaLer.php?idNoticia=903');


    //Option Serviço - Serviços On-Line
    else if (opcao == 50)
        showPage('home.php');
    //Option Serviço - Noticias
    else if (opcao == 51)
        showPage('noticiaTodas.php');
    //Option Serviço - Leis do Municipio
    else if (opcao == 52)
        window.open('http://www.leismunicipais.com.br/prefeitura/pr/campinagrandedosul', '_blank');
    //Option Serviço - SIGISS
    else if (opcao == 53)
        window.open('http://campinagrandedosul.sigiss.com.br', '_blank');
    //Option Serviço -   Vagas de Emprego
    else if (opcao == 54)
        window.open('http://www.setp.pr.gov.br/sine/index.php?id=32', '_blank');
    //Option Serviço - TV Campina
    else if (opcao == 55)
        showPage('tvcampina/index.php');
    //Option Serviço -   RVA
    else if (opcao == 56)
        showPage('secao.php?secao=36');
	//Option Serviço - cartao funcional
    else if (opcao == 57)
        showPage('secao.php?secao=180');
    else if (opcao == 58)
        window.open('http://extranet.pmcgs.pr.gov.br:9095/transparencia/', '_blank');
    else if (opcao == 59)
        window.open('http://extranet.pmcgs.pr.gov.br/servidor', '_blank');
    //Valida NFE
    else if (opcao == 60)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/consulta/main.php','mywin',"760","540",'yes','center');
    //ISS CONTRIBUINTES
    else if (opcao == 61)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/contribuinte/login.php','mywin',"760","540",'yes','center');
    //ISS CONTADORES
    else if (opcao == 62)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/contador/login.php','mywin',"760","540",'yes','center');
    //ISS EVENTUAL
    else if (opcao == 63)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/contribuinte/login_eventual.php','mywin',"760","540",'yes','center');
    //ISS GRAFICAS
    else if (opcao == 64)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/grafica/login.php','mywin',"760","540",'yes','center');
    //ISS ORGAOS PUBLICOS
    else if (opcao == 65)
        WindowPopup('https://campinagrandedosul.sigiss.com.br/contribuinte/login_orgao.php','mywin',"760","540",'yes','center');
    else if (opcao == 66)
        WindowPopup('http://tributacao.pmcgs.pr.gov.br/certidao/webform/formTributo.aspx', 'myname', '750', '500', 'no', 'center');
    else if (opcao == 67)
        window.open('http://www.tce.pr.gov.br/TCEPR/Municipal/AML/ConsultarProcessoCompraWeb.aspx', '_blank');
}

function searchWindow(opcao) {
    showPage('pesquisa.php?campo_pesquisa=' + opcao);
}

function NewWdw(mypage, myname, w, h, scroll, pos) {
    var wdw = null;
    if (pos == "random") {
        LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
        TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
    }
    if (pos == "center") {
        LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
        TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
    }
    else if ((pos != "center" && pos != "random") || pos == null) {
        LeftPosition = 0;
        TopPosition = 20
    }
    settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    wdw = window.open(mypage, myname, settings);
}

//Função que abre uma nova janela popup------------------------------------->
function WindowPopup(mypage, myname, w, h, scroll, pos) {
         var win = null;
    if (pos == "random") {
        LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
        TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
    }
    if (pos == "center") {
        LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
        TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
    }
    else if ((pos != "center" && pos != "random") || pos == null) {
        LeftPosition = 0;
        TopPosition = 20
    }
    settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    win = window.open(mypage, myname, settings);
}

