﻿// JavaScript Document


var popupStatus = 0;

function loadPopup(){  
	if(popupStatus==0){  
		$("#popupContact").fadeIn("slow");  
		popupStatus = 1;  
	}  
}  


function disablePopup(){  
	if(popupStatus==1){  
		$("#popupContact").fadeOut("slow");  
		popupStatus = 0;  
	}  
} 



function centerPopup(){  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#popupContact").height();  
	var popupWidth = windowWidth/2 - $("#popupContact").width()- 150;  

	$("#popupContact").css({  
	"position": "absolute",  
	"top": windowHeight/2/*popupHeight/2*/,  
	"left": popupWidth
	});  
  
	/*$("#backgroundPopup").css({  
	"height": windowHeight  
	});*/  
  
} 


var popupStatusCo = 0;

function loadPopupCo(){  
	if(popupStatusCo==0){  
		$("#popupCheckout").fadeIn("slow");  
		popupStatusCo = 1;  
	}  
}  


function disablePopupCo(){  
	if(popupStatusCo==1){  
		$("#popupCheckout").fadeOut("slow");  
		popupStatusCo = 0;  
	}  
} 



function centerPopupCo(){  
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;  
	var popupHeight = $("#popupCheckout").height();  
	var popupWidth = windowWidth/2 - $("#popupCheckout").width()- 150; 

	$("#popupCheckout").css({  
	"position": "absolute",  
	"top": windowHeight/2 - popupHeight/2,  
	"left": popupWidth  
	});  
  
	/*$("#backgroundPopup").css({  
	"height": windowHeight  
	});*/  
  
}  
