/**************************************************************************************/
/**********************************/
/* Use for Date validation */
/**********************************/ 
/**************************************************************************************/
/* Use for checking if strings collectively confirm to a valid date *******************/

function isDate(nDY,nMN,nYR)
{
	if(isNumber(nMN)==false || isNumber(nDY)==false || isNumber(nYR)==false)
	{
		alert('Please select a valid date.');
		return false;
	}
	if(nMN.length==0 || nDY.length==0 || nYR.length==0)
	{
		alert('Please select a valid date.');
		return false;
	}
	if(nMN == 2)
	{
		if(nDY > 28)
		{
			if(nYR%4 != 0 && nYR != 2000)
			{
				alert("Feb can have max 28 days.");
				return false;
			}
			else
			{
				if(nDY > 29)
				{
					alert("Leap year,Feb can have max 29 days.");
					return false;   
				}
			}  
		}  
	}

	if(nMN != 1 ||nMN != 2 ||nMN != 3 ||nMN != 5 ||nMN != 7 ||nMN != 8 ||nMN != 10 ||nMN != 12)
	{   
		if(nMN == 4 ||nMN == 6 ||nMN == 9 ||nMN == 11)
		{ 
			if(nDY > 30)
			{
				alert("Invalid date. Should be 30 or less");
				return false;
			}
		}
	}
	return true;
}

/**************************************************************************************/ 
/* Use for checking if form fields collectively confirm to a valid date ***************/

function isFieldDate(ThisDay, ThisMonth, ThisYear)
{
	if(isDate(ThisDay.value, ThisMonth.value, ThisYear.value)==false)
	{
		ThisDay.focus();
		return false;
	}
	else
		return true;
}


/**********************************/
/* Use for Number validation */
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains only numbers ***********************************/

function isNumber(ThisObject)
{
	if(ThisObject.length== 0)
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if ("0123456789".indexOf(ThisObject.charAt(i))== -1) 
			return false; 

	return true; 
} 

/**************************************************************************************/ 
/* Use for checking if form field contains only numbers *******************************/

function isFieldNumber(ThisObject)
{
	if(isNumber(ThisObject.value) == false)
	{
		alert('Please enter only numbers.');
		ThisObject.focus();
		return false;
	}
	else
		return true;
}


/**********************************/
/* Use for Real Number validation */
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains real numbers ***********************************/

function isReal(ThisObject)
{
	if(ThisObject.length== 0)
		return false;

	for(var i=0, dotcount=0; i< ThisObject.length; i++) 
	{
		if ("0123456789.".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
		if (ThisObject.charAt(i) == ".")
			dotcount++;
	}
	
	if (dotcount > 1)
		return false;
	
	return true; 
} 

/**************************************************************************************/ 
/* Use for checking if form field contains real numbers *******************************/

function isFieldReal(ThisObject)
{
	if(isReal(ThisObject.value) == false)
	{
		alert('Please enter only numbers.');
		ThisObject.focus();
		return false;
	}
	else
		return true;
}


/**********************************/
/* Use for Phone Number validation*/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains a phone number *********************************/

function isPhoneNumber(ThisObject)
{ 
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
	{
		if("0123456789()- ".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
	}
	
	return true; 
}

/**************************************************************************************/
/* Use for checking if form field contains a phone number *****************************/

function isFieldPhoneNumber(ThisObject)
{
	if(isPhoneNumber(ThisObject.value)==false)
	{
		alert('Please enter a valid Phone Number');
		ThisObject.focus();
		return false;
	}
	else 
		return true;
}


/**********************************/
/* Use for Alphabet validation ****/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains only alphabets *********************************/

function isAlpha(ThisObject)
{ 
if (ThisObject.length == 0) 
	return false;

for (var i=0; i< ThisObject.length; i++) 
	if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ThisObject.charAt(i))== -1) 
		return false; 
return true; 
}

function isAlphaSpace(ThisObject)
{ 
if (ThisObject.length == 0) 
	return false;

for (var i=0; i< ThisObject.length; i++) 
	if ("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ThisObject.charAt(i))== -1) 
		return false; 
return true; 
}

/**************************************************************************************/
/* Use for checking if form field contains only alphabets *****************************/

function isFieldAlpha(ThisObject)
{
	if(isAlpha(ThisObject.value)==false)
	{
		alert('Please enter only alphabets');
		ThisObject.focus();
		return false;
	}	
	else
		return true;
}

function isFieldAlphaSpace(ThisObject)
{
	if(isAlphaSpace(ThisObject.value)==false)
	{
		alert('Please enter alphabets.');
		ThisObject.focus();
		return false;
	}	
	else
		return true;
}


/**********************************/
/* Use for EmailId validation *****/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains a valid EmailId ********************************/

function isEmail(ThisObject)
{ 
	var bFlag1 = false;
	var bFlag2 = false;
	var bFlag3 = false;
	
	if(ThisObject.length == 0) 
		return false;
	
	for(var i=0; i< ThisObject.length; i++) 
		if("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_-.".indexOf(ThisObject.charAt(i))== -1) 
			return false; 

	for(var i=0; i< ThisObject.length; i++) 
	{
		if("@".indexOf(ThisObject.charAt(i))!= -1) 
			bFlag1=true;
		if(".".indexOf(ThisObject.charAt(i))!= -1) 
			bFlag2=true;
		if(ThisObject.indexOf("@.")<0)
			bFlag3=true;
	}
	
	if((bFlag1 == false) || (bFlag2 == false) || (bFlag3 == false))
		return false; 
	else
		return true;
}

/**************************************************************************************/
/* Use to check if a form field contains valid Emailid ********************************/

function isFieldEmail(ThisObject)
{
	if ( isEmail(ThisObject.value)==false )
	{
	//	alert('Please valid email address.');
		ThisObject.focus();
		return false; 
	}
	else
		return true;
}


/**********************************/
/* Use for Ascii validation *******/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains all ascii characters ***************************/

function isAscii(ThisObject)
{ 
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if("012346789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*()_+|\=-<>?:{}][';/., ".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
	
	return true; 
}

/**************************************************************************************/
/* Use for checking if form fields contains all ascii characters **********************/

function isFieldAscii(ThisObject)
{
	if(isAscii(ThisObject.value)==false)
	{
		alert('Please enter ascii characters only.');
		ThisObject.focus();
		return false; 
	}
	else
		return true;
}


/***********************************/
/* Use for Alpha-Numeric validation*/
/***********************************/ 
/**************************************************************************************/
/* Use for checking if string contains alpha-numeric characters ***********************/
/* Use for pwd and login  **********/

function isAlphanumeric(ThisObject)
{  
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if("-_$'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
    
	return true; 
	
}

function isValidPass(ThisObject)
{  
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
    
	return true; 
	
}

/*************************************************************************************************/
/*Use for checking if form field is alphanumeric*/

function isFieldAlphanumeric(ThisObject)
{  
	if(isAlphanumeric(ThisObject.value)==false)
	{
		alert('Please enter alphanumeric characters only.');
		ThisObject.focus();
		return false; 
	}
	else
		return true;
	
}
/**************************************************************************************/


function isAlphanumericSpace(ThisObject)
{  
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if(" -_$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(ThisObject.charAt(i))== -1) 
			return false; 
    
	return true; 
	
}
/*************************************************************************************************/
/*Use for checking if form field is alphanumeric*/

function isFieldAlphanumericSpace(ThisObject)
{  
	if(isAlphanumericSpace(ThisObject.value)==false) 
	{
		alert('Please enter alphanumeric characters only.');
		ThisObject.focus();
		return false; 
	}
	else
		return true;
	
}
/**************************************************************************************/


/**********************************/
/* Use for single quote validation*/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains a single quote *********************************/
/* Use for pwd and login  *********/

function hasSingleQuote(ThisObject)
{ 
	for(var i=0; i< ThisObject.length; i++) 
		if("'".indexOf(ThisObject.charAt(i))== -1) 
			return true; 

	return false; 
}

/**************************************************************************************/
/* Use for checking if form field contains a single quote *****************************/

function hasFieldSingleQuote(ThisObject)
{
	if(hasSingleQuote(ThisObject.value)==false)
	{
		alert('Please do not enter single quotes.');
		ThisObject.focus();
		return false; 
	}
	else 
		return true;
}



/**********************************/
/* Use for spaces validation ******/
/**********************************/ 
/**************************************************************************************/
/* Use for checking if string contains only spaces ************************************/


function hasOnlySpaces(ThisObject)
{ 
	for(var i=0, count=0; i< ThisObject.length; i++) 
	{
		if(" ".indexOf(ThisObject.charAt(i)) == 0)
			count++;
	}
	if(count == ThisObject.length)
		return true;
	return false; 
}

/**************************************************************************************/
/* Use for checking if form field contains a single quote *****************************/

function hasFieldOnlySpaces(ThisObject)
{
	if(hasOnlySpaces(ThisObject.value)==true)
	{
		//alert('You have entered spaces only. Please enter valid characters.');
		ThisObject.value = "";
		ThisObject.focus();
		return false; 
	}
	else 
		return true;
}


/***************************************************/
/* Use for compulsary or required field validation */
/***************************************************/ 
/**************************************************************************************/
/* Use for checking if string is empty  ***********************************************/
/* Use for compulsary or required fields */

function isEmpty(ThisObject)
{
	if(ThisObject.length == 0)
		return false;
	else
		return true;
}


/**************************************************************************************/
/* Use for checking if form field is empty  *******************************************/

function isFieldEmpty(ThisObject)
{
	if(isEmpty(ThisObject.value) == false)
	{
		//alert('Please do not leave blank any required field marked with *.');
		ThisObject.focus();
		return false;
	}
	else
		return true;
}

/* ** ** Added by Raj Sohoni on 23 Jan 2001 */

/**************************************************************************************/
/* Removes all characters which appear in string bag from string s  *******************************************/

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }

    return returnString;
}



/**************************************************************************************/
/* Removes all whitespace characters from s  *******************************************/

function stripWhitespace(s)
{
	var whitespace = " \t\n\r";
	return stripCharsInBag(s, whitespace);
}



/**************************************************************************************/
/* Removes all whitespace characters from s  *******************************************/

function stripFieldSpaces(ThisObject)
{
	ThisObject.value = stripWhitespace(ThisObject.value);
	return true;
}
/* ** ** Added by Raj Sohoni on 23 Jan 2001 */

/**************************************************************************************/
/* Removes all double quotes characters from s  *******************************************/

function stripDoubleQuotes(s)
{
	var doublequote = "\"";
	return stripCharsInBag(s, doublequote);
}



/**************************************************************************************/
/* Removes all double quotes characters from s  *******************************************/

function stripFieldDoubleQuotes(ThisObject)
{
	ThisObject.value = stripDoubleQuotes(ThisObject.value);
	return true;
}
/* ** ** Added by Raj Sohoni on 11 Feb 2001 */
/**************************************************************************************/
/* Use for checking if string contains only numbers and single quotes***********************************/

function isNumeric(ThisObject)
{
	if(ThisObject.length== 0)
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if ("0123456789".indexOf(ThisObject.charAt(i))== -1) 
			return false; 

	return true; 
} 
var DateError = "Please select a vaild date.";

/*----------------------------------------------------------------------------------------------------------
	checkDate : checks if the date enetered is valid

	value is the date string

	return value : true if date is valid 
  ----------------------------------------------------------------------------------------------------------
*/
function checkDate(value) 
{
	var dateStr = value;
	// dateStr must be of format month day year with either slashes
	// or dashes separating the parts. Some minor changes would have
	// to be made to use day month year or another format.
	// This function returns true if the date is valid.

	var slash1 = dateStr.indexOf("/");
	if (slash1 == -1) 
	{ 
		slash1 = dateStr.indexOf("-"); 
	}
	// if no slashes or dashes, invalid date
	if (slash1 == -1)
	{ 
		return false; 
	}
	var dateMonth = dateStr.substring(0, slash1);
	var dateMonthAndYear = dateStr.substring(slash1+1, dateStr.length);
	var slash2 = dateMonthAndYear.indexOf("/");
	if (slash2 == -1) 
	{ 
		slash2 = dateMonthAndYear.indexOf("-"); 
	}
	// if not a second slash or dash, invalid date
	if (slash2 == -1) 
	{ 
		return false; 
	}
	var dateDay = dateMonthAndYear.substring(0, slash2);
	var dateYear = dateMonthAndYear.substring(slash2+1, dateMonthAndYear.length);
	if ( (dateMonth == "") || (dateDay == "") || (dateYear == "") ) 
	{ 
		return false; 
	}
	// if any non-digits in the month, invalid date
	for (var x=0; x < dateMonth.length; x++) 
	{
		var digit = dateMonth.substring(x, x+1);
		if ((digit < "0") || (digit > "9")) 
		{ 
			return false; 
		}
	}
	// convert the text month to a number
	var numMonth = 0;
	for (var x=0; x < dateMonth.length; x++) 
	{
		digit = dateMonth.substring(x, x+1);
		numMonth *= 10;
		numMonth += parseInt(digit);
	}
	if ((numMonth <= 0) || (numMonth > 12)) 
	{ 
		return false; 
	}
	// if any non-digits in the day, invalid date
	for (var x=0; x < dateDay.length; x++) 
	{
		digit = dateDay.substring(x, x+1);
		if ((digit < "0") || (digit > "9")) 
		{ 
			return false; 
		}
	}
	// convert the text day to a number
	var numDay = 0;
	for (var x=0; x < dateDay.length; x++) 
	{
		digit = dateDay.substring(x, x+1);
		numDay *= 10;
		numDay += parseInt(digit);
	}
	if ((numDay <= 0) || (numDay > 31)) 
	{ 
		return false; 
	}
	// February can't be greater than 29 (leap year calculation comes later)
	if ((numMonth == 2) && (numDay > 29)) 
	{ 
		return false; 
	}
	// check for months with only 30 days
	if ((numMonth == 4) || (numMonth == 6) || (numMonth == 9) || (numMonth == 11)) 
	{
		if (numDay > 30) 
		{ 
			return false; 
		}
	}
	// if any non-digits in the year, invalid date
	for (var x=0; x < dateYear.length; x++) 
	{
		digit = dateYear.substring(x, x+1);
		if ((digit < "0") || (digit > "9")) 
		{ 
			return false; 
		}
	}
	// convert the text year to a number
	var numYear = 0;
	for (var x=0; x < dateYear.length; x++) 
	{
		digit = dateYear.substring(x, x+1);
		numYear *= 10;
		numYear += parseInt(digit);
	}
	// Year must be a 2-digit year or a 4-digit year
	if ( (dateYear.length != 2) && (dateYear.length != 4) ) 
	{ 
		return false; 
	}
	// if 2-digit year, use 50 as a pivot date
	if ( (numYear < 50) && (dateYear.length == 2) ) 
	{ 
		numYear += 2000; 
	}
	if ( (numYear < 100) && (dateYear.length == 2) ) 
	{ 
		numYear += 1900; 
	}
	if ((numYear <= 0) || (numYear > 9999)) 
	{ 
		return false; 
	}
	if (numYear < 1753)
	{ 
		DateError = "Please select a date after the year 1753.";
		return false; 
	}

	// check for leap year if the month and day is Feb 29
	if ((numMonth == 2) && (numDay == 29)) 
	{
		var div4 = numYear % 4;
		var div100 = numYear % 100;
		var div400 = numYear % 400;
		// if not divisible by 4, then not a leap year so Feb 29 is invalid
		if (div4 != 0) 
		{ 
			return false; 
		}
		// at this point, year is divisible by 4. So if year is divisible by
		// 100 and not 400, then it's not a leap year so Feb 29 is invalid
		if ((div100 == 0) && (div400 != 0)) 
		{ 
			return false; 
		}
	 }

	 // date is valid
	return true;
}


/*----------------------------------------------------------------------------------------------------------
	checkDateField : checks if the date entered in the form field is valid and 
			     shows an alert if it is invalid.

	field is the form field in which user enters date

	return value : true if date is in valid format else false
  ----------------------------------------------------------------------------------------------------------
*/
function checkDateField(field)
{
	if(checkDate(field.value) == false)
	{
		alert(DateError);
		field.focus();
		return false;
	}
}

/*----------------------------------------------------------------------------------------------------------
	checkDate3Fields : checks if the date entered in the 3 form fields is valid and 
			     shows an alert if it is invalid.

	field1 is the form field in which user enters month (mm)
	field2 is the form field in which user enters day  (dd)
	field3 is the form field in which user enters year (yyyy)

	return value : true if date is in valid format else false
  ----------------------------------------------------------------------------------------------------------
*/
function checkDate3Fields(field1, field2, field3)
{
	if(checkDate(field1.value + '/' + field2.value + '/' + field3.value) == false)
	{
		alert(DateError);
		field1.focus();
		return false;
	}
}

function checkTextArea(value, maxLength)
{
	if(maxLength == '')
		maxLength=300;

	var textLength = value.length;

	if(textLength >= maxLength)
	{
		TextAreaError = "The text you have entered contains " + textLength + " characters including blank spaces and line breaks."
		TextAreaError += " Please limit the text to " + maxLength + " characters";
		return false;
	}

	return true;
}
var EmptyError;

/*----------------------------------------------------------------------------------------------------------
	checkNotEmpty    : checks if the value entered if empty or not 

	value is the entered string

	return value : true if value is not empty
  ----------------------------------------------------------------------------------------------------------
*/
function checkNotEmpty(value)
{
	if(value.length == 0)
	{
		EmptyError = "Please enter a value in the empty field";
		return false;
	}

	return true;
}

/*----------------------------------------------------------------------------------------------------------
	checkNotEmptyField : checks if the value entered in the form field is empty or not and 
			     shows an alert if it is empty.

	field is the form field in which user enters value
	fieldName is the Caption of the form field use to display in the alert

	return value : true if value is not empty
  ----------------------------------------------------------------------------------------------------------
*/
function checkNotEmptyField(field, fieldName)
{
	if(checkNotEmpty(field.value) == false)
	{
		alert(EmptyError + " " + fieldName + " .");
		field.focus();
		return false;
	}
}

function checkPassword(value)
{
	if(value.length == 0)
	{
		PasswordError = "Please enter your Password.";
		return false;
	}

	var illegalChars = /[\W_]/; // allow only letters and numbers

	if ((value.length <6) || (value.length > 16)) 
	{
		PasswordError = "Your Password can be only 6-16 characters long.";
		return false;

	}
	else if (illegalChars.test(value)) 
	{
		PasswordError = "Any of the characters [',\",%,$,#,@,&,*,(,),_] including blank spaces are not allowed in your password.";
		return false;
	}
	
	return true;
}

function checkPasswordFieldMatch(field1, field2)
{
	if(checkPassword(field1.value) == false)
	{
		alert(PasswordError);
		field1.focus();
		return false;
	}

	PasswordType = "Confirm Password";

	if(checkPassword(field2.value) == false)
	{
		alert(PasswordError);
		field2.focus();
		return false;
	}

	if(field1.value != field2.value)
	{
		alert("Your Password and Confirm Password do not match. Please enter them again.");
		field1.value = '';
		field2.value = '';
		field1.focus();
		return false;
	}

}

/***********************************************************************************************************
	Check Email functions ie + ns4 + ns6 compatible
	Written by Rajesh Sohoni on 09/03/2003
  **********************************************************************************************************
*/

var EmailError;

/*----------------------------------------------------------------------------------------------------------
	checkEmail : checks if the emailid is enetered in valid format
	Valid format  : 1. Special characters such as <!-- ',%,$,#,&,*,(,)] -->, etc are invalid.

	value is the emailid string

	return value : true if emailid is in valid format else false
  ----------------------------------------------------------------------------------------------------------
*/
function checkEmail(value)
{
	var bFlag1 = false;
	var bFlag2 = false;

	if(value.length == 0)
	{
		EmailError = "Please enter your email id.";
		return false;
	}

	if(value.length < 7)
	{
		EmailError = "Please enter a valid email id.";
		return false;
	}

	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if(!filter.test(value))
	{
		EmailError = "Please enter a valid email id";
		return false;
	}

	for(var i=0; i< value.length; i++)
	{
		if("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_-. ".indexOf(value.charAt(i)) == -1)
		{
			EmailError = "Any of the characters [',\",%,$,#,&,*,(,)] including blank spaces are not allowed in your emailid.";
			return false;
		}

		if("@".indexOf(value.charAt(i)) != -1)
			bFlag1=true;

		if(".".indexOf(value.charAt(i)) != -1)
			bFlag2=true;
	}

	if((bFlag1 == false) ||  (bFlag2 == false))
	{
		EmailError = "Please make sure your emailid has both the characters '@' and '.'(dot).";
		return false;
	}

	return true;
}

/*----------------------------------------------------------------------------------------------------------
	checkEmailField : checks if the email entered in the form field is in valid format and
			     shows an alert if it is invalid.

	field is the form field in which user enters emailid

	return value : true if emailid is in valid format else false
  ----------------------------------------------------------------------------------------------------------
*/
function checkEmailField(field)
{
	if(checkEmail(field.value) == false)
	{
		alert(EmailError);
		field.focus();
		return false;
	}
}


// --------------------------------------------------------------------
// ******************** Created by Mahesh Dhinge ******************* /
// ******************** Created on Friday 19 May 2006 ************** /
// --------------------------------------------------------------------

/**********************************/
/* Use for password validation */
/**********************************/ 
/**************************************************************************************/
/* Use for checking the following characters to be in the string *********************************/

function isPasswordInclude(ThisObject)
{ 
	if(ThisObject.length == 0) 
		return false;

	for(var i=0; i< ThisObject.length; i++) 
		if("!@#$%^&*+;:".indexOf(ThisObject.charAt(i))== -1) 
			return false; 

	return true; 
}

/**************************************************************************************/
/* Use for checking if form field contains a password *****************************/

function isFieldPasswordInclude(ThisObject)
{
	if(isPasswordInclude(ThisObject.value)==false)
	{
		//alert('Please enter a valid Phone Number');
		ThisObject.focus();
		return false;
	}
	else 
		return true;
}
