function abrirventana(url,vwidth,vheight)
{
LeftPosition = (screen.width) ? (screen.width-vwidth)/2 : 0;
TopPosition = (screen.height) ? (screen.height-vheight)/2 : 0;
var win_param;
win_param="top="+TopPosition+",left="+LeftPosition+",width="+vwidth+",height="+vheight+"channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=yes,status=0,toolbar=0,screenX=0,screenY=0";
msgWindow=open(url,"smallWindow",win_param);
msgWindow.focus();
msgWindow.opener= self;
return false;
}

function viculo(txt) 
{
	window.status = txt;
	setTimeout("borra()",2000);
}
	function borra() {
	window.status="";
}

function dame_correo(a_1,a_2,a_3){ 
return a_1 + a_2 + a_3 
}

function dame_correo(){ 
return usuario + conector + dominio 
}

function mailpage(package,descripcion,email){
usuario = email; 
dominio = "hotelmagicmountain.com";
conector = "@";
mail_str = "mailto:"+ dame_correo() +"?subject="+ package +"";
mail_str += "&body="+ descripcion +"";
location.href = mail_str;
}

function campo_correcto(campo,condicion,mensaje_incorrecto){
if(eval(campo))
{
	if (eval(condicion)) 
	{
		alert(mensaje_incorrecto);
		return 0;
	}
}
return 1;
}

function LP_data()
{ 
	var key=window.event.keyCode;//codigo de tecla. 
	if (key < 46 || key > 57)
	{//si no es numero 
		window.event.keyCode=0;//anula la entrada de texto. 
	}
}

function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}
function overlay(curobj, subobj){
	if (document.getElementById){
		var subobj=document.getElementById(subobj)
		subobj.style.left=getposOffset(curobj, "left")+"px"
		subobj.style.top=getposOffset(curobj, "top")+"px"
		subobj.style.display="block"
		return false
	}
	else
		return true
}

function overlayclose(subobj){
	document.getElementById(subobj).style.display="none"
}