// JavaScript Document
$(document).ready(function(){	
	
	var lft = $("#popupcontent").width();
	var tp = $("#popupcontent").height();
	lft = (screen.width / 2 ) - (lft / 2)-10;
	tp =  (screen.height / 2 ) - (tp / 2)-160;
	$("#popupcontent").css("left", lft);
	$("#popupcontent").css("top", tp);
	if(document.body.clientWidth)
	{			
		$("#hidepage").width(document.documentElement.clientWidth);
	}
	
	$("#hidepage").height($(document).height());
	$('#hidepage').css("opacity",0.7);	
	if($("#ErrorDiv").length)
	{
		$("#othercnt").html($("#ErrorDiv").text())
		$("#hidepage").fadeIn(500);
		$("#popupcontent").fadeIn(500);
	}
	
	if($("#SliderControl_ErrorDiv").length)
	{
		$("#othercnt").html($("#SliderControl_ErrorDiv").text())
		$("#hidepage").fadeIn(500);
		$("#popupcontent").fadeIn(500);
	}

	if($("#ErrorDiv1").length)
	{
		$("#othercnt").html($("#ErrorDiv1").text())
		$("#hidepage").fadeIn(500);
		$("#popupcontent").fadeIn(500);
	}
	
	$("a.close").click(function(){
		$("#hidepage").fadeOut(500);
		$("#popupcontent").fadeOut(500);
	});
})
