function isDate(day,month,year)
{
		//alert(day+"-"+month+"-"+year);
		switch(parseInt(month)){
			
			case 2:{
				if(isLeapYear(year)){
					if(day<=29) return true;
					else return false;
				}else{
					if(day<=28)	return true;
					else return false;
				}
				break;	
			}
			case 4: case 6: case 9: case 11:{
				if(day<=30)	return true;
				else return false;
				break;
			}
			default:{
				return true;
				break;
			}
		}
		//end if switch
		return true;
}
function isLeapYear (year) {
	return ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)));
}
function error(obj,msg)
{
	alert(msg);
	obj.focus();
	return false;
}

String.prototype.trim = function()  
{ 
	return this.replace(/^\s+|\s+$/g, ''); 
};

function isValidEmail(email_id) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email_id))
	return (true)
	else
	return false;
}
function isValidPosition(position) {
	var re = /([A-Za-z]*)/g;
    var arr = re.exec(position);
    s = "The string used for the match was "+arr.index + "="+arr.lastIndex;

alert(s);
	
}

/* <<<<<<< function to make Ajax Request >>>>>>
  <<<<<<< Returns response text >>>>>>>>>>>>>> */

function xmlsendRequest(url){

	try { 
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	} 
	catch (e) { 
	   try { 
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	   } 
	   catch (E) { 
		xmlhttp = false; 
	   } 
  }

  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')  
	xmlhttp = new XMLHttpRequest(); 

	xmlhttp.open("GET", url,false); 

	if(document.all)
		xmlhttp.send();
	else
		xmlhttp.send(null);

	return xmlhttp.responseText;
}
/* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> */
