﻿var popupStatus = 0;
/************ Start Frist ************/
//loading popup with jQuery magic!
function loadPopup(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupMap").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupMap").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap").height();
	var popupWidth = $("#popupMap").width();
	//centering
	$("#popupMap").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"

	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button").click(function(){
		//centering with css
		centerPopup();
		//load popup
		loadPopup();	
		
		document.getElementById('popupMap').style.visibility = 'visible';

		
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose").click(function(){
		disablePopup();
	});
	//Click out event!
	/*$("#backgroundPopup").click(function(){
		disablePopup();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup();
		}
	});

});

/********* End First *********/


/************ Start Second ************/
//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");
		$("#popupMap2").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup2(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup2").fadeOut("slow");
		$("#popupMap2").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup2(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap2").height();
	var popupWidth = $("#popupMap2").width();
	//centering
	$("#popupMap2").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"
	});
	//only need force for IE6
	
	$("#backgroundPopup2").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button2").click(function(){
		//centering with css
		centerPopup2();
		//load popup
		loadPopup2();
		
		document.getElementById('popupMap2').style.visibility = 'visible';

	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose2").click(function(){
		disablePopup2();
	});
	//Click out event!
	/*$("#backgroundPopup2").click(function(){
		disablePopup2();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup2();
		}
	});

});

/********* End Second *********/


/************ Start Third ************/
//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");
		$("#popupMap3").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup3(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup3").fadeOut("slow");
		$("#popupMap3").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup3(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap3").height();
	var popupWidth = $("#popupMap3").width();
	//centering
	$("#popupMap3").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"

	});
	//only need force for IE6
	
	$("#backgroundPopup3").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button3").click(function(){
		//centering with css
		centerPopup3();
		//load popup
		loadPopup3();
		document.getElementById('popupMap3').style.visibility = 'visible';
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose3").click(function(){
		disablePopup3();
	});
	//Click out event!
	/*$("#backgroundPopup3").click(function(){
		disablePopup3();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup3();
		}
	});

});

/********* End third *********/


/************ Start forth ************/
//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");
		$("#popupMap4").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup4(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup4").fadeOut("slow");
		$("#popupMap4").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup4(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap4").height();
	var popupWidth = $("#popupMap4").width();
	//centering
	$("#popupMap4").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"
	});
	//only need force for IE6
	
	$("#backgroundPopup4").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button4").click(function(){
		//centering with css
		centerPopup4();
		//load popup
		loadPopup4();
		document.getElementById('popupMap4').style.visibility = 'visible';
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose4").click(function(){
		disablePopup4();
	});
	//Click out event!
	/*$("#backgroundPopup4").click(function(){
		disablePopup4();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup4();
		}
	});

});

/********* End forth *********/

/************ Start fifth ************/
//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");
		$("#popupMap5").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup5(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup5").fadeOut("slow");
		$("#popupMap5").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup5(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap5").height();
	var popupWidth = $("#popupMap5").width();
	//centering
	$("#popupMap5").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"

	});
	//only need force for IE6
	
	$("#backgroundPopup5").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button5").click(function(){
		//centering with css
		centerPopup5();
		//load popup
		loadPopup5();
		document.getElementById('popupMap5').style.visibility = 'visible';
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose5").click(function(){
		disablePopup5();
	});
	//Click out event!
	/*$("#backgroundPopup5").click(function(){
		disablePopup5();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup5();
		}
	});

});

/********* End fifth *********/

/************ Start sixth ************/
//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");
		$("#popupMap6").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup6(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup6").fadeOut("slow");
		$("#popupMap6").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup6(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap6").height();
	var popupWidth = $("#popupMap6").width();
	//centering
	$("#popupMap6").css({
		"position": "fixed",
		"top": "30%",
		"left":  "30%"
	});
	//only need force for IE6
	
	$("#backgroundPopup6").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button6").click(function(){
		//centering with css
		centerPopup6();
		//load popup
		loadPopup6();
		document.getElementById('popupMap6').style.visibility = 'visible';
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose6").click(function(){
		disablePopup6();
	});
	//Click out event!
	/*$("#backgroundPopup6").click(function(){
		disablePopup6();
	});*/
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup6();
		}
	});

});

/********* End sixth *********/


/************ Start seventh 
//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");
		$("#popupMap7").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup7(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup7").fadeOut("slow");
		$("#popupMap7").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup7(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap7").height();
	var popupWidth = $("#popupMap7").width();
	//centering
	$("#popupMap7").css({
		"position": "absolute",
		"top": "900.5px",
		"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!
	$("#button7").click(function(){
		//centering with css
		centerPopup7();
		//load popup
		loadPopup7();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose7").click(function(){
		disablePopup1();
	});
	//Click out event!
	$("#backgroundPopup7").click(function(){
		disablePopup7();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup7();
		}
	});

});

/********* End seventh *********/

/************ Start Eighth 
//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");
		$("#popupMap8").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup8(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup8").fadeOut("slow");
		$("#popupMap8").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup8(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupMap8").height();
	var popupWidth = $("#popupMap8").width();
	//centering
	$("#popupMap8").css({
		"position": "absolute",
		"top": "900.5px",
		"left": "210px"
	});
	//only need force for IE6
	
	$("#backgroundPopup8").css({
		"height": windowHeight
	});
	
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$("#button8").click(function(){
		//centering with css
		centerPopup8();
		//load popup
		loadPopup8();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupMapClose8").click(function(){
		disablePopup8();
	});
	//Click out event!
	$("#backgroundPopup8").click(function(){
		disablePopup8();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup8();
		}
	});

});

/********* End Eighth *********/

