/*  Desarrollado para: Buzos Argentinos  -  RI5/AOFV  -  Febrero de 2001  */

self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
self.focus();

function click(){
    if(event.button==2){
    alert("Tecla inválida");
    return false;
    }
  }
document.onmousedown=click

var today        = new Date;
var yearlicence  = today.getYear();
var statusTxt="       "
  + "Buzos Argentinos ©2000/"+yearlicence+" - Tu página de buceo!!!    "
  + "Un sitio de, y para, los aficcionados al buceo deportivo    ";

function statusScroll(){
  window.status = statusTxt;
  statusTxt = statusTxt.substring(1, statusTxt.length) + statusTxt.charAt(0);
  window.setTimeout("statusScroll()",150);
  };
statusScroll();    // desactivar para servidor local IIS.

function f(){
  self.focus();
  };
setInterval("f()",300000);   // desactivar para servidor local IIS.


function ValidarEmail(IsItReal) {
  var ret = false;
  if (typeof(IsItReal) != "undefined") {
    IsItReal2 = IsItReal.match(/(\w+)@(.+)\.(\w+)$/);
    if (IsItReal2 != null) {
      if ((IsItReal2[3].length==2) || (IsItReal2[3].length==3))  {
				ret = true;
			  }
      }
    }
  if (IsItReal.indexOf('@') != IsItReal.lastIndexOf('@'))  {
    ret = false;
    }
  return ret;
  };

//----- Funciones para la fecha -----//
function dia_semana (d1,d2,d3,d4,d5,d6,d7) {
   this[0]=d1;
   this[1]=d2;
   this[2]=d3;
   this[3]=d4;
   this[4]=d5;
   this[5]=d6;
   this[6]=d7;
}

function mes_ano (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12) {
   this[0]=d1;
   this[1]=d2;
   this[2]=d3;
   this[3]=d4;
   this[4]=d5;
   this[5]=d6;
   this[6]=d7;
   this[7]=d8;
   this[8]=d9;
   this[9]=d10;
   this[10]=d11;
   this[11]=d12;
}

function fechaHoy() {
  semana= new dia_semana ("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado");
  mes=new mes_ano ("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");
  var today     = new Date;
      diahoy    = today.getDay();
      fechahoy  = today.getDate();
      meshoy    = today.getMonth();
      horahoy   = today.getHours();
      minutohoy = today.getMinutes();
      ano       = today.getYear();
  if (minutohoy<10) {minutohoy="0"+minutohoy};
  var xFecha = semana[diahoy]+' '+ fechahoy + ' de '+mes[meshoy]+' de '+ ano +'  ' + horahoy+':'+minutohoy;
  return xFecha;
  }
//------------------------------//
  
var popupURL = "source.html";
var popup    = null;

function openWin (popupURL,tipo,ww,hh,nombre) {
  var xW = screen.availWidth * 0.80
  var xH = screen.availHeight * 0.90
  var adname = "Ad";

  if (typeof(ww) != "undefined") {
    xW = ww
    }
  if (typeof(hh) != "undefined") {
    xH = hh
    }
  if (typeof(nombre) != "undefined") {
    adname = nombre
    }
  if (tipo=="E"){
    // popup = window.open(popupURL,adname,'width='+xW.toString()+', height='+xH.toString());
    popup = window.open(popupURL,adname,'toolbar=0,location=0,directories=0, status=no,menubar=no,copyhistory=0,scrollbars=yes,resizable=yes,fullscreen=no,width='+xW.toString()+', height='+xH.toString());
    }
  else {
    popup = window.open(popupURL,adname,'toolbar=0,location=0,directories=0, status=0, menubar=no,copyhistory=0,scrollbars=no,resizable=no,fullscreen=no,width='+xW.toString()+', height='+xH.toString());
    }
  if(popup != null) {
    popup.moveTo(0,0);
    popup.resizeTo(xW,xH);
    popup.location = popupURL;
    popup.onunload = "var popup = null; return (true);"
    if( navigator.appName.substring(0,8) == "Netscape" ) {
      popup.location = popupURL;
      popup.opener = self;
      }
    }
  }
