function JScripts()
{
	
}
JScripts.prototype.submitRequest = function()
{
	var obj = this;
	
	var validStatus = obj.validateRequest();
	return validStatus;
}
JScripts.prototype.validateRequest = function()
{
	
	var errors = new Array();
	
	$('.errorBox').removeClass('errorBox');
	if ($('#firstname').isEmpty())
	{
		errors.push('Please enter First Name.');
		$('#firstname').addClass('errorBox');
	}
	if ($('#email').isEmpty())
	{
		errors.push('Please enter Email.');
		$('#email').addClass('errorBox');
	}
	else if (!$('#email').emailCheck())
	{
		errors.push('Please enter valid Email.');
		$('#email').addClass('errorBox');
	}
	
	if ($('#birth_day').isEmpty())
	{
		errors.push('Please select Day of Birth.');
		$('#birth_day').addClass('errorBox');
	}
	if ($('#birth_month').isEmpty())
	{
		errors.push('Please select Month of Birth.');
		$('#birth_month').addClass('errorBox');
	}
	if ($('#birth_year').isEmpty())
	{
		errors.push('Please select Year of Birth.');
		$('#birth_year').addClass('errorBox');
	}
	if ($('#star_sign').isEmpty())
	{
		errors.push('Please select Star Sign.');
		$('#star_sign').addClass('errorBox');
	}
	if (errors.length == 0)
	{
		if (navigator.appName == 'Microsoft Internet Explorer')
		{
			window.onbeforeunload = null;
		}
		else
		{
			window.onbeforeunload = undefined;
		}
		return true;
	}
	else
	{
		$('.msgBox:eq(0)')
			.html('<ul>\n<li>' + errors.join('</li>\n<li>') + '</li>\n</ul>')
			.fadeIn(500)
			.scrollTo(800);
		return false;
	}
}
JScripts.prototype.submitRequest_new = function()
{
	var obj = this;
	var validStatus = obj.validateRequest();
	//return validStatus;
	if (validStatus)
	{
		var top = (($(window).height() / 2) - 121) + 'px';
		var left = (($(window).width() / 2) - 253) + 'px';
		$.blockUI({
			message: '<div style="padding-top:100px;"><img src="images/loading.gif" alt="Checking Against Qualification Standards..." width="328" height="45" border="1px;" /></div>',
			css: {
				width: '504px',
				height: '165px',
				border: 'none',
				cursor: 'default',
				top: top,
				left: left,
				background: 'url(images/checking.jpg)'
			}
		});
		var v = this;
		var v1;
		setTimeout(function(){
			VirtualAgentSuspend = 'LocationRedirect';
			$('#frmQuery').submit();
		}, 3000);
		//$.unblockUI();
	}
	return false;
}
var js;
$(document).ready(function(){
	js = new JScripts();
});