//-----------------------------------------Date Calender Start From Here------------------




//-----------------------------------------Date Calender Ends Here------------------------


function Verification(node)
{

	txtChk=new String(node.value)

	if((txtChk.search("'"))>=0)
	{
		alert("Special Characters (') not allowed!!!");
		node.focus();
		return false;
	}
	
	if((txtChk.search(";"))>=0)
	{
		alert("Special Characters (;) not allowed!!!");
		node.focus();
		return false;
	}
	if((txtChk.search("--"))>=0)
	{
		alert("Special Characters (--) not allowed!!!");
		node.focus();
		return false;
	}
	if((txtChk.search("="))>=0)
	{
		alert("Special Characters (=) not allowed!!!");
		node.focus();
		return false;
	}
	if(((txtChk.search("like'"))>=0) || ((txtChk.search("like '"))>=0))
	{
		alert("Special Characters not allowed!!!");
		node.focus();
		return false;
	}	
	return true;
	
}


function IsValidDate(strDt)
{
    var newDt=new String(strDt.value);
    
    var seperator="/";
    if(newDt.length>0)
    {
        var pos_1=newDt.indexOf(seperator,1);
        var pos_2=newDt.indexOf(seperator,pos_1+1);
        var pos_3=newDt.indexOf(seperator,pos_2+1);
        
        if(pos_3!=-1)
        {
            alert("Invalid Date");
            strDt.focus();
            return;
        }
        if(pos_1 ==-1 || pos_2==-1 )
        {
            alert("Invalid Date");
            strDt.focus();
            return;
        }
        
        
        var dt_array=new Array();
        dt_array=newDt.split("/");
        
        var currdt=new Date(dt_array[1]+"/"+dt_array[0]+"/"+dt_array[2]);
        if(dt_array[1]!= (currdt.getMonth()+1))
        {
            alert("Invalid Date");
            strDt.focus();  
            return;  
        }
        if (dt_array[0]!= (currdt.getDate()))
        {
            alert("Invalid Date");
            strDt.focus();  
            return;  
        }
        if (dt_array[2]!= (currdt.getFullYear()))
        {
            alert("Invalid Date");
            strDt.focus(); 
            return;   
        }        
    }
    
}

function CheckRePassword(passNode,retypeNode)
{
	if(passNode.value!=retypeNode.value)
	{
		alert('Password Doesn\'t Match');
		retypeNode.focus();
		return false;
	}
	return true;
}
