﻿/***************************/
//POPUP1				
/***************************/

//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;

//loading popup with jQuery magic!
function loadPopup1(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup1").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup1").fadeIn("slow");
		$("#popupTabla1").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup1(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup1").fadeOut("slow");
		$("#popupTabla1").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup1(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla1").height();
	var popupWidth = $("#popupTabla1").width();
	//centering
	$("#popupTabla1").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup1").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup1").click(function(){
		//centering with css
		centerPopup1();
		//load popup
		loadPopup1();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose1").click(function(){
		disablePopup1();
	});
	//Click out event!
	$("#backgroundPopup1").click(function(){
		disablePopup1();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup1();
		}
	});

});
/***************************/
//POPUP2				
/***************************/

//loading popup with jQuery magic!
function loadPopup2(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup2").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup2").fadeIn("slow");
		$("#popupTabla2").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup2(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup2").fadeOut("slow");
		$("#popupTabla2").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup2(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla2").height();
	var popupWidth = $("#popupTabla2").width();
	//centering
	$("#popupTabla2").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup2").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup2").click(function(){
		//centering with css
		centerPopup2();
		//load popup
		loadPopup2();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose2").click(function(){
		disablePopup2();
	});
	//Click out event!
	$("#backgroundPopup2").click(function(){
		disablePopup2();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup2();
		}
	});

});
/***************************/
//POPUP3				
/***************************/

//loading popup with jQuery magic!
function loadPopup3(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup3").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup3").fadeIn("slow");
		$("#popupTabla3").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup3(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup3").fadeOut("slow");
		$("#popupTabla3").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup3(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla3").height();
	var popupWidth = $("#popupTabla3").width();
	//centering
	$("#popupTabla3").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup3").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup3").click(function(){
		//centering with css
		centerPopup3();
		//load popup
		loadPopup3();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose3").click(function(){
		disablePopup3();
	});
	//Click out event!
	$("#backgroundPopup3").click(function(){
		disablePopup3();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup3();
		}
	});

});
/***************************/
//POPUP4				
/***************************/

//loading popup with jQuery magic!
function loadPopup4(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup4").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup4").fadeIn("slow");
		$("#popupTabla4").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup4(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup4").fadeOut("slow");
		$("#popupTabla4").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup4(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla4").height();
	var popupWidth = $("#popupTabla4").width();
	//centering
	$("#popupTabla4").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup4").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup4").click(function(){
		//centering with css
		centerPopup4();
		//load popup
		loadPopup4();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose4").click(function(){
		disablePopup4();
	});
	//Click out event!
	$("#backgroundPopup4").click(function(){
		disablePopup4();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup4();
		}
	});

});
/***************************/
//POPUP5				
/***************************/

//loading popup with jQuery magic!
function loadPopup5(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup5").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup5").fadeIn("slow");
		$("#popupTabla5").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup5(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup5").fadeOut("slow");
		$("#popupTabla5").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup5(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla5").height();
	var popupWidth = $("#popupTabla5").width();
	//centering
	$("#popupTabla5").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup5").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup5").click(function(){
		//centering with css
		centerPopup5();
		//load popup
		loadPopup5();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose5").click(function(){
		disablePopup5();
	});
	//Click out event!
	$("#backgroundPopup5").click(function(){
		disablePopup5();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup5();
		}
	});

});
/***************************/
//POPUP6				
/***************************/

//loading popup with jQuery magic!
function loadPopup6(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup6").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup6").fadeIn("slow");
		$("#popupTabla6").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup6(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup6").fadeOut("slow");
		$("#popupTabla6").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup6(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla6").height();
	var popupWidth = $("#popupTabla6").width();
	//centering
	$("#popupTabla6").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup6").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup6").click(function(){
		//centering with css
		centerPopup6();
		//load popup
		loadPopup6();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose6").click(function(){
		disablePopup6();
	});
	//Click out event!
	$("#backgroundPopup6").click(function(){
		disablePopup6();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup6();
		}
	});

});
/***************************/
//POPUP7				
/***************************/

//loading popup with jQuery magic!
function loadPopup7(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup7").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup7").fadeIn("slow");
		$("#popupTabla7").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup7(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup7").fadeOut("slow");
		$("#popupTabla7").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup7(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla7").height();
	var popupWidth = $("#popupTabla7").width();
	//centering
	$("#popupTabla7").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup7").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup7").click(function(){
		//centering with css
		centerPopup7();
		//load popup
		loadPopup7();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose7").click(function(){
		disablePopup7();
	});
	//Click out event!
	$("#backgroundPopup7").click(function(){
		disablePopup7();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup7();
		}
	});

});
/***************************/
//POPUP8				
/***************************/

//loading popup with jQuery magic!
function loadPopup8(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup8").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup8").fadeIn("slow");
		$("#popupTabla8").fadeIn("slow");
		popupStatus = 1;
	}
}
//disabling popup with jQuery magic!
function disablePopup8(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup8").fadeOut("slow");
		$("#popupTabla8").fadeOut("slow");
		popupStatus = 0;
	}
}
//centering popup
function centerPopup8(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupTabla8").height();
	var popupWidth = $("#popupTabla8").width();
	//centering
	$("#popupTabla8").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	
	$("#backgroundPopup8").css({
		"height": windowHeight
	});
	
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#buttonpopup8").click(function(){
		//centering with css
		centerPopup8();
		//load popup
		loadPopup8();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupTablaClose8").click(function(){
		disablePopup8();
	});
	//Click out event!
	$("#backgroundPopup8").click(function(){
		disablePopup8();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup8();
		}
	});

});
