﻿	function inhabilitar(){
		alert ('Función inhabilitada.');
		return false;
	}
	document.oncontextmenu=inhabilitar;
	function disableselect(e){
		return false
	}
	function reEnable(){
		return true
	}

var peticion = false; 
if (window.XMLHttpRequest) {
      peticion = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
            peticion = new ActiveXObject("Microsoft.XMLHTTP");
}


function ObtenerDatos(datos,divID) { 
if(peticion) {
     var obj = document.getElementById(divID); 
     peticion.open("GET", datos); 
     peticion.onreadystatechange = function()  { 
          if (peticion.readyState == 4) { 
               obj.innerHTML = peticion.responseText; 
          } 
     } 
peticion.send(null); 
}
}

function CambiarEstilo(id) {
	var elementosMenu = getElementsByClassName(document, "li", "activo");
	for (k = 0; k< elementosMenu.length; k++) {
	elementosMenu[k].className = "inactivo";
	}
	var identity=document.getElementById(id);
	identity.className="activo";
}


var petition = false; 
if (window.XMLHttpRequest) {
      petition = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
            peticion = new ActiveXObject("Microsoft.XMLHTTP");
}


function ReadData(datas,divID) { 
if(petition) {
     var obj = document.getElementById(divID); 
     petition.open("GET", datas); 
     petition.onreadystatechange = function()  { 
          if (petition.readyState == 4) { 
               obj.innerHTML = petition.responseText; 
          } 
     } 
petition.send(null); 
}
}

function ChangeStyle(id) {
	var elementosMenu = getElementsByClassName(document, "li", "active");
	for (k = 0; k< elementosMenu.length; k++) {
	elementosMenu[k].className = "inactive";
	}
	var identity=document.getElementById(id);
	identity.className="active";
}

function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}

function recpass() {
var recpass = window.open('http://www.coyunche.cl/reservas/recordar_password.php','','scrollbars=yes,menubar=no,height=768,width=1024,resizable=no,toolbar=no,location=no,status=no');
}
function registro() {
var recpass = window.open('http://www.coyunche.cl/reservas/registro.php','','scrollbars=yes,menubar=no,height=768,width=1024,resizable=no,toolbar=no,location=no,status=no');
}



