/*Funciones para las imágenes*/

		function MM_findObj(n, d) { //v3.0
		  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); 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 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_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 ventana_foto(fotover,nombre) 
		{
			window.open("ver_foto.asp?foto="+fotover +"&nombre="+nombre,"1","status=no,toolbar=no,scrollbars=no,width=416,height=446")
		}	
		function ventana_foto_pag(fotover,nombre) 
		{			
			window.open("../ver_foto.asp?foto="+fotover +"&nombre="+nombre,"1","status=no,toolbar=no,scrollbars=no,width=416,height=446")
		}
		function ventana_plano() 
		{
			window.open("plano.asp","1","status=no,toolbar=no,scrollbars=no,width=600,height=350")
		}
		function ventana_plano_pag() 
		{
			window.open("../plano.asp","1","status=no,toolbar=no,scrollbars=no,width=600,height=350")
		}	
		function AbrirVentana() {		
		d = document.getElementById("divtituloimprimir");
		var titulo=d.innerHTML;
		
		//alert(d.innerHTML);
		
		d = document.getElementById("divContent");
		var texto=d.innerHTML;
		
		Ventana=open("","Imprimir","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=660,height=400");
		Ventana.document.write("<HTML><HEAD><TITLE>Axarquía- Página de Impresión</TITLE>");
		Ventana.document.write("<link rel='stylesheet' type='text/css' href='../dibujos/estilo.css'>");						
		Ventana.document.write("<script>");	
		Ventana.document.write("var ns = false; ");
		Ventana.document.write("var ie = false; ");
		Ventana.document.write("if (navigator.appName=='Netscape') ");			
		Ventana.document.write("{ ");
		Ventana.document.write("	ns = true; ");
		Ventana.document.write("} ");
		Ventana.document.write("if (navigator.appName=='Microsoft Internet Explorer') ");
		Ventana.document.write("{ ");	
		Ventana.document.write("ie = true; ");
		Ventana.document.write("} ");	
		Ventana.document.write("</script> ");
		Ventana.document.write("<script> ");	
		Ventana.document.write("function ventana_foto(fotover,nombre) ");
		Ventana.document.write("{ ");
		Ventana.document.write("	window.open('ver_foto.asp?foto='+fotover +'&nombre='+nombre,'1','status=no,toolbar=no,scrollbars=no,width=550,height=500') ");
		Ventana.document.write("} ");
		Ventana.document.write("</script> ");	
		Ventana.document.write("<script Language='Javascript'> ");
		Ventana.document.write("function printit(){ "); 
				Ventana.document.write("window.print(); ");	
		Ventana.document.write("} ");
		Ventana.document.write("function MM_findObj(n, d) { ");
		Ventana.document.write("var p,i,x;  if(!d) d=document; if((p=n.indexOf('?'))>0&&parent.frames.length) { ");
		Ventana.document.write("d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} ");
		Ventana.document.write("if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; ");
		Ventana.document.write(" for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x; ");
		Ventana.document.write("} ");
		Ventana.document.write("function MM_swapImage() { ");
		Ventana.document.write("var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) ");
		Ventana.document.write("if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} ");
		Ventana.document.write("}" );
		Ventana.document.write("function MM_swapImgRestore() { ");
		Ventana.document.write(" var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; ");
		Ventana.document.write("} ");
		Ventana.document.write("function MM_preloadImages() { ");
		Ventana.document.write("var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); ");
		Ventana.document.write("var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) ");
		Ventana.document.write("if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} ");
		Ventana.document.write("} ");
		
		Ventana.document.write("</script >");	
		Ventana.document.write("</HEAD> ");
		Ventana.document.write("<body topmargin='0' leftmargin='10' marginheight='0' marginwidth='0' rightmargin='0' bottommargin='0' background='../dibujos/fondo.gif'>");

		Ventana.document.write("<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>");
		Ventana.document.write("<tr>");
		Ventana.document.write("<td height='40'><font size='2' color='#004a80'><b>");
		Ventana.document.write(titulo);
		Ventana.document.write("</b></font></td>");
		Ventana.document.write("<td align='right'>");
		impresora="<img hspace='5' style='cursor:hand;cursor:pointer' onmouseout='MM_swapImgRestore();return true' onmouseover='MM_swapImage(";
		impresora=impresora+'"i_imprimir","","../dibujos/impresoravb.gif"';
		impresora=impresora+",1);return true' onclick='printit()' name='i_imprimir' border='0' alt='Imprimir' src='../dibujos/impresorav.gif'>";
		Ventana.document.write(impresora);
		Ventana.document.write("<a href='JavaScript:cerrar_ventana()'>");					
		cerrar="<img style='cursor:hand;cursor:pointer' onmouseout='MM_swapImgRestore();return true' onmouseover='MM_swapImage(";
		cerrar=cerrar+'"cerrar","","../dibujos/f_cerrar_a.gif"';
		cerrar=cerrar+",1);return true' onclick='javascript:window.close();' name='cerrar' border='0' alt='Cerrar' src='../dibujos/f_cerrar.gif'></td>";
		Ventana.document.write("</a>");		
		Ventana.document.write(cerrar);
		Ventana.document.write("</td><td width='10'>");
		Ventana.document.write("&nbsp;");
		Ventana.document.write("</td>");
		Ventana.document.write("</tr>");
		Ventana.document.write("<tr><td valign='top' colspan='2'>");
		Ventana.document.write("<table width='100%' cellpadding='5' cellspacing='0' border='1' bordercolor='#004a80'>");
		Ventana.document.write("<tr>");
		Ventana.document.write("<td bgcolor='white'>");
		Ventana.document.write(texto);		
		Ventana.document.write("</td>");
		Ventana.document.write("</tr>");		
		Ventana.document.write("</table>");
		Ventana.document.write("</td>");
		Ventana.document.write("<td width='10'>");
		Ventana.document.write("&nbsp;	");
		Ventana.document.write("</td>");
		Ventana.document.write("</tr>");	
		Ventana.document.write("</table>");
		
		Ventana.document.write("</BODY>");
		Ventana.document.write("</HTML>");
		Ventana.document.close();
	}