    function checkEmail(xField)
	{
		//xword=split(xField,"@")
		//alert(xword(0));
		var check, atPos, dotPos, strLen, cut1, cut2, cut3;
		strLen	=	xField.length;
		atPos	=	xField.indexOf("@");
		cut4	=	xField.slice(atPos);
	    strLendot	=	cut4.length;
		dotPos	=	cut4.indexOf(".");	
		cut1	=	xField.slice(0,atPos);
		cut2	=	cut4.slice(dotPos);
		cut3	=	cut4.slice(dotPos + 1,strLendot);
		//alert("cut1=  "+cut1+" cut2 - "+cut2+" cut3 - "+cut3+" cut4 - "+cut4);
		ix = cut3.indexOf(",");
		check = true;
		if ( atPos < 2 )
		{
			 check = false;
		}
		else if ( (!isNaN(cut1)) || (!isNaN(cut2)) || (!isNaN(cut3)))
		{
			check = false;
		}
		else if ( (!specialCheck(cut1)) || (!specialCheck(cut2)) || (!specialCheck(cut3))  || ix >= 0)
		{
			check = false;
		}
		else if ( atPos < 1 )
		{
			check = false;
		}
	return check;
	}
// FUNCTION FOR FINDING BLANK SPACE 
	function spaceCheck(xField)
	{
		var check, i;
		check = true;
		i = xField.indexOf(" ");
		if ( i != -1 )
		{
		check = false;
		}
	return check;	
	}
// FUNCTION FOR FINDING LENGTH	
	function lengthTeller(xField)
	{
	var teller;
		teller = xField.length;
	return teller;		
	}
// FUNCTION FOR CHECKING SPECIAL CHARACTERS
	function specialCheck(xField)
	
	{
	var strSpecial, check;
		check = true;
		i = xField.length;
		
		for( j =0;j<=i;j++ )
		{
			pos = xField.charAt(j);
			
			if ( pos == "~" || pos == "'" || pos == "!" || pos == "$")
			{
			check = false;
			}
			else if ( pos == "@" || pos == "[" || pos == "]" || pos == "#" || pos == "%" || pos == "^")
			{
			check = false;
			}
			else if ( pos == "*" || pos == " " || pos == "{" || pos == "}" || pos == ";")
			{
			check = false;
			}
			else if ( pos == ":" ||  pos == "|" || pos == "<")
			{
			check = false;
			}
		}
	return check;		
	}
	function absSpcheck(xVal)
	{
		var strSpecial, check;
		check = true;
		i = xVal.length-1;
		
		for( j =0;j<=i;j++ )
		{
		pos = xVal.charAt(j);
		if ( pos < '0' || (pos > '9' && pos <  'A') || (pos > 'Z' && pos < 'a' && pos != '_' ) ||  pos > 'z' )
			{
			check = false;
			}
		}
	return check;					
	}
	// FUNCTION FOR CLEAR FORM
	function callClear(clereg)
	{
		var check;
		check = false;
		if (confirm("Are you sure to clear this form"))
		{
		clereg.reset();
		check = true;
		}
	return check;			
	}
function textfocus()
{
document.frm.uname.value="";
}
function emailfocus()
{
document.frm.email.value="";
}
function email1focus()
{
document.frm.email1.value="";
}
function email2focus()
{
document.frm.email2.value="";
}
function email3focus()
{
document.frm.email3.value="";
}