function Validate_blog_suggest()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtInquery.value == '' && Form1.txt1.value == '')
	{
		alert('Blog can not be left blank.');
		return false;
	}
		
return true;
}








function ValidateDreamTeamSignUpedit()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtTeamName.value == '')
	{
		alert('Team Name can not be left blank.');
		Form1.txtTeamName.focus();
		return false;
	}
	
	
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
	

	
return true;
}


function ValidateLinksForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtTitle.value == '')
	{
		alert('Title can not be left blank.');
		Form1.txtTitle.focus();
		return false;
	}
	if(Form1.txtURL.value == '')
	{
		alert('Website URL can not be left blank.');
		Form1.txtURL.focus();
		return false;
	}
	
	if(Form1.txtURL.value != '')
{

 var urlregex = new RegExp("^(http:\/\/|https:\/\/|ftp:\/\/){1}([0-9A-Za-z]+\.)");
if(urlregex.test(Form1.txtURL.value))
{
}
else
{

		alert('URL not in a correct format.');
		Form1.txtURL.focus();
		return false;
		}
}
	if(Form1.txtBackLink.value == '')
	{
		alert('Reciprocal URL can not be left blank.');
		Form1.txtBackLink.focus();
		return false;
	}
	if(Form1.txtBackLink.value != '')
{

 var urlregex = new RegExp("^(http:\/\/|https:\/\/|ftp:\/\/){1}([0-9A-Za-z]+\.)");
if(urlregex.test(Form1.txtBackLink.value))
{
}
else
{

		alert('Reciprocal URL not in a correct format.');
		Form1.txtBackLink.focus();
		return false;
		}
}
	if(Form1.txtDesc.value == '')
	{
		alert('Description can not be left blank.');
		Form1.txtDesc.focus();
		return false;
	}
	
	return true;
}

function ValidateDreamTeamSignUp()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtTeamName.value == '')
	{
		alert('Team Name can not be left blank.');
		Form1.txtTeamName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}

if(Form1.txtPass.value == '' || Form1.txtCPass.value == '')
{
		alert('Password can not be left blank.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length < 5)
{
		alert('Password too short.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length > 10)
{
		alert('Password can not be more than 10 characters.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value != Form1.txtCPass.value)
{
		alert('Password does not match.');
		Form1.txtPass.focus();
		return false;
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
	

	
return true;
}

function ValidateJobApplicationForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
		
	if(Form1.txtObjective.value != '')
	{
		if(Form1.txtObjective.value.length > 2000)
		{
			alert('Objective can be up to 2000 characters.');
			Form1.txtObjective.focus();
			return false;
		}
	}
	
	
		if(Form1.txtProject.value != '')
	{
		if(Form1.txtProject.value.length > 2000)
		{
			alert(' Achievements / Projects can be up to 2000 characters.');
			Form1.txtProject.focus();
			return false;
		}
	}
	
return true;
}

function ValidateLooseOnePound()
{
	
	if(Form1.txtft.value == '')
	{
		alert('Age can not be left blank.');
		Form1.txtft.focus();
		return false;
	}
	
		if(Form1.txtLBS.value == '')
	{
		alert('Weight can not be left blank.');
		Form1.txtLBS.focus();
		return false;
	}
	var integer = /^\d+$/;
	if(Form1.txtft.value != '')
	{
		if (window.RegExp && !integer.test(Form1.txtft.value))
		{	alert('Age can only have number value.');
			Form1.txtft.focus();
			return false;
		}
	}
	
return true;
}
function chooseLang(lang)
{
	if(lang == "en")
	{
		document.getElementById("divEn").style.visibility = "visible";
		document.getElementById("divEn").style.position = "static";
		document.getElementById("divUr").style.visibility = "hidden";
		document.getElementById("divUr").style.position = "absolute";
	}
	else if(lang == "ru")
	{
		document.getElementById("divEn").style.visibility = "visible";
		document.getElementById("divEn").style.position = "static";
		document.getElementById("divUr").style.visibility = "hidden";
		document.getElementById("divUr").style.position = "absolute";
	}
	else if(lang == "islamicen")
	{
		document.getElementById("divislamicEn").style.visibility = "visible";
		document.getElementById("divislamicEn").style.position = "static";
		document.getElementById("divislamicUr").style.visibility = "hidden";
		document.getElementById("divislamicUr").style.position = "absolute";
	}
	else if(lang == "islamicur")
	{
		document.getElementById("divislamicUr").style.visibility = "visible";
		document.getElementById("divislamicUr").style.position = "static";
		document.getElementById("divislamicEn").style.visibility = "hidden";
		document.getElementById("divislamicEn").style.position = "absolute";
	}
	else
	{
		document.getElementById("divUr").style.visibility = "visible";
		document.getElementById("divUr").style.position = "static";
		document.getElementById("divEn").style.visibility = "hidden";
		document.getElementById("divEn").style.position = "absolute";
	
	}
}
function ValidateCarrerLogin()
{
	
	if(Form1.txtLoginNumber.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtLoginNumber.focus();
		return false;
	}
	
	if(Form1.txtPassword.value == '')
	{
		alert('Password can not be left blank.');
		Form1.txtPassword.focus();
		return false;
	}
	return true;
}
function ValidateConsultancyForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
		if(Form1.txtDegree.value == '')
	{
		alert('Degree Title can not be left blank.');
		Form1.txtDegree.focus();
		return false;
	}
	
			if(Form1.txtDegree.value == '')
	{
		alert('Degree Title can not be left blank.');
		Form1.txtDegree.focus();
		return false;
	}
	
	if(Form1.txtInquery.value == '' && Form1.txt1.value == '' )
	{
		alert('Question can not be left blank.');
		Form1.txtDegree.focus();
		return false;
	}
	
	if(Form1.txt1.value != '')
	{
		if(Form1.txt1.value.length > 4000)
		{
			alert('Question can be up to 4000 characters.');
			Form1.txt1.focus();
			return false;
		}
	}
	
	if(Form1.txtInquery.value != '')
	{
		if(Form1.txtInquery.value.length > 4000)
		{
			alert('Question can be up to 4000 characters.');
			Form1.txtInquery.focus();
			return false;
		}
	}
	
return true;
}








function ValidateAdAbuseForm()
{
	
if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtURL.value == '')
	{
		alert('Ad Page URL / Category can not be left blank.');
		Form1.txtURL.focus();
		return false;
	}
	if(Form1.txtCat.value == '')
	{
		alert('Website Name / URL can not be left blank.');
		Form1.txtCat.focus();
		return false;
	}
		
return true;
}
	




function ValidateFeedBackForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtInquiry.value == '')
	{
		alert('Feedback can not be left blank.');
		Form1.txtInquiry.focus();
		return false;
	}
		
return true;
}
	
	
function ValidatePaghaamForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}

	if(Form1.txtFName.value == '')
	{
		alert('Friends Name can not be left blank.');
		Form1.txtFName.focus();
		return false;
	}
	if(Form1.txtFCity.value == '')
	{
		alert('Friends City can not be left blank.');
		Form1.txtFCity.focus();
		return false;
	}

if(Form1.txtShort.value.length > 100)
{
		alert('Short Message can not be more than 100 characters.');
		Form1.txtShort.focus();
		return false;
}
	if(Form1.txtInquiry.value == '')
	{
		alert('Message can not be left blank.');
		Form1.txtInquiry.focus();
		return false;
	}
	if(Form1.txtInquiry.value.length > 300)
{
		alert('Message can not be more than 300 characters.');
		Form1.txtInquiry.focus();
		return false;
}
		
return true;
}	
	
	
	
	
	
	function ValidateAdvisorGroupForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}

if(Form1.txtPass.value == '' || Form1.txtCPass.value == '')
{
		alert('Password can not be left blank.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length < 5)
{
		alert('Password too short.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length > 10)
{
		alert('Password can not be more than 10 characters.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value != Form1.txtCPass.value)
{
		alert('Password does not match.');
		Form1.txtPass.focus();
		return false;
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
	

	
return true;
}
	
	
	
	
	
	
	
	


function ValidateAdvisorForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
if(Form1.txtPass.value == '' || Form1.txtCPass.value == '')
{
		alert('Password can not be left blank.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length < 5)
{
		alert('Password too short.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length > 10)
{
		alert('Password can not be more than 10 characters.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value != Form1.txtCPass.value)
{
		alert('Password does not match.');
		Form1.txtPass.focus();
		return false;
}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
		if(Form1.txtDegree.value == '')
	{
		alert('Degree Title can not be left blank.');
		Form1.txtDegree.focus();
		return false;
	}
	
			if(Form1.txtDegree.value == '')
	{
		alert('Degree Title can not be left blank.');
		Form1.txtDegree.focus();
		return false;
	}
	if(Form1.txtJobDesc.value != '')
	{
		if(Form1.txtJobDesc.value.length > 2000)
		{
			alert('Job Description can be up to 2000 characters.');
			Form1.txtJobDesc.focus();
			return false;
		}
	}
	
	
	if(Form1.txtPersonal.value != '')
	{
		if(Form1.txtPersonal.value.length > 2000)
		{
			alert('(Important personal characteristics) answer can be up to 2000 characters.');
			Form1.txtPersonal.focus();
			return false;
		}
	}
	
	
		if(Form1.txtPractical.value != '')
	{
		if(Form1.txtPractical.value.length > 2000)
		{
			alert('(Doesn’t seem practical) answer can be up to 2000 characters.');
			Form1.txtPractical.focus();
			return false;
		}
	}
	
	
	
		if(Form1.txtWntTodDo.value != '')
	{
		if(Form1.txtWntTodDo.value.length > 2000)
		{
			alert('(What he or she wants to do) answer can be up to 2000 characters.');
			Form1.txtWntTodDo.focus();
			return false;
		}
	}
	
			if(Form1.txtParents.value != '')
	{
		if(Form1.txtParents.value.length > 2000)
		{
			alert('(Parents help Career Services) answer can be up to 2000 characters.');
			Form1.txtParents.focus();
			return false;
		}
	}
	
return true;
}

























function showOthercat()
{
	var IndexNo = document.getElementById("ddlCat").options.length-1;
	if(document.getElementById("ddlCat").selectedIndex == IndexNo)
	{
		document.getElementById("divOther").style.visibility = "visible";
		document.getElementById("divOther").style.position = "static";
	}
	else
	{
		document.getElementById("divOther").style.visibility = "hidden";
		document.getElementById("divOther").style.position = "absolute";
	}
}
function ValidateWebDirectoryForm()
{
	var IndexNo = document.getElementById("ddlCat").options.length-1;
if(document.getElementById("ddlCat").selectedIndex == IndexNo)
{
if(Form1.txtOther.value == '')
{
	alert('Please enter category.');
	Form1.txtOther.focus();
	return false;
}
}
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	
	
	if(Form1.txtTitle.value == '')
	{
		alert('Title can not be left blank.');
		Form1.txtTitle.focus();
		return false;
	}
	if(Form1.txtTitle.value != '')
	{
		if(Form1.txtTitle.value.length > 50)
		{
			alert('Title can be up to 50 characters.');
			Form1.txtTitle.focus();
			return false;
		}
		
	}
	if(Form1.txtURL.value == '')
	{
		alert('Website URL can not be left blank.');
		Form1.txtURL.focus();
		return false;
	}
	if(Form1.txtDesc.value == '')
	{
		alert('Description can not be left blank.');
		Form1.txtDesc.focus();
		return false;
	}
	if(Form1.txtDesc.value != '')
	{
		if(Form1.txtDesc.value.length > 200)
		{
			alert('Description can be up to 200 characters.');
			Form1.txtNick.focus();
			return false;
		}
		
	}
	return true;
}
function ValidateduDirectoryForm()
{

	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	
	
	if(Form1.txtAddress.value == '')
	{
		alert('Address can not be left blank.');
		Form1.txtAddress.focus();
		return false;
	}

	if(Form1.txtPhone.value == '')
	{
		alert('Phone can not be left blank.');
		Form1.txtPhone.focus();
		return false;
	}
	if(Form1.txtURL.value == '')
	{
		alert('Website URL can not be left blank.');
		Form1.txtURL.focus();
		return false;
	}
	
	
	return true;
}
function ValidateArticleForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}



	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtArtHeading.value == '')
	{
		alert('Heading can not be left blank.');
		Form1.txtArtHeading.focus();
		return false;
	}
	
	if(Form1.txt1.value == '')
	{
		alert('Comments can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
return true;
}
function ValidateMothersDayForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}



	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtMobile.value == '')
	{
		alert('Mobile / Phone can not be left blank.');
		Form1.txtMobile.focus();
		return false;
	}
	if(Form1.txt2.value == '')
	{
		alert('Heading can not be left blank.');
		Form1.txt2.focus();
		return false;
	}
	
	if(Form1.txt1.value == '')
	{
		alert('Comments can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
return true;
}

function ValidatePoetryForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}



	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
	if(Form1.txtPoet.value == '')
	{
		alert('Poet Name can not be left blank.');
		Form1.txtPoet.focus();
		return false;
	}
	if(Form1.txtArtHeading.value == '')
	{
		alert('Heading can not be left blank.');
		Form1.txtArtHeading.focus();
		return false;
	}
	
	if(Form1.txt1.value == '')
	{
		alert('Comments can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
return true;
}



function ValidateRamadanQuizForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	
	
return true;
}


function ValidateCareerBlogForm()
{
	
if(Form1.txt1.value == '')
	{
		alert('Comments can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
return true;
}



function ValidateBlogForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}



	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	
	if(Form1.txt1.value == '')
	{
		alert('Comments can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
return true;
}










function ValidateCardForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}



	if(Form1.txtFName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtFName.focus();
		return false;
	}
	if(Form1.txtFEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtFEmail.focus();
		return false;
	}
	if(Form1.txtFEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtFEmail.focus();
			return false;
		}	
}
if(Form1.txtHText.value == '')
	{
		alert('Header text can not be left blank.');
		Form1.txtHText.focus();
		return false;
	}
return true;
}


















function ValidateVASForm()
{
if(Form1.rbHadith.checked == false && Form1.rbWord.checked == false && Form1.rbStars.checked == false)
{
		alert('Atleast Select One Service.');
		return false;
}
}

function GetHoroscope()
{

if(Form1.rbStars.checked == false)
{
	document.getElementById('ddlHoroscope').style.visibility= "hidden";
}
else
{
	document.getElementById('ddlHoroscope').style.visibility= "visible";
}
}



function ValidateBMIForm()
{
	
	if(Form1.txtft.value == '')
	{
		alert('Height can not be left blank.');
		Form1.txtft.focus();
		return false;
	}
	
		if(Form1.txtLBS.value == '')
	{
		alert('Weight can not be left blank.');
		Form1.txtLBS.focus();
		return false;
	}
	var integer = /^\d+$/;
	if(Form1.txtft.value != '')
	{
		if (window.RegExp && !integer.test(Form1.txtft.value))
		{	alert('Height can only have number value.');
			Form1.txtft.focus();
			return false;
		}
	}
	if(Form1.txInches.value != '')
	{
		if (window.RegExp && !integer.test(Form1.txInches.value))
		{	alert('Height can only have number value.');
			Form1.txInches.focus();
			return false;
		}
	}
//	if(Form1.txtLBS.value != '')
//	{
//		if (window.RegExp && !integer.test(Form1.txtLBS.value))
//		{	alert('Weight can only have number value.');
//			Form1.txtLBS.focus();
//			return false;
//		}
//	}
	
	
return true;
}


function ValidateLoginForm()
{
	
	if(Form1.txtLoginNumber.value == '')
	{
		alert('Mobile No. can not be left blank.');
		Form1.txtLoginNumber.focus();
		return false;
	}
	
		if(Form1.txtPassword.value == '')
	{
		alert('Password can not be left blank.');
		Form1.txtPassword.focus();
		return false;
	}
return true;
}

function ValidateUrduSMSForm()
{
	
	if(Form1.txtNick2.value == '')
	{
		alert('Nick can not be left blank.');
		Form1.txtNick2.focus();
		return false;
	}
	
	if(Form1.txtNick2.value != '')
	{
		if(Form1.txtNick2.value.length > 10)
		{
			alert('Nick can be up to 10 characters.');
			Form1.txtNick.focus();
			return false;
		}
		
	}
	
	if(Form1.txtNumber2.value == '')
	{
		alert('Number can not be left blank.');
		Form1.txtNumber2.focus();
		return false;
	}
	if(Form1.txt1.value == '')
	{
		alert('Message can not be left blank.');
		Form1.txt1.focus();
		return false;
	}
}

function ValidateForm()
{
	
	if(Form1.txtNick.value == '')
	{
		alert('Nick can not be left blank.');
		Form1.txtNick.focus();
		return false;
	}
	
	if(Form1.txtNick.value != '')
	{
		if(Form1.txtNick.value.length > 8)
		{
			alert('Nick can be up to 8 characters.');
			Form1.txtNick.focus();
			return false;
		}
		
	}
	
	if(Form1.txtNumber.value == '')
	{
		alert('Number can not be left blank.');
		Form1.txtNumber.focus();
		return false;
	}
	
	var integer = /^\d+$/;
	if(Form1.txtNumber.value != '')
	{
		if (window.RegExp && !integer.test(Form1.txtNumber.value))
		{	alert('Mobile can only have number value.');
			Form1.txtNumber.focus();
			return false;
		}
	}
	
	if(Form1.txtMessage.value == '')
	{
		alert('Message can not be left blank.');
		Form1.txtMessage.focus();
		return false;
	}
}

function textCounter(counter,maxlimit,linecounter) {
	// text width//
	
	var fieldWidth =  parseInt(Form1.txtMessage.offsetWidth);
	var charcnt = Form1.txtMessage.value.length;        

	// trim the extra text
	if (charcnt > maxlimit) { 
		Form1.txtMessage.value = Form1.txtMessage.value.substring(0, maxlimit);
	}

	else { 
	// progress bar percentage
	var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ;
	document.getElementById(counter).style.width =  parseInt((fieldWidth*percentage)/100)+"px";
	document.getElementById(counter).innerHTML="Limit: "+percentage+"%"
	// color correction on style from CCFFF -> CC0000
	setcolor(document.getElementById(counter),percentage,"background-color");
	}
}

function setcolor(obj,percentage,prop){
	obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";
}
function ValidateResultsForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
if(Form1.txtRollNo.value == '')
	{
		alert('Roll Number can not be left blank.');
		Form1.txtRollNo.focus();
		return false;
	}
if(Form1.txtE1.value == '')
	{
		alert('Please enter atlease one Email Address.');
		Form1.txtE1.focus();
		return false;
	}
if(Form1.txtE1.value != '')
{
		str=Form1.txtE1.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE1.focus();
			return false;
		}	
}
	if(Form1.txtE2.value != '')
{
		str=Form1.txtE2.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE2.focus();
			return false;
		}	
}
if(Form1.txtE3.value != '')
{
		str=Form1.txtE3.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE3.focus();
			return false;
		}	
}
if(Form1.txtE4.value != '')
{
		str=Form1.txtE4.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE4.focus();
			return false;
		}	
}
if(Form1.txtE5.value != '')
{
		str=Form1.txtE5.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE5.focus();
			return false;
		}	
}
if(Form1.txtE6.value != '')
{
		str=Form1.txtE6.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE6.focus();
			return false;
		}	
}
return true;
}




function ValidateSMSSubmitForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
if(Form1.txtMessage.value == '')
	{
		alert('SMS Message can not be left blank.');
		Form1.txtMessage.focus();
		return false;
	}
return true;
}

function ValidateMindGameForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
if(Form1.txtE1.value == '')
	{
		alert('Please enter atlease one Email Address.');
		Form1.txtE1.focus();
		return false;
	}
if(Form1.txtE1.value != '')
{
		str=Form1.txtE1.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE1.focus();
			return false;
		}	
}
	if(Form1.txtE2.value != '')
{
		str=Form1.txtE2.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE2.focus();
			return false;
		}	
}
if(Form1.txtE3.value != '')
{
		str=Form1.txtE3.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE3.focus();
			return false;
		}	
}
if(Form1.txtE4.value != '')
{
		str=Form1.txtE4.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE4.focus();
			return false;
		}	
}
if(Form1.txtE5.value != '')
{
		str=Form1.txtE5.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE5.focus();
			return false;
		}	
}
if(Form1.txtE6.value != '')
{
		str=Form1.txtE6.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtE6.focus();
			return false;
		}	
}
return true;
}



function ValidateQuizVerificationForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtEmail.value == '')
	{
		alert('Email can not be left blank.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
		if(Form1.txtVerify.value == '')
	{
		alert('Verification Code can not be left blank.');
		Form1.txtVerify.focus();
		return false;
	}
	
return true;
}


function ValidateQuizForm()
{
	
	if(Form1.txtName.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtName.focus();
		return false;
	}
	if(Form1.txtCity.value == '')
	{
		alert('City can not be left blank.');
		Form1.txtCity.focus();
		return false;
	}
	if(Form1.txtEmail.value == '' && Form1.txtMobile.value == '')
	{
		alert('Please enter Email or Phone/Mobile.');
		Form1.txtEmail.focus();
		return false;
	}
	if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
		alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
	
	
return true;
}




function ValidateRegForm()
{

if(Form1.txtNick.value == '')
	{
		alert('Name can not be left blank.');
		Form1.txtNick.focus();
		return false;
	}
	
	if(Form1.txtNick.value.length > 10)
{
		alert('Name can not be more than 10 characters.');
		Form1.txtNick.focus();
		return false;
}
	if(Form1.txtNumber.value == '')
	{
		alert('Mobile No. can not be left blank.');
		Form1.txtNumber.focus();
		return false;
	}
	
if(Form1.txtPass.value == '' || Form1.txtCPass.value == '')
{
		alert('Password can not be left blank.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length < 5)
{
		alert('Password too short.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length > 10)
{
		alert('Password can not be more than 10 characters.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value != Form1.txtCPass.value)
{
		alert('Password does not match.');
		Form1.txtPass.focus();
		return false;
}

	
return true;
}







//Become an Editor
function showOthercategory()
{
	var IndexNo = document.getElementById("ddlCategory").options.length-1;
	if(document.getElementById("ddlCategory").selectedIndex == IndexNo)
	{
		document.getElementById("divOther").style.visibility = "visible";
		document.getElementById("divOther").style.position = "static";
	}
	else
	{
		document.getElementById("divOther").style.visibility = "hidden";
		document.getElementById("divOther").style.position = "absolute";
	}
}
function ValidateEditorForm()
{
var IndexNo = document.getElementById("ddlCategory").options.length-1;
if(document.getElementById("ddlCategory").selectedIndex == IndexNo)
{
if(Form1.txtOther.value == '')
{
	alert('Please enter category.');
	Form1.txtOther.focus();
	return false;
}
}
if(Form1.txtFName.value == '')
{
		alert('First Name can not be left blank.');
		Form1.txtFName.focus();
		return false;
}
if(Form1.txtLName.value == '')
{
		alert('Last Name can not be left blank.');
		Form1.txtLName.focus();
		return false;
}
if(Form1.txtDisplayName.value == '')
{
		alert('Display Name can not be left blank.');
		Form1.txtDisplayName.focus();
		return false;
}
if(Form1.txtEmail.value == '')
{
		alert('Email Address can not be left blank.');
		Form1.txtEmail.focus();
		return false;
}
if(Form1.txtEmail.value != '')
{
		str=Form1.txtEmail.value;
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		
		if ((!reg1.test(str) && reg2.test(str)))
		{
			
		}	
		else
		{
			alert('Email not in a correct format.');
			Form1.txtEmail.focus();
			return false;
		}	
}
if(Form1.txtUserName.value == '')
{
		alert('Username can not be left blank.');
		Form1.txtUserName.focus();
		return false;
}
if(Form1.txtUserName.value != '')
{
	var blk = new Array(' ','.','~', '`', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '<', '>', '\,', '\"', '\'', '\\', ';', ':', '?', '|');
	var str = Form1.txtUserName.value;
	var flag=0;
	if(str.charAt(0)==1 || str.charAt(0)==2 || str.charAt(0)==3 || str.charAt(0)==4 || str.charAt(0)==5 || str.charAt(0)==6 || str.charAt(0)==7 || str.charAt(0)==8 || str.charAt(0)==9 || str.charAt(0)==0)
	{
		alert("Username should begin with alphabet.");
		Form1.txtUserName.focus();
		return false;
	}
	else
	{
		for(i=0;i<=str.length-1;i++)
		{
		
			for (j=0;j<=blk.length-1;j++)
			{
				if(str.charAt(i)==blk[j])
				flag=1;
			}
		}
		if(flag==1)
		{
			alert("Only '-' can be used in Username.");
			Form1.txtUserName.focus();
			return false;
		}
	}	
}
if(Form1.txtPass.value == '' || Form1.txtCPass.value == '')
{
		alert('Password can not be left blank.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value.length < 6)
{
		alert('Password too short.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.txtPass.value != Form1.txtCPass.value)
{
		alert('Password does not match.');
		Form1.txtPass.focus();
		return false;
}
if(Form1.chkTerms.checked == false)
{
		alert('Please read and accept the terms to submit this form.');
		Form1.chkTerms.focus();
		return false;
}
}
function CheckAvalability(){
	if(Form1.txtUserName.value == "")
	{
			var lnk ='checkavalability.aspx';
	}
	else
	{
			var lnk ='checkavalability.aspx?id='+Form1.txtUserName.value;
	}
		
	var width = 390;
	var height = 120;
	var x = ((screen.width / 2) - (width/2));
	var y = ((screen.height / 2) - (height/2));
	window.open(lnk, "FindRef", "width=" + width + ",height=" + height + ",left=" + x + ",top=" + y + ",directories=no,location=no,menubar=no,personalbar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
	}
	//end Become Editor