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_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; }
}

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write ('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write ('on error resume next \n');
	document.write ('Sub cabecera_FSCommand(ByVal command, ByVal args)\n');
	document.write ('  call cabecera_DoFSCommand(command, args)\n');
	document.write ('end sub\n');
	document.write ('</SCRIPT\> \n');
}


function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") 
		 	{
		 		imgStyle = "float:left;" + imgStyle;
			}
		 if (img.align == "right") 
		 	{
		 		 imgStyle = "float:right;" + imgStyle;
			}
		 if (img.hspace != null)
		 	{
				imgStyle = "margin-left:"+img.hspace+"px; margin-right:"+img.hspace+"px;"+ imgStyle;
			}
		 if (img.vspace != null) 
		 	{
				imgStyle = "margin-top:"+img.vspace+"px; margin-bottom:"+img.vspace+"px;"+ imgStyle;
		 	}
		 if (img.parentElement.href) 
		 	{
				imgStyle = "cursor:hand;" + imgStyle;
			}
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='sSize');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
window.attachEvent("onload", correctPNG);


function openw(foto,ancho,alto)
	{
	
		var centroy=((screen.availHeight - alto)/2);
		var centrox=((screen.availWidth - ancho)/2);

window.open(foto,"alejandro","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+ancho+",height="+alto+",title=no,titlebar=no,left="+centrox+",top="+centroy)
}

function comprobarContacto(form){

	if(form.Nombre.value==''){
		alert('El campo Nombre no puede estar vacio.');
		form.Nombre.focus();
		return false;
	}	
								
	if(form.EMail.value==''){
		alert('El campo E-mail no puede estar vacio.');
		form.EMail.focus();										
		return false;
	}
	
	if(form.Asunto.value==''){
		alert('El campo Asunto no puede estar vacio.');
		form.Asunto.focus();
		return false;
	}	
		
	return true;

}

