// JavaScript Document

window.dhtmlHistory.create();

var cambioHistorial = function (nuevaSeccion, metadatos) {
	//En nueva sección ya tenemos el nombre de la sección donde hay que ir
	Load(nuevaSeccion);
}

window.onload = function() {
	//Load login form
	//showLogin();
	dhtmlHistory.initialize();
	dhtmlHistory.addListener(cambioHistorial);
	
	//Verifica si viene la página solicitada viene de un favorito o link pidiendo una sección específica
	var seccion = dhtmlHistory.getCurrentLocation();
		
	if (seccion != null) {
		//Inicio la sección deseada
		Load(seccion);
	} else { //Condición reconocida por SAFARI
		Load("home");
	}
	
}

//START LOAD LOGIN
/*function showLogin() {
	requestPage("Login.aspx", receivingPage);	
}

function receivingPage(value) {
	document.getElementById("login_form").innerHTML = value;
}*/
//END

// START NO POST BACK FUNCTION
function noPostBack(input) {
    try {

        CallServer(input, null);

    } catch(e) {}
}

function ReceiveServerData(arg, context) {
    try {
       Load(arg);
    }
    catch(e) {}
}
//END

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}