window.onload=maximizar;
function maximizar(){
      //window.moveTo(0,0); 
      //window.resizeTo(screen.availWidth,screen.availHeight);
}
function favoritos()
	{
		var miurl="http://www.pescaresponsable.es";
		var titulo="Confederación Española de Pesca Marítima de Recreo Responsable";
	
		if(document.all) window.external.AddFavorite(miurl,titulo);
	}
function fecha(){
	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 dayarray=new Array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado");
	var montharray=new Array("01","02","03","04","05","06","07","08","09","10","11","12");
	document.write("<small><font color='003366' face='Verdana'>"+ dayarray[day] + "  " + daym + "/" + montharray[month] + "/" + year + " </font></small>");
}

function hora(){
var fecha = new Date();
var hora = fecha.getHours();
var minuto = fecha.getMinutes();
var segundo = fecha.getSeconds();
if (hora < 10) {hora = "0" + hora;}
if (minuto < 10) {minuto = "0" + minuto;}
if (segundo < 10) {segundo = "0" + segundo;}
var horita = hora + ":" + minuto + ":" + segundo;
document.getElementById('hora').firstChild.nodeValue = horita;
tiempo = setTimeout('hora()',1000);
}
function inicio(){
document.write('<span id="hora">');
document.write ('000000</span>');
hora();
} 

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_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_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];}
}

// Scripts de control de iframes

var timer_id;
function scroll_iframe(frm,inc,dir) {
  if (timer_id) clearTimeout(timer_id);
  if (window.frames[frm]) {
    if (dir == "v") window.frames[frm].scrollBy(0, inc);
    else window.frames[frm].scrollBy(inc, 0);
    timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 10);
  }

}

function stopScroll()  { if (timer_id) clearTimeout(timer_id); }

function top_iframe(frm){
	window.frames[frm].scroll(0, 0);
}

// Script para ocultar capas

function ocultacapas(){
document.getElementById('Layer1').style.visibility='hidden';
document.getElementById('Layer1x').style.visibility='hidden';
document.getElementById('Layer2').style.visibility='hidden';
document.getElementById('Layer2x').style.visibility='hidden';
document.getElementById('Layer3').style.visibility='hidden';
document.getElementById('Layer3x').style.visibility='hidden';
document.getElementById('Layer4').style.visibility='hidden';
document.getElementById('Layer4x').style.visibility='hidden';
document.getElementById('Layer5').style.visibility='hidden';
document.getElementById('Layer5x').style.visibility='hidden';
document.getElementById('Layer6').style.visibility='hidden';
document.getElementById('Layer6x').style.visibility='hidden';
document.getElementById('eset').style.visibility='hidden';
document.getElementById('esetx').style.visibility='hidden';
document.getElementById('rimax').style.visibility='hidden';
document.getElementById('rimaxx').style.visibility='hidden';
document.getElementById('sage').style.visibility='hidden';
document.getElementById('sagex').style.visibility='hidden';
document.getElementById('staff').style.visibility='hidden';
document.getElementById('staffx').style.visibility='hidden';
}
function ocultabotones(){
top.document.getElementById('ini').style.visibility='hidden';
top.document.getElementById('ser').style.visibility='hidden';
top.document.getElementById('con').style.visibility='hidden';
top.document.getElementById('por').style.visibility='hidden';
top.document.getElementById('ref').style.visibility='hidden';
top.document.getElementById('enl').style.visibility='hidden';
}
function encriptar(){
	 pwd=document.form1.pass.value;
	 pwd=hex_md5(pwd);
		document.form1.pass.value=pwd;
		document.form1.submit();
}
function iSubmitEnter(oEvento, oFormulario){ 
     var iAscii; 

     if (oEvento.keyCode) 
         iAscii = oEvento.keyCode; 
     else if (oEvento.which) 
         iAscii = oEvento.which; 
     else 
         return false; 

     if (iAscii == 13) encriptar(); 

     return true; 
} 
function cargar(t)
 {
	top.document.getElementById('oculta').style.visibility='visible';
   	top.imgcen.src="images/" + t + ".gif";
 }
function openCalendar(params, form, field, type) {
    window.open("../html_docs/calendar.php?" + params, "calendar", "width=400,height=200,status=yes");
    dateField = eval("document." + form + "." + field);
    dateType = type;
}
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
	else 
		countfield.value = maxlimit - field.value.length;
}
function tratarFecha(dia,mes,ano){
	//cadena=ano;
	cadena=ano+"-"+mes+"-"+dia;
  	document.form.fec.value=cadena;
	document.getElementById('calen').style.visibility='hidden';
}
<!-- Begin 
document.oncontextmenu = function(){return false} 
// End --> 

//-->


<!-- Begin
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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; }
}
// End-->

