var sWidth = 0;var sHeight = 0;var xu =1;var yu = 1;var izone=1;var datos="";var screenW = screen.width;var screenH = screen.height;var screenD = screen.colorDepth;var validarformu = 0;function Flashear(flashid){var flash=[];flash[flash.length]="<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" WIDTH=\"228\" HEIGHT=\"186\">";flash[flash.length]="<param name=\"Movie\" value=\"flash/inicial2.swf\">";flash[flash.length]="<param name=\"Src\" value=\"flash/inicial2.swf\">";flash[flash.length]="<param name=\"Quality\" value=\"High\">";flash[flash.length]="<param name=\"EmbedMovie\" value=\"0\">";flash[flash.length]="<param name=\"SeamlessTabbing\" value=\"1\">";flash[flash.length]="<param name=\"wmode\" value=\"transparent\">";flash[flash.length]="<embed SRC=\"flash/inicial2.swf\" QUALITY=\"High\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" TYPE=\"application/x-shockwave-flash\" WIDTH=\"228\" HEIGHT=\"186\" wmode=\"transparent\">";flash[flash.length]="</OBJECT>";document.getElementById(flashid).innerHTML=flash.join("");}function getHTTPObject(){ var xmlhttp = null; try
 {  xmlhttp = new ActiveXObject("MSXML2.XMLHTTP"); }  catch (e)
 {  try
  {   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");  }  catch (e)
  {   xmlhttp = null;  } } if ((xmlhttp == null) && (typeof XMLHttpRequest != 'undefined'))
 {  try
  {   xmlhttp = new XMLHttpRequest();  }  catch (e)
  {   xmlhttp = null;  } } return xmlhttp;}var enProceso = false; 
var http = getHTTPObject(); 
function CargarPagina(pagina,izona) {if (!enProceso && http) {izone=izona;   var url = pagina; 
   http.open("POST", url, true);   http.onreadystatechange = handleHttpResponse;   enProceso = true;   http.send(null);}}function Enviar(pagina,izona) {if (!enProceso && http) {   izone=izona;   var url = pagina + "?datos=" + escape(datos);   http.open("POST", url,false);   http.onreadystatechange = handleHttpResponse;   enProceso = true;   http.send(null);}}if (document.cookie != "") {var cookies = document.cookie.split("; ");var s = new String(cookies[0].split("=")[1]);if (s == "auto" || s == "") { 
expireDate = new Date;expireDate.setDate(expireDate.getDate()-1); 
sHeight = screen.height;sWidth = screen.width;}else{var findX = s.indexOf("x");sWidth = s.substring(0, findX);sHeight = s.substring(findX+1, s.length);}}else{sHeight = screen.height;sWidth = screen.width;}isMoz = (!document.all && document.getElementById) ? true : false;function makeLayer(id, top, left, width, height, position, visibility, backgroundColor, zIndex) {position = (position == '') ? 'absolute' : position;visibility = (visibility == '') ? 'visible' : visibility;backgroundColor = (backgroundColor == '') ? null : backgroundColor;zIndex = (zIndex == '') ? '10' : zIndex;
if (left == 'centX'){var frameHalfWidth = parseInt(390 * xu);var centerLayerWidth = parseInt(width * xu);var centX = parseInt(frameHalfWidth-(centerLayerWidth/2));left = centX;}this.layer = document.getElementById(id);this.layer.style.position = position;this.layer.style.top = parseInt(top * yu);this.layer.style.left = parseInt(left * xu);this.layer.style.width = parseInt(width * xu);this.layer.style.height = parseInt(height * yu);this.layer.style.visibility = visibility;if (backgroundColor != null)
this.layer.style.backgroundColor = backgroundColor;this.layer.style.zIndex = zIndex;this.layer.setOpac = setOpac;return this.layer;function setOpac(newOpac) {
if (isMoz == true) {this.style.MozOpacity = newOpac/100;}else{this.filters.alpha.opacity = newOpac;}}}function handleHttpResponse() {if (http.readyState == 4) {   if (http.status == 200) { results =  http.responseText.split("none"); document.getElementById("texto").innerHTML = results[0]; enProceso = false; if (izone==1){ empieza(); }   }}}
function HttpBorrar() { document.getElementById("texto").innerHTML = "";}  if(document.images){var directorio="fotos/";img1on  = new Image(); img1on.src  = directorio + 'btempresaON.jpg';img1off  = new Image(); img1off.src  = directorio + 'btempresaOFF.jpg';
img2on  = new Image(); img2on.src  = directorio + 'btcontactarON.jpg';img2off  = new Image(); img2off.src  = directorio + 'btcontactarOFF.jpg';  
img3on  = new Image(); img3on.src  =  directorio + 'btpedidosON.jpg';img3off  = new Image(); img3off.src  = directorio + 'btpedidosOFF.jpg'; 
}function ImgChangeSrc(ImgName, ImgSrc) {  if(document.images) {document[ImgName].src = eval(ImgSrc).src;  }}function empieza() {newsLay = new makeLayer('zona','0','0','390','300','relative','visible','','1');} 
function empiezasecciones() {newsLay = new makeLayer('secciones','0','0','350','100','relative','visible','','1');} 
function empiezafamilias() {newsLay = new makeLayer('familias','0','0','350','100','relative','visible','','1');} 
function creardatos(f){if (Validar(f)==true){datos=(f.nombre.value) + "[@item@]" + (f.mail.value) + "[@item@]" + (f.telefono.value) + "[@item@]" + (f.asunto.value) + "[@item@]" + (f.cuerpo.value);Enviar("envio.asp",0,datos);}}function Validar(f){validarformu = 0;f.nombre.style.backgroundColor = "#ffffff";f.mail.style.backgroundColor = "#ffffff";f.telefono.style.backgroundColor = "#ffffff";f.asunto.style.backgroundColor = "#ffffff";f.cuerpo.style.backgroundColor = "#ffffff";if (f.nombre.value==""){f.nombre.style.backgroundColor="#ff0000"; validarformu = 1;}if (f.mail.value==""){f.mail.style.backgroundColor="#ff0000";validarformu = 1;}if (f.telefono.value==""){f.telefono.style.backgroundColor="#ff0000";validarformu = 1;}if (f.asunto.value==""){f.asunto.style.backgroundColor="#ff0000";validarformu = 1;}if (f.cuerpo.value==""){f.cuerpo.style.backgroundColor="#ff0000";validarformu = 1;}if (validarformu==0){return true;} else{return false;}}function CheckDatosUsPas(theForm){  if (theForm.usuario.value.length < 3)
  {theForm.usuario.focus();document.getElementById("loginavisoerror").innerHTML="Escriba correctamente su nombre de Usuario."
return (false);  }  if (theForm.pass.value.length < 3)
  {   theForm.pass.focus();   document.getElementById("loginavisoerror").innerHTML="Escriba correctamente su Contrase&ntilde;a."
   return (false);  }  return (true);}