var proxy = "proxy.php";
var mapLoaded = false;


$(document).ready(function() {
	window.onresize = function(){
//		resizeContenidor();
	}
	initForm();
});


function resizeContenidor(){
	var wW = document.documentElement.clientWidth;
	var hW = document.documentElement.clientHeight;
	var wC = document.getElementById("contenidor").offsetWidth;
	var hC = document.getElementById("contenidor").offsetHeight;
	
	if(wW < wC){
		document.getElementById("contenidor").style.left = "0px";
		document.getElementById("contenidor").style.marginLeft = "0px";
		document.getElementById("contenidor").style.top = "0px";
		document.getElementById("contenidor").style.marginTop = "0px";
	} else {
		document.getElementById("contenidor").style.left = "50%";
		document.getElementById("contenidor").style.marginLeft = "-492.5px";
		document.getElementById("contenidor").style.top = "50%";
		document.getElementById("contenidor").style.marginTop = "-295px";
	}
}


function showPage(idp, obj){
	$(".menuSelected").removeClass('menuSelected');

	$(".central:visible").hide();
	$("#"+idp).show();
	
	$(".menuSelected").removeClass("menuSelected");
	$(obj).addClass("menuSelected");
}


function showMap(){
	if(mapLoaded == false){
		sma_maps_initializeMAP($("#maps").width(), $("#maps").height(), document.getElementById("maps"));
		sma_maps_showMAP(idioma, true);
		mapLoaded = true;
	}
}
