/* 
   ::::::::::::::::::::::::::::::::::::::::::
   :::       --- FULLA DE CODI ---        ::: 
   :::    MAIL webmaster@hispactivo.com   :::
   :::    WEB http://www.ispactivo.com    ::: 
   ::::::::::::::::::::::::::::::::::::::::::
*/

/* ------------------------------------------------------- FUNCIÓ DE POP UPS ----------------------------------------------------- */ 
function intro(){
doPopUpWindow = window.open("intro.htm","ISPACTIVO","resizable=no, scrollbars=no,width=790,height=520,top=50,left=50");
}
function chat(){
doPopUpWindow = window.open("chat.htm","ISPACTIVO","resizable=no, scrollbars=no,width=500,height=170,top=50,left=50");
}
function tarifas(){
doPopUpWindow = window.open("http://www.ispactivo.com/tarifas.htm","ISPACTIVO","resizable=no, scrollbars=yes,width=800,height=600,top=10,left=10");
}
function ayuda1(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayuda1.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=190,top=50,left=50");
}
function ayuda2(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayuda2.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayuda3(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayuda3.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayuda4(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayuda4.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayuda5(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayuda5.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudaadw(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudaadw.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudadns(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudadns.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudaftp(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudaftp.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudasmtp(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudasmtp.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudaweb(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudaweb.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function ayudaweb2(){
doPopUpWindow = window.open("http://www.ispactivo.com/ayudaweb2.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function traficoilimitado(){
doPopUpWindow = window.open("http://www.ispactivo.com/traficoilimitado.htm","ISPACTIVO","resizable=no, scrollbars=no,width=200,height=180,top=50,left=50");
}
function whois(){
doPopUpWindow = window.open("https://secure.nominalia.com/utils/PublicWhois.v4.php?qs=87&bgcq=FFFFFF&urlimg=http://www.ispactivo.com/img/buscar.gif&txttit=RESPUESTA&ctit=faaaaa&bgcr=449900&rs=600&cw=1&bgcr=FFFFFF&txttit=: : : RESULTADO DE LA BÚSQUEDA : : :&bgctit=FFFFFF&ctit=3F65B3&prev=none","ISPACTIVO","resizable=yes,scrollbars=auto,width=600,height=165");
}
function finestres(){
   doPopUpWindow = window.open("condiciones.htm","ISPACTIVO","resizable=no, scrollbars=yes,width=525,height=500,top=50,left=230");
   window.location.href="https://www.ispactivo.com/contrato.htm";
}
/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* --------------------------------------------------- FUNCIÓ QUE TANCA FINESTRES ------------------------------------------------ */ 
function closer() {
var ventana = window.self;
ventana.opener = window.self;
ventana.close();
} 
/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* ------------------------------------------------------- FUNCIÓ DEL WEBMAIL ---------------------------------------------------- */ 
function FormCheck() {
 if (document.forms[0].elements[2].value == ''){
     alert('::: Datos incorrectos o Campos vacíos :::');
	 document.forms[0].elements[2].select();
	 document.forms[0].elements[2].focus();
	 return false;
 }
}
/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* --------------------------------------------------- FUNCIÓ DE LA DATA I L'HORA ------------------------------------------------ */ 

var dayarray=new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
var cdate="<small><font color='3F65B3' weight='bold' face='Verdana'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" de "+year+" ||  "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* ------------------------------------------------------ FUNCIONS VÀRIES -------------------------------------------------------- */ 

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* ---------------------------------------------- FUNCIÓNS DEL FORMULARI D¡INSCRIPCIÓ -------------------------------------------- */
function contratar (){
var formisp = document.form1;
 if (formisp.EmailContacto.value == ""){
     alert("El E-mail es obligatorio");
	 formisp.EmailContacto.focus();
	 return false;
 }
}
function imprime() {
var url = location;
	alert ("Imprima este documento por favor");
	window.print();
	//location.href="mailto:info@enricsanchis.com?subject=Contrato&body=" +"1"+ url;
	
	//location.href="mailto=facturacion@ispactivo.com?subject=Contrato";
	//location.href="mailto:" + "formisp.EmailContacto.value" + "?subject=Contrato";
}

/* ------------------------------------------------------------------------------------------------------------------------------- */ 

/* ---------------------------------------------- FUNCIÓNS DEL FORMULARI DE CONSULTES -------------------------------------------- */

function envia () {
  if (document.consultamos.nombre.value==""){
      alert(document.miss_array[0]);
      document.consultamos.nombre.focus();
      return false;
  }
  if (document.consultamos.apellidos.value==""){
      alert(document.miss_array[1]);
      document.consultamos.apellidos.focus();
      return false;
  }
  if (document.consultamos.cargo.value==""){
      alert(document.miss_array[2]);
      document.consultamos.cargo.focus();
      return false;
  }
  if (document.consultamos.telefono.value==""){
      alert(document.miss_array[3]);
      document.consultamos.telefono.focus();
      return false;
  }
  if (document.consultamos.consultas.value==""){
      alert(document.miss_array[4]);
      document.consultamos.consultas.focus();
      return false;
  }
}
/* ------------------------------------------------------------------------------------------------------------------------------- */ 
