<!--  
//----------------------------------------------------------------------------------------
//Crea una ventana para escribir el formulario
//
function crVenForm() 
  {var altoVentana;
   var anchoVentana;
   var altoPantalla;
   var anchoPantalla;
   var altoOferta;
   var anchoOferta;
   var posX;

   var minimoAncho = 500
   if (navigator.appName == 'Microsoft Internet Explorer')
    {altoVentana = document.body.clientHeight;  // no vale para nada
     anchoVentana = document.body.clientWidth;  
     posX = screenLeft;
    }
   else
    {altoVentana = window.outerHeight;  //  Para Mozilla
     anchoVentana = window.outerWidth;  //   " 
     posX = screenX;
    } 

   altoPantalla = screen.availHeight;
   anchoPantalla = screen.availWidth;
   altoOferta = altoPantalla - (altoPantalla*15)/100;
   anchoOferta = anchoPantalla - (anchoPantalla * 50)/100;   
   if (anchoOferta > minimoAncho) anchoOferta = minimoAncho;
   posY = altoPantalla - (altoPantalla*96)/100;

   if(posX > anchoOferta)
    {posX = 2;}
   else       
    {posX = anchoPantalla - anchoOferta - 40;}

   var secondwindow=window.open('http://www.idm-instrumentos.es/Contactos/oferta.htm','C','height=' + altoOferta +
      ',width=' + anchoOferta + ',left=' + posX + ',top=' + posY +',scrollbars=yes,' +
      'resizable=no,dependent=yes,toolbar=no,menubar=no');    
  }
//---------------------------------------------------------------------------------------
function getDatos()
  {var cookFor = unescape(document.cookie); 
   var pos, lon;
   var i = 0;
   var ind = 0;
   var nombre = "instruMedCook=";
// lee el primer cookie de este nombre que encuentre.
 //  while (i < cookFor.length)
 //    {
      pos = cookFor.indexOf(nombre, i);
      if (pos == -1) 
        {i = cookFor.length + 1}
      else
        {i = pos + nombre.length; 
         ind = i;}
 //    }
   if (ind != 0)
     {lon = cookFor.indexOf(";", ind); 
      rellForm(cookFor.substring(ind, lon));} 
   else 
     {
      //alert("NO hay datos")
     };      
  }
//--------------------------------------------------------------------------------------- 
function rellForm(datos)
  {var igual, simb, tam, valor, numer, pos;
   var lon = datos.length;
   var i = 0; 
   while (i < lon-1)
    {igual = datos.indexOf("^",i);
     simb  = datos.indexOf("`",i);
     tam = (simb-1)-(igual);
     valor = datos.substring(igual+1,igual+1+tam);
     numer = datos.substring(i, i+2);
     pos = eval(numer);
     if (valor != "")
      {switch (pos)
       {case 0 : document.FrontPage_Form1.Nombre.value =  valor; break;
        case 1 : document.FrontPage_Form1.Apellidos.value = valor; break;
        case 2 : document.FrontPage_Form1.Telefono.value  = valor; break; 
        case 3 : document.FrontPage_Form1.Fax.value = valor; break;
        case 4 : document.FrontPage_Form1.email.value = valor; break;
        case 5 : document.FrontPage_Form1.Empresa.value = valor; break;
        case 6 : document.FrontPage_Form1.Departamento.value = valor; break;
        case 7 : document.FrontPage_Form1.Direccion.value = valor; break;
        case 8 : document.FrontPage_Form1.CodPos.value = valor; break;
        case 9 : document.FrontPage_Form1.Provincia.value = valor; break;
        case 10 : document.FrontPage_Form1.Pais.value = valor; break;
       }
      }
     i = simb+1; 
    }
  }
//-----------------------------------------------------------------------------------------
function stDatos()
 {var datosCook = 
    "00^" + document.FrontPage_Form1.Nombre.value +
   "`01^" + document.FrontPage_Form1.Apellidos.value +
   "`02^" + document.FrontPage_Form1.Telefono.value + 
   "`03^" + document.FrontPage_Form1.Fax.value +
   "`04^" + document.FrontPage_Form1.email.value +
   "`05^" + document.FrontPage_Form1.Empresa.value +
   "`06^" + document.FrontPage_Form1.Departamento.value +
   "`07^" + document.FrontPage_Form1.Direccion.value +
   "`08^" + document.FrontPage_Form1.CodPos.value +
   "`09^" + document.FrontPage_Form1.Provincia.value +
   "`10^" + document.FrontPage_Form1.Pais.value +
   "`" ; 
  creaCookie(datosCook); 
 }
//-----------------------------------------------------------------------------------------
function creaCookie(datos)
 {if (navigator.cookieEnabled)
   {var expire = new Date();
    // borra cookie
    //expire.setTime(expire.getTime() -2 * 86400001);
    //document.cookie = "instruMedCook=*;expires=" +  expire.toGMTString();

    var dias = 100;
    datos = datos + ";" ;
    expire.setTime(expire.getTime() + (dias * 24 * 3600000));
    document.cookie = "instruMedCook=" + escape(datos) + ";expires=" + expire.toGMTString();
   }
  else{alert("No tiene permitido procesar COOKIES")};
 }
//-----------------------------------------------------------------------------------------
-->