var loaded = new Array();
function F_loadRollover(image,imagen) {
extension=imagen.lastIndexOf(".");
var imagensource =imagen.substring(0,extension);
var imagenextension=imagen.substring(extension+1);
imageName=imagensource+ "_on."+imagenextension;

   if (image && image.src &&(null == image.out || typeof(image.out) == typeof(void(0)))) {
      s = image.src;
      image.out = new Image();
      image.out.src = s;
      image.over = new Image();
      if (imageName.lastIndexOf('/') >= 0 || imageName.lastIndexOf('\\') >=0) {
         s = imageName;
      } else {
         i = s.lastIndexOf('/');
         if (i<0) i = s.lastIndexOf('\\');
         if (i<0) { s = imageName; }
         else     { s = s.substring(0,i+1) + imageName; }
      }
      image.over.src = s;
      loaded[image.name] = image;
   }
}
function F_roll(imageName,over) {
   if (document.images) {
      if (over) { imageObject = "over"; }
      else      { imageObject = "out"; }
   image = loaded[imageName];
   if (image) {
       ref = eval("image."+imageObject);
       if (ref) image.src = eval("image."+imageObject+".src");
   }
   if (window.event)
      window.event.cancelBubble = true;
   }
}
function MM_findObj(n, d) { 
  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_changeProp(objName,x,theProp,theValue) { 
  var obj = MM_findObj(objName);
   if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
function showField(value,trigger,div){
if (value==trigger){MM_changeProp(div,'','style.visibility','visible','DIV');}
else{MM_changeProp(div,'','style.visibility','hidden','DIV');}
}
function showOtros(){
 if (document.consultoria_form.estudio[document.consultoria_form.estudio.selectedIndex].value=="show"){
  MM_changeProp('otros','','style.visibility','visible','DIV');
 }else MM_changeProp('otros','','style.visibility','hidden','DIV');
}
function KW_updateItems(d,o,fn) {
//alert(d);
  var i,s,l=MM_findObj(d+"_menu"),b,z=o.options[o.selectedIndex].value;
  l.length=0;l.options[0]=new Option('  ','  ');
  if(z!='nill'){
    showField("true","true",d);
    b=eval(z+'_items');
  }else{
    b=0;
    showField("true","false",d);
  }
  for(i=0;i<b.length;i++){s=b[i].split("|");l.options[i]=new Option(s[1],s[0]);}
  l.selectedIndex=0;if (!fn) return;eval(fn)
}
function MM_goToURL() { 
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
var checkShowDatos=0;
function showDatos(){
 if(checkShowDatos==0){MM_changeProp('datos','','style.visibility','visible','DIV');checkShowDatos=1;
 }else{MM_changeProp('datos','','style.visibility','hidden','DIV');checkShowDatos=0;}
}
function IsMail(YourMail){
 var Template = /^[a-z][a-z-_0-9.]+@[a-z-_=>0-9.]+.[a-z]{2,3}$/i 
 return (Template.test(YourMail)) ? 1 : 0 
}