<!--
function mostrard(id) {
	var d = document.getElementById(id);
	for (var i = 1; i<=20; i++) {
		if (document.getElementById('subMenu'+i)) {
			document.getElementById('subMenu'+i).style.display='none';
		}
	}
	if (d) {
		d.style.display='block';
	}
}

function mostrarmaq(id) {
	var d = document.getElementById(id);
	for (var i = 1; i<=60; i++) {
		if (document.getElementById('datosmaquina'+i)) {
			document.getElementById('datosmaquina'+i).style.display='none';
		}
	}
	if (d) {
		d.style.display='block';
	}
}

function mostrar(id) {
	var d = document.getElementById(id);
	if (d) {
		d.style.display='block';
	}
}
function ocultar(id) {
	var d = document.getElementById(id);
	if (d) {
			d.style.display='none';
		}
	}
function ocultartodo() {
	for (var i = 1; i<=30; i++) {
		if (document.getElementById('capa'+i)) {
			document.getElementById('capa'+i).style.display='none';
		}
	}
}

	   function barra(valor)
	    {
		   window.status=valor;
 	    }
function preCarga() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preCarga.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

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 zoomImagen() { //v3.0
  var i,j=0,x,a=zoomImagen.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null)
   {
	   document.MM_sr[j++]=x; 
	   if(!x.oSrc) x.oSrc=x.src; 
	   x.src=a[i+2];
   }
}

function textoCapa(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
<!--
function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function cerrar() {
	var ventana = window.self;
	ventana.opener = window.self;
	ventana.close();
}
//Zoom Foto
var ventana;
function zoomFoto(imagen) {
	titulo="Asecol - Asociación Europea de Colchonerías";
	ventana=window.open('','ventana','resizable=yes,scrollbars=no');
	ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no"><img src="' + imagen + '" alt="Imagen Ampliadada" onLoad="opener.redimensionar(this.width, this.height)" />');
	ventana.document.close();
}
function redimensionar(ancho,alto) {
	ventana.resizeTo(ancho+12,alto+28);
	ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2);
} 

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
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_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; }
}
function recarga(param)
{
  window.location=param;
}

function CambiaEstilo(obj,tam,atrib){
                document.getElementById(obj).style[atrib] = tam;
}

function ampliar(imagen){
      MM_showHideLayers('popup','','show');
	  document.getElementById('popup').innerHTML='<div id="titulo"> <img src="imagenes/equis.gif"  onclick="javascript:MM_showHideLayers(\'popup\',\'\',\'hide\');" />Imagen Ampliada</div> <div id="bannerFlash"><img src="'+imagen+'" /> </div>';
}
function carga(imagen){
	document.getElementById('fotos').innerHTML='<div align="center"><a href="javascript:ampliar(\'imagenes/instalaciones/'+imagen+'\');"><img src="imagenes/instalaciones/'+imagen+'" alt="Ampliar" name="imgGrande" width="380" height="270" id="imgGrande" border=0 /></a></div>';
}
function carga2(imagen){
	document.getElementById('fotos').innerHTML='<div align="center"><a href="javascript:ampliar(\'imagenes/galeria/grandes/'+imagen+'\');"><img src="imagenes/galeria/grandes/'+imagen+'" alt="Ampliar" name="imgGrande" width="310" height="200" id="imgGrande" border=0/></a></div>';
}
function cambiaestilo()
{
	 
}
function cargavideo(){
      MM_showHideLayers('popup','','show');
	  document.getElementById('popup').innerHTML='<div id="titulo"> <img src="imagenes/equis.gif"  onclick="javascript:MM_showHideLayers(\'popup\',\'\',\'hide\');">Video youtube</div> <div id="bannerFlash"><object width="400" height="320"><param name="movie" value="http://www.youtube.com/v/JZuP-3eu25c&hl=es&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JZuP-3eu25c&hl=es&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="300"></embed></object></div>';
}




function recarga()
{
   document.form1.action="index.php";
   document.form1.submit();
}
function cambiadatos(){
	var nm;
	ind=document.getElementById('modelo').selectedIndex;
	v=document.getElementById('modelo').value;
	nm=document.getElementById('nm').value;
	
	for(i=0;i<nm;i++){
		//alert(i+' : '+v);
		if(i==v) document.getElementById('capa'+i).style.display='block';
		else document.getElementById('capa'+i).style.display='none';
	}
	
}
function selector(n){
	document.getElementById('Tipo'+n).checked='true';
	for(i=1;i<=7;i++){
		
		if(i==n){
			document.getElementById('imtipo'+i).style.borderColor='#C30';
		}
		else{
			document.getElementById('imtipo'+i).style.borderColor='#FFF';
		}
	}
}
function compruebab(){
	for(i=1;i<=7;i++){
		if(document.getElementById('Tipo'+i).checked){
				if(document.getElementById('estado1').checked || document.getElementById('estado2').checked){
					return true;
				}
		}
	}
	alert("Haga su selección correctamente");
	return false;
}

//-->