function findCenter(outerdiv, innerdiv, scroll){
		var height = $(document).height();
		var width = $(document).width();
		if(scroll == "Y"){
			height = height - 2;
			width = width - 2;
		}
		$('#'+outerdiv).css("height", height);
		$('#'+outerdiv).css("width", width);
		
		var height = $(window).height();
		var width = $(window).width();
		var half = width / 2;
		var qw = half - 360;
		//if(scroll == "Y"){
			$('#'+innerdiv).vCenter();
		//}
		$('#'+innerdiv).css('left', qw);
		//$('#'+innerdiv).show();
}

function noShow(loginLink){
	var one = $.cookie("noShow", "Y", { expires: 365 });
	var two = goToLogin(loginLink); 
}

function opensesame(loginLink){
		$.post(loginLink, { from: "Accuportal" },
   			function(html){
     				$("#base173").html(html);
   		});
		
		var one = $("#window173").show();
		var two = $("#interstitial173").show();
		var three = $('#interstitial173').vCenter();
		var four = findCenter("window173","interstitial173","N");
/*
	var cookieValue = $.cookie("noShow");
	if(cookieValue == "Y"){
		var one = goToLogin(loginLink);
	}else{
		var one = $("#window173").show();
		var two = $("#interstitial173").show();
		var three = $('#interstitial173').vCenter();
		var four = findCenter("window173","interstitial173","N");
	}
*/
}

function closesesame(){
	$("#window173").hide();
	$("#interstitial173").hide();
	$("#base173").html("");
}

function goToLogin(loginLink){
	window.location = loginLink;
}
