function  run(id){
	var i = id;
	var strDireccion = "";
	switch (i){
 		case 10:{ // Inicio
			strDireccion = "index.php"; break;
		}
		case 11:{ // La empresa 
			strDireccion = "empresa.html"; break;
		}
		case 12:{ // Catálogo
			strDireccion = "catalogo.php"; break;
		}
		case 13:{ // Encuentra casa
			strDireccion = "encuentra_casa.html"; break;
		}
		case 14:{ // Contacto
			strDireccion = "contacto.html"; break;
		}
		case 15:{ // Avisos legales
			strDireccion = "avisos_legales.html"; break;
		}
		case 16:{ // Acerca de
			strDireccion = "javascript:abrirVentana('acerca_de.html',400,300);"; break;
		}
		case 17:{ // Catálogo - Pisos nueva promoción
			strDireccion = "catalogo_pisos_apartamentos.html"; break;
		}
		case 18:{ // Catálogo - Pisos segunda mano
			strDireccion = "catalogo_pisos_alquiler.html"; break;
		}
		case 19:{ // Catálogo - Locales nueva promoción
			strDireccion = "catalogo_locales_venta.html"; break;
		}
		case 20:{ // Catálogo - Locales segunda mano
			strDireccion = "catalogo_locales_alquiler.html"; break;
		}
		case 21:{ // Catálogo - Fincas
			strDireccion = "catalogo_terreno_fincas.html"; break;
		}
		case 22:{ // Catálogo - Terreno rustico
			strDireccion = "catalogo_terreno_rustico.html"; break;
		}
		case 23:{ // Catálogo - Terreno urbano
			strDireccion = "catalogo_terreno_urbano.html"; break;
		}
		case 24:{ // Chalets
			strDireccion = "catalogo_chalets.html"; break;
		}
		case 25:{ // Cocheras
			strDireccion = "catalogo_cocheras.html"; break;
		}
		case 26:{ // Unifamiliares
			strDireccion = "catalogo_pisos_unifamiliares.html"; break;
		}
		default:{ // Inicio
			strDireccion = "index.html"; break;
		}
	} //end switch 	
	document.location.href = strDireccion;
} //end run

function abrirVentana(direccion,ancho,alto){
	var anchoPantalla = (screen.width - ancho) / 2;
	var altoPantalla = (screen.height - alto) / 2;
	var propiedades = 'height='+alto+',width='+ancho+',top='+altoPantalla+',left='+anchoPantalla+',';
	propiedades = propiedades + 'scrollbars=no,resizable=no,directories=no,location=no,menubar=no,status=no,titlebar=yes,toolbar=no';
	window.open(direccion,'',propiedades);
} // end abrirVentana

function enviar(form) {
	if (form.elements[0].value == "" || form.elements[1].value=="" || form.elements[2].value=="") {  
		alert("Por favor, complete todos los campos obligatorios");
		form.elements[1].focus(); 
		return false; 
	}
} // end enviar

function pintarArriba(){
	document.write("<table border=\"0\" width=\"100%\" cellpadding=\"0\" height=\"100%\">\n");
	document.write("	<tr>\n");
	document.write("		<td align=\"center\" valign=\"top\">\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" height=\"21\" cellspacing=\"0\">\n");
	document.write("			<tr>\n");
	document.write("				<td align=\"right\"><font class=\"dtCabeceraNoLink\"><a href=\"#\" class=\"dtCabecera\" onClick=\"run(10);\">inicio</a> | <a href=\"#\" class=\"dtCabecera\" onClick=\"run(14);\">contacto</a> | <font class=\"dtCabeceraNoLink\"><a href=\"#\" class=\"dtCabecera\" onClick=\"run(15);\">avisos legales</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" cellspacing=\"0\">\n");
	document.write("			<tr>\n");
	document.write("				<td>\n");
	document.write("				<img border=\"0\" src=\"comun/img/cabecera.jpg\" width=\"968\" height=\"156\"></td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" cellspacing=\"0\">\n");
	document.write("			<tr>\n");
	document.write("				<td>\n");
	document.write("				<img border=\"0\" src=\"comun/img/cabecera_2.jpg\"></td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" cellspacing=\"0\" background=\"comun/img/fondo_contenidos.jpg\">\n");
	document.write("			<tr>\n");
	document.write("				<td width=\"184\" valign=\"top\">\n");
	document.write("				<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"table1\" cellpadding=\"0\" height=\"0\">\n");
	document.write("					<tr>\n");
	document.write("						<td width=\"23\"></td>\n");
	document.write("						<td width=\"140\" height=\"14\">\n");
	document.write("						<img border=\"0\" src=\"comun/img/menu_arriba.gif\" width=\"140\" height=\"14\"></td>\n");
	document.write("						<td width=\"21\"></td>\n");
	document.write("					</tr>\n");
	document.write("					<tr>\n");
	document.write("						<td width=\"23\"></td>\n");
	document.write("						<td width=\"140\" align=\"left\" background=\"comun/img/menu_medio.gif\">\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(10);\">Inicio</a><br>\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(11);\">La empresa</a><br>\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(12);\">Catálogo</a><br>\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(13);\">Encuentra casa</a><br>\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(14);\">Contacto</a><br>\n");
	document.write("							&nbsp;&nbsp;&nbsp;<img border=\"0\" src=\"comun/img/menu_topo.gif\" width=\"9\" height=\"9\">&nbsp;<a href=\"#\" class=\"dtItemMenu\" onClick=\"run(15);\">Avisos legales</a><br>\n");
	document.write("						</td>\n");
	document.write("						<td width=\"21\"></td>\n");
	document.write("					</tr>\n");
	document.write("					<tr>\n");
	document.write("						<td width=\"23\"></td>\n");
	document.write("						<td width=\"140\" height=\"92\">\n");
	document.write("						<img border=\"0\" src=\"comun/img/menu_detalle.gif\" width=\"140\" height=\"92\"></td>\n");
	document.write("						<td width=\"21\"></td>\n");
	document.write("					</tr>\n");
	document.write("					<tr>\n");
	document.write("						<td width=\"23\"></td>\n");
	document.write("						<td width=\"140\" background=\"comun/img/menu_datos.gif\" align=\"center\"><font class=\"dtContactoNoLink\"><B>Grupo TRIN</b><br>Servicios inmobiliarios<br><br>c/ Luz nş 14<br>13003 Ciudad Real<br><br>Tel.: 690 279 576<br>Móvil: 616 609 112<br><br><a class=\"dtContacto\" href=\"mailto:info@trin.es\">info@trin.es</a></font></td>\n"); //Tel./Fax: 926 25 68 06
	document.write("						<td width=\"21\"></td>\n");
	document.write("					</tr>\n");
	document.write("					<tr>\n");
	document.write("						<td width=\"23\"></td>\n");
	document.write("						<td width=\"140\" height=\"11\">\n");
	document.write("						<img border=\"0\" src=\"comun/img/menu_abajo.gif\" width=\"140\" height=\"11\"></td>\n");
	document.write("						<td width=\"21\"></td>\n");
	document.write("					</tr>\n");
	document.write("				</table>\n");
	document.write("				</td>\n");
	document.write("				<td align=\"left\" width=\"755\" valign=\"top\">\n");
} // end pintarArriba

function pintarAbajo() {
	document.write("					</td>\n");
	document.write("				<td width=\"29\">&nbsp;</td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" cellspacing=\"0\" height=\"69\">\n");
	document.write("			<tr>\n");
	document.write("				<td><img border=\"0\" src=\"comun/img/pie.jpg\" width=\"968\" height=\"69\"></td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		<table border=\"0\" width=\"968\" cellpadding=\"0\" height=\"21\" cellspacing=\"0\">\n");
	document.write("			<tr>\n");
	document.write("				<td align=\"right\"><font class=\"dtCabeceraNoLink\"><a href=\"#\" class=\"dtCabecera\" onClick=\"run(10);\">inicio</a> | <a href=\"#\" class=\"dtCabecera\" onClick=\"run(14);\">contacto</a> | <font class=\"dtCabeceraNoLink\"><a href=\"#\" class=\"dtCabecera\" onClick=\"run(15);\">avisos legales</a> | <font class=\"dtCabeceraNoLink\"><a href=\"#\" class=\"dtCabecera\" onClick=\"run(16);\">acerca de</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
	document.write("			</tr>\n");
	document.write("		</table>\n");
	document.write("		</td>\n");
	document.write("	</tr>\n");
	document.write("</table>\n");
}  // end pintarAbajo

volveroff = new Image();
volveroff.src = "comun/img/btn_volver_off.jpg";
volveron = new Image();
volveron.src = "comun/img/btn_volver_on.jpg";

function imgOn(imgName){
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
    }
}

function imgOff(imgName){
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
    }
}