var frame_source
if(location.search){
frame_source=location.search.substring(1)
}
else{
frame_source="quienes_frame.html"
}

function MM_preloadImages() { //v3.0
  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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.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 show(id1, id2, id3, id4,id5,id6,id7,id8) {
  document.getElementById(id1).style.display = 'block'
  document.getElementById(id2).style.display = 'none'
  document.getElementById(id3).style.display = 'none'
  document.getElementById(id4).style.display = 'none'
  document.getElementById(id5).className ='current_fichero'
  document.getElementById(id6).className ='ficheros'
  document.getElementById(id7).className ='ficheros'
  document.getElementById(id8).className ='ficheros'
  
}

function show2(id1, id2, id3, id4,id5,id6,id7,id8,id9,id10, id11, id12, id13, id14) {
  document.getElementById(id1).style.display = 'block'
  document.getElementById(id2).style.display = 'none'
  document.getElementById(id3).style.display = 'none'
  document.getElementById(id4).style.display = 'none'
  document.getElementById(id5).style.display = 'none'
  document.getElementById(id6).style.display = 'none'
  document.getElementById(id7).style.display = 'none'
  document.getElementById(id8).className='current_equipamiento'
  document.getElementById(id9).className ='equipamiento_sale'
  document.getElementById(id10).className ='equipamiento_sale'
  document.getElementById(id11).className ='equipamiento_sale'
  document.getElementById(id12).className ='equipamiento_sale'
  document.getElementById(id13).className ='equipamiento_sale'
  document.getElementById(id14).className ='equipamiento_sale'
  
}

function show3(id1, id2, id3, id4, id5, id6) {
	
  document.getElementById(id1).style.display = 'block'
  document.getElementById(id2).style.display = 'none'
  document.getElementById(id3).style.display = 'none'
  document.getElementById(id4).className='current_equipamiento'
  document.getElementById(id5).className ='equipamiento_sale'
  document.getElementById(id6).className ='equipamiento_sale'
  
  
}

function showFaqs(id) {
	for(a=1;a<=14;a++){
  document.getElementById('rta'+a).style.display = 'none'
	}
  document.getElementById(id).style.display = 'block'
   
}


function resize(alto){
	window.parent.document.getElementById('marco').height=alto;
}

var flash;

function initialize(){	
parent.marco.location=frame_source;
//cambiaContenido(frame_source.substring(0,frame_source.lenght-5));

//flash = document.getElementById('animacion');

//alert(navigator.appName.indexOf("Microsoft"));

if(navigator.appName.indexOf("Microsoft") != -1) {

flash = document.getElementById('animacion');
}
else {
flash = window.document.animacion;

}

cambiaContenido(frame_source.slice(0,-5));
}

function cambiaContenido(nombreCabezal){
//alert(nombreCabezal);

flash.cambiaCabezal(nombreCabezal);

switch(nombreCabezal){
case "dondeestamos":
parent.marco.location='dondeestamos.html';
break
case "servicios":
parent.marco.location='servicios.html';
break
case "tiendas":
parent.marco.location='tiendas.html';
break
case "noticias":
parent.marco.location='noticias.html';
break
case "faqs":
parent.marco.location='faqs.html';
break
case "contacto":
parent.marco.location='contacto.html';
break
case "quienes_frame":
parent.marco.location='quienes_frame.html';
break
case "parking":
parent.marco.location='parking.html';
break
}
}

function visibleimprimo(){
	 document.getElementById('formimprimir').style.visibility = 'visible';
	 
}

function ocultoformu(){
	 document.getElementById('formimprimir').style.visibility = 'hidden';
}
	

function imprimofichas(form){
	 document.getElementById('ficha_gral').style.display = 'none'
	 document.getElementById('equipamientos').style.display = 'none'
	 document.getElementById('extras').style.display = 'none'
	 document.getElementById('datos').style.display = 'none'
	
	 
	 if(form.f_1.checked){
		document.getElementById('ficha_gral').style.display = 'block' 
	 }
	 
	 if(form.f_2.checked){
		document.getElementById('equipamientos').style.display = 'block' 
		document.getElementById('texto_equipamiento1').style.display = 'block' 
		document.getElementById('texto_equipamiento2').style.display = 'block' 
		document.getElementById('texto_equipamiento3').style.display = 'block' 
		document.getElementById('texto_equipamiento4').style.display = 'block' 
		
	 }
	 
	 if(form.f_3.checked){
		document.getElementById('extras').style.display = 'block' 
	 }
	 
	 if(form.f_4.checked){
		document.getElementById('datos').style.display = 'block' 
		document.getElementById('texto_datos1').style.display = 'block' 
		document.getElementById('texto_datos2').style.display = 'block' 
		document.getElementById('texto_datos3').style.display = 'block' 
	 }
	 
	 
	 document.getElementById('formimprimir').style.visibility = 'hidden' 
	  form.reset()
	  history.go(0)
	 window.print()
	 
	
}






