// JavaScript Document
function terms() {
	window.open("terms.htm", "", "height=500,width=375,left=0,top=0");
}
var vnav = parseInt(navigator.appVersion);
function IraURL(vURL,vw,vh) {
	vResize = 'yes';
	vws = 25;
	vhs = 25;
	if (vw <= 0) {
		vw = 500;
	}
	if (vh <= 0) {
		vh = 450;
	}
	vParam ='height='+vh+',width='+vw+ ',top='+vhs +',left='+vws + ',resizable='+vResize+ ',scrollbars=yes,toolbar=no,location=no,status=no,titlebar=no,menubar=no,dependent=no,alwaysRaised'
	vVentana = open(vURL, "web", vParam); 	
	if(vnav >= 4) {
		vVentana.window.focus();
	}
}
function TopenWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ValidateEmail(theForm, lang) {
	if (theForm.email.value == "") {
		if (lang=="eng") {
			alert("The \"E-mail\" field is needed. Please fill it");
		}else if (lang=="esp") {
			alert("El campo \"E-mail\" es necesario. Rellenelo para continuar");
		}
		theForm.email.focus();
		return (false);
	}
}
function putExactThumb(base, title, x, y) {
	var debug = false;
	var uri = "/recoleta/scripts/fullpic.asp?base=" + base + "&amp;title=" + title;
	if (debug) document.write("uri= " + uri + ";");
	uri = "'" + uri + "'";
	if (debug) document.write("uri= " + uri + ";");
	var href = "javascript:newExactCleanWin(" + uri + ", 'fullpic', " + x + ", " + y + ");";
	var img = "<img src=\"/recoleta/img/p" + base + ".jpg\" border=\"0\" width=\"100\" height=\"72\">";
	var lnk = "<a href=\"" + href + "\">" + img + "</a>";
	document.write(lnk);
}
function putExactAptThumb(base, title, x, y, apt){
	var uri = "/recoleta/scripts/fullpic.asp?base=" + base + "&amp;title=" + title + "&amp;apt=" + apt;
	uri = "'" + uri + "'";
	var href = "javascript:newExactCleanWin(" + uri + ", 'fullpic', " + x + ", " + y + ");";
	var aptpath ="";
	if (apt>=2) aptpath = "apt" + apt + "/";
	var img = "<img src=\"/recoleta/img/" + aptpath + "p" + base + ".jpg\" border=\"0\" width=\"100\" height=\"72\">";
	var lnk = "<a href=\"" + href + "\">" + img + "</a>";
	document.write(lnk);
}
function newExactCleanWin(uri, nam, x, y){
	var param = "location=no,scrollbars=no,width=" + x + ",height=" + y + "screenX=0, screenY=0, left=0, top=0";
	param = "'" + param + "'";
	window.open(uri, nam, param);
}
