function CheckString(strText) 
{
var x; 
var y; 
var R;
x=strText.length
y=strText.charAt(0)
if(strText=='' || strText==null || y==' ' || strText.indexOf('\'')!=-1 || strText.indexOf('^')!=-1 || strText.indexOf(';')!=-1 || strText.indexOf('\\')!=-1 || strText.indexOf('\/')!=-1 || strText.indexOf('=')!=-1 || strText.indexOf(',')!=-1 || strText.indexOf(':')!=-1 || strText.indexOf('}')!=-1 || strText.indexOf('{')!=-1 || strText.indexOf(']')!=-1 || strText.indexOf('[')!=-1 || strText.indexOf('(')!=-1 || strText.indexOf(')')!=-1 || strText.indexOf('\"')!=-1 || strText.indexOf('$')!=-1)
{
R=0
}
else
{
R=1
}
return R
}

function CheckEmail(strText) 
{
var L;
var x; 
var y; 
var R;
L=strText.length
x=strText.indexOf("@")
y=strText.indexOf(".")
if(L>(y+2) && x>0 && y>0)
{
R=1
}
else
{
R=0
}
return R
}


function CheckstrDate(strText) 
{
var L;
var x; 
var y; 
var R;
R=0
L=strText.length
if(L>7)
{
x=new Date()
x=strText;
y=x.getDate()
if(y>0)
{
	R=1
}
}
return R
}




function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}


function makeArray(n) {
   for (var i = 1; i <= n; i++) {
      this[i] = 0
   } 
   return this
}

var daysInMonth = makeArray(12);
daysInMonth[1] = 31;
daysInMonth[2] = 29;   // must programmatically check this
daysInMonth[3] = 31;
daysInMonth[4] = 30;
daysInMonth[5] = 31;
daysInMonth[6] = 30;
daysInMonth[7] = 31;
daysInMonth[8] = 31;
daysInMonth[9] = 30;
daysInMonth[10] = 31;
daysInMonth[11] = 30;
daysInMonth[12] = 31;



function daysInFebruary(year)
{   // February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (  ((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0) ) ) ? 29 : 28 );
}



function CheckDate(year, month, day)
{   
    var intYear = parseInt(year);
    var intMonth = parseInt(month);
    var intDay = parseInt(day);

	if (intDay > 31 || intDay < 1) return 0;
	if (intYear > 2000 || intYear < 1920) return 0;
	if (intMonth > 12 || intMonth < 1) return 0;

    if (intDay > daysInMonth[intMonth]) return 0; 

    if ((intMonth == 2) && (intDay > daysInFebruary(intYear))) return 0;

    return 1;
}