// JavaScript Document
// <a onClick="window.open('images/f1000_turbo.htm','f1000_turbo', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no, resizable=no,copyhistory=no,width=600,height=450'); return false;" target="_blank" href="images/f1000_turbo.jpg">

function janela (url){
	window.open(url,'_blank','width=500, height=313');
}

function Assina(){
	window.open("http://website.internetprovider.com.br/assine/assina.php",null,"height=505,width=800,titlebar=no,statusbar=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no,top=100,left=100");
}

function OpenNACinside(){
	window.open("http://website.internetprovider.com.br/popup/nac_inside.html",null,"height=432,width=600,titlebar=no,status=no,toolbar=no,menubar=no,location=no");
}

function OpenNetwokmap(){
	window.open("http://website.internetprovider.com.br/popup/mapa.html",null,"height=453,width=747,titlebar=no,status=no,toolbar=no,menubar=no,location=no");
}

function OpenPolitic(){
	window.open("http://website.internetprovider.com.br/popup/politica.php",null,"height=450,width=575,titlebar=no,status=no,scrollbars=yes,toolbar=no,menubar=no,location=no");
}

function OpenTabComp(){
	window.open("http://website.internetprovider.com.br/popup/tab_comp.php",null,"height=700,width=1020,titlebar=no,status=no,scrollbars=yes,toolbar=no,menubar=no,location=no,resizable=yes");
}

function OpenNetwokmap2(){
	var h = 453;
	var w = 747;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/popup/mapa.html","ative_ja","top="+top+",left="+left+",height="+h+",width="+w+",titlebar=no,status=no,toolbar=no,menubar=no,location=no");
}
	
	function AbreJanela2(){
	var h = 470;
	var w = 400;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://www.internetprovider.com.br/popup/registrobr.php","ative_ja","top="+top+",left="+left+",height="+h+",width="+w+",titlebar=no,status=no,toolbar=no,menubar=no,location=no");
}


// Exibe e oculta as Layers

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// Mostra Alerta de Copyright
function right(e) {
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
		alert("© InternetProvider.com.br\nTodos os direitos reservados.");
		return false;
	}
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
		alert("© InternetProvider.com.br\nTodos os direitos reservados.");
		return false;
	}
	return true;
}

// Valida Formulário de Contato

function verifica() {

    if (document.form_contato.nome.value.length == 0) {
      alert('Por favor, preencha o seu Nome!');
      return false;
    }
    if (document.form_contato.emailpri.value.length == 0) {
      alert('Por favor, preencha o campo de Email Principal!');
      return false;
    }
    if (document.form_contato.assunto.value.length == 0) {
      alert('Por favor, preencha o campo Assunto!');
      return false;
    }
    return true;
  }
  
// Logar no painel de controle

function login(){
    var f = document.forms.cpLoginForm;
    var d = f.domain.value;
    var u = f.user.value;
    var p = f.pass.value;
    var proto;
    var port;

 if(f.protocol == 'https'){
    proto = 'https://';
    port = '2083';
    }
    else {
    proto = 'http://';
    port = '2082';
    }
    if(d == '' || u == '' || p == ''){
    return false;
    }
    if(d.indexOf('http://') != -1 || d.indexOf('https://') != -1){
    d = d.replace(/^http(|s):\/\//i, '');
    }
    d = proto + d;
    f.action = d + ':' + port + '/login/';
    f.submit(); 
 }
 
 
function checkdomain(form){
	form.domain.value=form.domain.value+form.dex
	.options[form.dex.selectedIndex].text
}

function ID0(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=0","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,statusbar=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID1(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=1","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID4(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=4","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID7(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=7","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID10(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=10","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID13(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=13","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID16(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=16","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID19(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=19","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID22(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=22","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID25(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=25","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID28(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=28","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}

function ID31(){
	var h = 505;
	var w = 800;
	var height = window.screen.height - 160;
	var width = window.screen.width;
	var top = (height- h)/2;
	var left = (width - w)/2;
	window.open("http://website.internetprovider.com.br/assine/assina.php?h1=31","assine_ja","top="+top+",left="+left+",height="+h+",width="+w+"titlebar=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,copyhistory=no");
}


<!-- 
//JavaScript Flash detection and deployment 
//(c)2004 Adrian Rowbotham 
//www.ajrdesign.net 


/* -- 1. Player Version detection -- */ 

//set player version here 
var MM_contentVersion = 6; 

//set sub version here 
var release = "6,0,67,0"; 


//check for flash player 
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; 
if ( plugin ) { 
      var words = navigator.plugins["Shockwave Flash"].description.split(" "); 
       for (var i = 0; i < words.length; ++i) 
       { 
      if (isNaN(parseInt(words[i]))) 
      continue; 
      var MM_PluginVersion = words[i]; 
       } 
   var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion; 
} 
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) { 
   document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag 
   document.write('on error resume next \n'); 
   document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); 
   document.write('</SCR' + 'IPT\> \n'); 
} 


/* -- 2. Deployment function -- */ 

function mostraFlash(swf,flashVarString,w,h,bgcolor,menu,mode,q,id){ 
  if ( MM_FlashCanPlay ) { 
     document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' 
     +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+release+'" ' 
     +'width="'+w+'" height="'+h+'" id="'+id+'" align="">' 
     +'<param name="movie" value="'+swf+'">' 
     +'<param name="menu" value="'+menu+'"> ' 
     +'<param name="quality" value="'+q+'"> ' 
     +'<param name="wmode" value="'+mode+'"> ' 
     +'<param name="bgcolor" value="'+bgcolor+'"> ' 
     +'<param name="flashvars" value="'+flashVarString+'"> ' 
     +'<embed src="'+swf+'" flashvars="'+flashVarString+'" menu="'+menu+'" quality="'+q+'" wmode="'+mode+'" ' 
     +' bgcolor="'+bgcolor+'"  width="'+w+'" height="'+h+'" name="'+swf+'" ' 
     +' align=""  type="application/x-shockwave-flash" ' 
     +' pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object> '); 
		 return true;
  } else { 
     return false;
  } 
}


function campoInvalido(campo){
        if (campo.value == ''){
                alert('O campo \''+campo.name+'\' deve ser preenchido!');
                campo.focus();
                return false;
        } else if (campo.value.indexOf("\\") != -1 || campo.value.indexOf("'") != -1 || campo.value.indexOf('"') != -1 || campo.value.indexOf('^') != -1 || campo.value.indexOf('%') != -1 || campo.value.indexOf('$') != -1){
                alert('O campo \''+campo.name+'\' contém caractere(s) inválido(s)!');
                campo.select();
                return false;
        }
        return true;
}

