function emutation_ToObject(id) {
		if(document.layers){
			return (document.layers[id])?eval(document.layers[id]):null;
		}
		else if(document.all && !document.getElementById){
			return (eval("window."+id))?eval("window."+id):null;
		}
		else if(document.getElementById && document.body.style) {
			return (document.getElementById(id))?eval(document.getElementById(id)):null;
		}
	}
	
	
function clearInput(id,texto,tipo){
/*
  Esta función borrar el contenido por defecto de un input tipo texto y lo vuelve a mostrar.
  id: identificador del input
  texto: texto por defecto del input
  tipo: 'mostrar' o 'borrar'
*/
    if(tipo=='mostrar'){
        if(document.getElementById(id).value==''){
            document.getElementById(id).value=texto;
        }
    }
    if(tipo=='borrar'){
        if(document.getElementById(id).value==texto){
            document.getElementById(id).value='';
        }
    }

}


function emutation_FlashWrite(miEMswf, miEMcreativewidth, miEMcreativeheight, miEMwmode, miEMbgcolor, miID){

	var emswf = miEMswf;
	var emcreativewidth = miEMcreativewidth;
	var emcreativeheight = miEMcreativeheight;
	var emwmode = miEMwmode;
	var embgcolor = miEMbgcolor;

	ntcode = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='"+ emcreativewidth +"' height='"+ emcreativeheight +"' id='"+ miID +"'>";
	ntcode +="<param name='movie' value='" + emswf + "'>";
	ntcode +="<param name='quality' value='high'>";
	ntcode +="<param name='bgcolor' value='#" + embgcolor +"'>";
	ntcode +="<param name='wmode' value='"+ emwmode +"'>";
	ntcode +="<param name='menu' value='false'>";
	ntcode +="<embed src='" + emswf + "' quality='high' wmode='" + emwmode + "' width='" + emcreativewidth + "' height='" + emcreativeheight + "' bgcolor='#" + embgcolor +"' type='application/x-shockwave-flash' menu='false' name='"+ miID +"' swLiveConnect='true'></embed></object>";
  	document.write(ntcode);
}

function emutation_FlashInnerHTML(htmlElementId,code){
  var x=emutation_ToObject(htmlElementId);
  if(x){
    if(document.getElementById||document.all){
      x.innerHTML='';
      x.innerHTML=code;
      }
    else if(document.layers){
      x.document.open();
      x.document.write(code);
      x.document.close();
      }
    }
  }
  
  
function validateEmail(email)
{
// a very simple email validation checking. 
// you can add more complex email checking if it helps 
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null )
    {
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) return false;
    }
    if(splitted[2] != null)
    {
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null) 
      {
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) return false;
      }// if
      return true;
    }
return false;
}


var Ventana2;

function openIT(theURL,W,H, wname,S) {
  var prop;
  
  if (S!='no') S="yes"
  
  prop = "width="+W+",height="+H+",scrollbars="+S;
  
  
if (Ventana2) {
    if (Ventana2.closed) {
      Ventana2=open(theURL,wname,prop+",location=no,status=no,directories=no,toolbar=no,resizable=no,menubar=no");
      Ventana2.focus();
    }
    else {
      Ventana2=open(theURL,wname,prop+",location=no,status=no,directories=no,toolbar=no,resizable=no,menubar=no");
      Ventana2.focus();
    }
  }
  else {
      Ventana2=open(theURL,wname,prop+",location=no,status=no,directories=no,toolbar=no,resizable=no,menubar=no");          
      Ventana2.focus();
  }
}


<!--
<!--
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.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.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; }
}
//-->
