// JavaScript Document
function confirmsubmit()
{
	var condition=true;
	if(document.change.old_password.value.length==0)
	{
		alert("Please enter old password.");
		if(condition==true)
		{
			document.change.old_password.focus();
		}
		condition=false;
		return false;
	}
	if(document.change.new_password.value.length==0)
	{
		alert("Please enter new password.");
		if(condition==true)
		{
			document.change.new_password.focus();
		}
		condition=false;
		return false;
	}
	if(document.change.confirm_password.value.length==0)
	{
		alert("Please confirm your new password.");
		if(condition==true)
		{
			document.change.confirm_password.focus();
		}
		condition=false;
		return false;
	}
	if(document.change.new_password.value != "" && document.change.confirm_password.value != "" ) 
	{
		if(document.change.new_password.value == document.change.confirm_password.value)
		{
			return true;
		}
		else
		{
			alert("New Password string and Confirm New Password string does not match.");
			return false;
		}
	}

}
function charRemaining(tField, nField, maxAllowed) {
	if (tField.value.length > maxAllowed) {
		tField.value = tField.value.substring(0, maxAllowed);
	}
	nField.value = maxAllowed - tField.value.length;
}

function checkForm(theForm) {
	if (theForm['EN.ptt_headline'].value == '') {
		if (!validRequired(theForm['EN.ptt_headline'],'Error 14: Please enter a property advertisement headline.')) {
			return false;
		}
	}
	return true;
}

if (window != window.top) top.location.href = location.href;

