// var estado = new Array ('No a la venta','Vendido','Consultar diponibilidad','En venta','Reventa','Reservado','Eliminado');
var estado = new Array ('No a la venta','No disponible','Consultar diponibilidad','Disponible','Reventa','No disponible','Eliminado');
// var colbul = new Array ('000','f00','ff0','0f0','060','009');
var colbul = new Array ('000','f00','ff0','0f0','060','f00');

var divactivo='none';

function moslot(x) { 
	car.document.open("text/html","replace");
	car.document.writeln("<html><head><title>Características</title>");
	car.document.writeln("<LINK href='stylesheet.css' type=text/css rel=STYLESHEET></head><body>");
	car.document.writeln("<span class=leb>Manzana "+db[x][0]+" / Lote "+db[x][1]+". <br><br>");
	car.document.writeln("<b>"+estado[db[x][6]]+"</b> <br><br>");
	if (db[x][6] != 6 && db[x][6] != 0) {
		car.document.writeln("Superficie: "+db[x][2]+" m2 <br><br>");
		car.document.writeln("Cota: "+db[x][4]+" mts. <br><br>");
		}
//	if (db[x][6] == 3 || db[x][6] == 4) {
//		car.document.writeln("Precio: US$ "+db[x][3]+"<br><br>");
//		car.document.writeln("Precio/m2: US$ "+Math.floor(db[x][3]*100/db[x][2])/100+"<br><br>");
//		}
	
	car.document.writeln("</span><span class=lec>"+db[x][5]+" </span>");
	car.document.writeln("</body></html>");
	car.document.close();
	
	if (divactivo!='none') {
		var odiv  = document.getElementById(divactivo);
		odiv.className="bullet";
		}

	divactivo = "m"+db[x][0]+"l"+db[x][1];
	odiv  = document.getElementById(divactivo);
	odiv.className="bulletactivo";

	} 

function printcoors() {
	for (x=0 ; x < cant ; x++) {
		if (db[x][6] != 6) {
			document.writeln("<area shape=\"poly\" coords=\" "+coo[x]+" \" href=\"javascript:moslot("+x+");\" title=\"Manzana "+db[x][0]+" / Lote "+db[x][1]+". "+estado[db[x][6]]+".\">");
		}
	}
}


function printbullets() {
	for (x=0 ; x < cant ; x++) {
		if (db[x][6] != 6) {
			document.writeln("<div id='m"+db[x][0]+"l"+db[x][1]+"' class=bullet style=\"z-index:2; position:absolute; top:"+eval(bulcoo[x][1]+5)+"px; left:"+eval(bulcoo[x][0]+4)+"px; background-color:#"+colbul[db[x][6]]+";\" onClick=\"javascript:moslot("+x+");\">&nbsp;</div>");
		}
	}
}

	
