$(window).one("load",function(){
	var htmlHeight = $('html').height();
	var clientHeight = document.body.clientHeight;
	var divTop;
	if(clientHeight < 600)
		clientHeight = 600;
	if(htmlHeight != clientHeight && htmlHeight>600)
	{
		$('body').css('height',htmlHeight+'px');
		clientHeight = htmlHeight;
	}
	divTop = ((clientHeight)/2) - 300;
	$("#contenerdiv").css('padding-top',divTop+'px');	
});

$(window).resize(function(){
	var bodyHeight = document.body.clientHeight;
	var x = $('html').height();
	if(bodyHeight < 650 || x < 650)
	{
		$('body').css('height','600px');
		bodyHeight = 650;
	}
	else if(x != bodyHeight && x >= 650)
		$('body').css('height',x+'px');
	var footerPosition = bodyHeight-100;
	$(".footer").css("margin-top",footerPosition+'px');
});

$(window).resize(function(){
	var htmlHeight = $('html').height();
	var clientHeight = document.body.clientHeight;
	var divTop;
	if(clientHeight < 600)
		clientHeight = 600;
	if(htmlHeight != clientHeight && htmlHeight>600)
	{
		$('body').css('height',htmlHeight+'px');
		clientHeight = htmlHeight;
	}
	divTop = ((clientHeight)/2) - 300;
	$("#contenerdiv").css('padding-top',divTop+'px');
});



$(window).bind("resize",function(){
	var htmlHeight = $('html').height();
	var clientHeight = document.body.clientHeight;
	var divTop;
	if(clientHeight < 600)
		clientHeight = 600;
	if(htmlHeight != clientHeight && htmlHeight>600)
	{
		$('body').css('height',htmlHeight+'px');
		clientHeight = htmlHeight;
	}
	divTop = ((clientHeight)/2) - 300;
	$("#contenerdiv").css('padding-top',divTop+'px');
});