﻿var ctlUTF;   
function ConvertUTF(oVal)
{   

objValue=document.getElementById(oVal).value;
ctlUTF= objValue   
ctlUTF = ctlUTF.replace(/B/g, "க்ஷ");
ctlUTF = ctlUTF.replace(/Bh/g, "க்ஷா");
ctlUTF = ctlUTF.replace(/iB/g, "க்ஷை");
ctlUTF = ctlUTF.replace(/ø/g, "க்ஷி");
ctlUTF = ctlUTF.replace(/ì/g, "க்ஷீ");
ctlUTF = ctlUTF.replace(/B&/g, "க்ஷு");
ctlUTF = ctlUTF.replace(/B\]/g, "க்ஷூ");
ctlUTF = ctlUTF.replace(/bB/g, "க்ஷெ");
ctlUTF = ctlUTF.replace(/nB/g, "க்ஷே");
ctlUTF = ctlUTF.replace(/bBh/g, "க்ஷொ");
ctlUTF = ctlUTF.replace(/nBh/g, "க்ஷோ");
ctlUTF = ctlUTF.replace(/bBs/g, "க்ஷௌ");
ctlUTF = ctlUTF.replace(/º/g, "க்ஷ்");  
 
ctlUTF = ctlUTF.replace(/b#s/g, "ஜௌ");
ctlUTF = ctlUTF.replace(/n#h/g, "ஜோ");
ctlUTF = ctlUTF.replace(/b#h/g, "ஜொ");
ctlUTF = ctlUTF.replace(/#h/g, "ஜா");
ctlUTF = ctlUTF.replace(/Í/g, "ஜி");
ctlUTF = ctlUTF.replace(/é/g, "ஜீ");
ctlUTF = ctlUTF.replace(/#&/g, "ஜு");
ctlUTF = ctlUTF.replace(/#]/g, "ஜூ");
ctlUTF = ctlUTF.replace(/b#/g, "ஜெ");
ctlUTF = ctlUTF.replace(/n#/g, "ஜே");
ctlUTF = ctlUTF.replace(/i#/g, "ஜை");
ctlUTF = ctlUTF.replace(/{/g, "ஜ்");
ctlUTF = ctlUTF.replace(/#/g, "ஜ");////////555





ctlUTF = ctlUTF.replace(/bfs/g, "கௌ");
ctlUTF = ctlUTF.replace(/nfh/g, "கோ");
ctlUTF = ctlUTF.replace(/bfh/g, "கொ");
ctlUTF = ctlUTF.replace(/fh/g, "கா");
ctlUTF = ctlUTF.replace(/»/g, "கி");
ctlUTF = ctlUTF.replace(/Ñ/g, "கீ");
ctlUTF = ctlUTF.replace(/F/g, "கு");
ctlUTF = ctlUTF.replace(/T/g, "கூ");
ctlUTF = ctlUTF.replace(/bf/g, "கெ");
ctlUTF = ctlUTF.replace(/nf/g, "கே");
ctlUTF = ctlUTF.replace(/if/g, "கை");
ctlUTF = ctlUTF.replace(/¡/g, "க்");
ctlUTF = ctlUTF.replace(/f/g, "க");//////555

ctlUTF = ctlUTF.replace(/b‡s/g, "ஙௌ");
ctlUTF = ctlUTF.replace(/n‡h/g, "ஙோ");
ctlUTF = ctlUTF.replace(/b‡h/g, "ஙொ");
ctlUTF = ctlUTF.replace(/‡h/g, "ஙா");
ctlUTF = ctlUTF.replace(/À/g, "ஙி");
ctlUTF = ctlUTF.replace(/†/g, "ஙீ");
ctlUTF = ctlUTF.replace(/¼/g, "ஙு");
ctlUTF = ctlUTF.replace(/½/g, "ஙூ");
ctlUTF = ctlUTF.replace(/b‡/g, "ஙெ");
ctlUTF = ctlUTF.replace(/n‡/g, "ஙே");
ctlUTF = ctlUTF.replace(/i‡/g, "ஙை");
ctlUTF = ctlUTF.replace(/§/g, "ங்");
ctlUTF = ctlUTF.replace(/‡/g, "ங");//////555


ctlUTF = ctlUTF.replace(/brs/g, "சௌ");
ctlUTF = ctlUTF.replace(/nrh/g, "சோ");
ctlUTF = ctlUTF.replace(/brh/g, "சொ");
ctlUTF = ctlUTF.replace(/rh/g, "சா");
ctlUTF = ctlUTF.replace(/á/g, "சி");
ctlUTF = ctlUTF.replace(/Ó/g, "சீ");
ctlUTF = ctlUTF.replace(/R/g, "சு");
ctlUTF = ctlUTF.replace(/N/g, "சூ");
ctlUTF = ctlUTF.replace(/br/g, "செ");
ctlUTF = ctlUTF.replace(/nr/g, "சே");
ctlUTF = ctlUTF.replace(/ir/g, "சை");
ctlUTF = ctlUTF.replace(/¢/g, "ச்");
ctlUTF = ctlUTF.replace(/r/g, "ச");//////555
ctlUTF = ctlUTF.replace(/bPs/g, "ஞௌ");
ctlUTF = ctlUTF.replace(/nPh/g, "ஞோ");
ctlUTF = ctlUTF.replace(/bPh/g, "ஞொ");
ctlUTF = ctlUTF.replace(/Ph/g, "ஞா");
ctlUTF = ctlUTF.replace(/Á/g, "ஞி");
ctlUTF = ctlUTF.replace(/Ø/g, "ஞீ");
ctlUTF = ctlUTF.replace(/\|/g, "ஞு");
ctlUTF = ctlUTF.replace(/ú/g, "ஞூ");
ctlUTF = ctlUTF.replace(/bP/g, "ஞெ");
ctlUTF = ctlUTF.replace(/nP/g, "ஞே");
ctlUTF = ctlUTF.replace(/iP/g, "ஞை");
ctlUTF = ctlUTF.replace(/Š/g, "ஞ்");
ctlUTF = ctlUTF.replace(/P/g, "ஞ");//////555


ctlUTF = ctlUTF.replace(/bls/g, "டௌ");
ctlUTF = ctlUTF.replace(/nlh/g, "டோ");
ctlUTF = ctlUTF.replace(/blh/g, "டொ");
ctlUTF = ctlUTF.replace(/lh/g, "டா");
ctlUTF = ctlUTF.replace(/o/g, "டி");
ctlUTF = ctlUTF.replace(/O/g, "டீ");
ctlUTF = ctlUTF.replace(/L/g, "டு");
ctlUTF = ctlUTF.replace(/\^/g, "டூ");
ctlUTF = ctlUTF.replace(/bl/g, "டெ");
ctlUTF = ctlUTF.replace(/nl/g, "டே");
ctlUTF = ctlUTF.replace(/il/g, "டை");
ctlUTF = ctlUTF.replace(/£/g, "ட்");
ctlUTF = ctlUTF.replace(/l/g, "ட");//////555




ctlUTF = ctlUTF.replace(/bzs/g, "ணௌ");
ctlUTF = ctlUTF.replace(/nzh/g, "ணோ");
ctlUTF = ctlUTF.replace(/bzh/g, "ணொ");
ctlUTF = ctlUTF.replace(/zh/g, "ணா");
ctlUTF = ctlUTF.replace(/Â/g, "ணி");
ctlUTF = ctlUTF.replace(/Ù/g, "ணீ");
ctlUTF = ctlUTF.replace(/Q/g, "ணு");
ctlUTF = ctlUTF.replace(/û/g, "ணூ");
ctlUTF = ctlUTF.replace(/bz/g, "ணெ");
ctlUTF = ctlUTF.replace(/nz/g, "ணே");
ctlUTF = ctlUTF.replace(/iz/g, "ணை");
ctlUTF = ctlUTF.replace(/©/g, "ண்");
ctlUTF = ctlUTF.replace(/z/g, "ண");//////555



ctlUTF = ctlUTF.replace(/bjs/g, "தௌ");
ctlUTF = ctlUTF.replace(/njh/g, "தோ");
ctlUTF = ctlUTF.replace(/bjh/g, "தொ");
ctlUTF = ctlUTF.replace(/jh/g, "தா");
ctlUTF = ctlUTF.replace(/â/g, "தி");
ctlUTF = ctlUTF.replace(/Ô/g, "தீ");
ctlUTF = ctlUTF.replace(/J/g, "து");
ctlUTF = ctlUTF.replace(/ö/g, "தூ");
ctlUTF = ctlUTF.replace(/bj/g, "தெ");
ctlUTF = ctlUTF.replace(/nj/g, "தே");
ctlUTF = ctlUTF.replace(/ij/g, "தை");
ctlUTF = ctlUTF.replace(/¤/g, "த்");
ctlUTF = ctlUTF.replace(/j/g, "த");//////555




ctlUTF = ctlUTF.replace(/bes/g, "நௌ");
ctlUTF = ctlUTF.replace(/neh/g, "நோ");
ctlUTF = ctlUTF.replace(/beh/g, "நொ");
ctlUTF = ctlUTF.replace(/eh/g, "நா");
ctlUTF = ctlUTF.replace(/Ã/g, "நி");
ctlUTF = ctlUTF.replace(/Ú/g, "நீ");
ctlUTF = ctlUTF.replace(/E/g, "நு");
ctlUTF = ctlUTF.replace(/ü/g, "நூ");
ctlUTF = ctlUTF.replace(/be/g, "நெ");
ctlUTF = ctlUTF.replace(/ne/g, "நே");
ctlUTF = ctlUTF.replace(/ie/g, "நை");
ctlUTF = ctlUTF.replace(/ª/g, "ந்");
ctlUTF = ctlUTF.replace(/e/g, "ந");//////555



ctlUTF = ctlUTF.replace(/bds/g, "னௌ");
ctlUTF = ctlUTF.replace(/ndh/g, "னோ");
ctlUTF = ctlUTF.replace(/bdh/g, "னொ");
ctlUTF = ctlUTF.replace(/dh/g, "னா");
ctlUTF = ctlUTF.replace(/Å/g, "னி");
ctlUTF = ctlUTF.replace(/Ü/g, "னீ");
ctlUTF = ctlUTF.replace(/D/g, "னு");
ctlUTF = ctlUTF.replace(/}/g, "னூ");
ctlUTF = ctlUTF.replace(/bd/g, "னெ");
ctlUTF = ctlUTF.replace(/nd/g, "னே");
ctlUTF = ctlUTF.replace(/id/g, "னை");
ctlUTF = ctlUTF.replace(/‹/g, "ன்");
ctlUTF = ctlUTF.replace(/d/g, "ன");//////555



ctlUTF = ctlUTF.replace(/bgs/g, "பௌ");
ctlUTF = ctlUTF.replace(/ngh/g, "போ");
ctlUTF = ctlUTF.replace(/bgh/g, "பொ");
ctlUTF = ctlUTF.replace(/gh/g, "பா");
ctlUTF = ctlUTF.replace(/ã/g, "பி");
ctlUTF = ctlUTF.replace(/Õ/g, "பீ");
ctlUTF = ctlUTF.replace(/ò/g, "பு");
ctlUTF = ctlUTF.replace(/ó/g, "பூ");
ctlUTF = ctlUTF.replace(/bg/g, "பெ");
ctlUTF = ctlUTF.replace(/ng/g, "பே");
ctlUTF = ctlUTF.replace(/ig/g, "பை");
ctlUTF = ctlUTF.replace(/¥/g, "ப்");
ctlUTF = ctlUTF.replace(/g/g, "ப");//////555



ctlUTF = ctlUTF.replace(/bks/g, "மௌ");
ctlUTF = ctlUTF.replace(/nkh/g, "மோ");
ctlUTF = ctlUTF.replace(/bkh/g, "மொ");
ctlUTF = ctlUTF.replace(/kh/g, "மா");
ctlUTF = ctlUTF.replace(/Ä/g, "மி");
ctlUTF = ctlUTF.replace(/Û/g, "மீ");
ctlUTF = ctlUTF.replace(/K/g, "மு");
ctlUTF = ctlUTF.replace(/_/g, "மூ");
ctlUTF = ctlUTF.replace(/bk/g, "மெ");
ctlUTF = ctlUTF.replace(/nk/g, "மே");
ctlUTF = ctlUTF.replace(/ik/g, "மை");
ctlUTF = ctlUTF.replace(/«/g, "ம்");
ctlUTF = ctlUTF.replace(/k/g, "ம");//////555



ctlUTF = ctlUTF.replace(/bas/g, "யௌ");
ctlUTF = ctlUTF.replace(/nah/g, "யோ");
ctlUTF = ctlUTF.replace(/bah/g, "யொ");
ctlUTF = ctlUTF.replace(/ah/g, "யா");
ctlUTF = ctlUTF.replace(/Æ/g, "யி");
ctlUTF = ctlUTF.replace(/p/g, "யீ");
ctlUTF = ctlUTF.replace(/í/g, "யு");
ctlUTF = ctlUTF.replace(/ô/g, "யூ");
ctlUTF = ctlUTF.replace(/ba/g, "யெ");
ctlUTF = ctlUTF.replace(/na/g, "யே");
ctlUTF = ctlUTF.replace(/ia/g, "யை");
ctlUTF = ctlUTF.replace(/Œ/g, "ய்");
ctlUTF = ctlUTF.replace(/a/g, "ய");//////555



ctlUTF = ctlUTF.replace(/bus/g, "ரௌ");
ctlUTF = ctlUTF.replace(/nuh/g, "ரோ");
ctlUTF = ctlUTF.replace(/buh/g, "ரொ");
ctlUTF = ctlUTF.replace(/uh/g, "ரா");
ctlUTF = ctlUTF.replace(/Ç/g, "ரி");
ctlUTF = ctlUTF.replace(/ß/g, "ரீ");
ctlUTF = ctlUTF.replace(/U/g, "ரு");
ctlUTF = ctlUTF.replace(/%/g, "ரூ");
ctlUTF = ctlUTF.replace(/bu/g, "ரெ");
ctlUTF = ctlUTF.replace(/nu/g, "ரே");
ctlUTF = ctlUTF.replace(/iu/g, "ரை");
ctlUTF = ctlUTF.replace(/®/g, "ர்");
ctlUTF = ctlUTF.replace(/u/g, "ர");//////555
ctlUTF = ctlUTF.replace(/h/g, "ா");//////555



ctlUTF = ctlUTF.replace(/bys/g, "லௌ");
ctlUTF = ctlUTF.replace(/nyh/g, "லோ");
ctlUTF = ctlUTF.replace(/byh/g, "லொ");
ctlUTF = ctlUTF.replace(/yh/g, "லா");
ctlUTF = ctlUTF.replace(/È/g, "லி");
ctlUTF = ctlUTF.replace(/ä/g, "லீ");
ctlUTF = ctlUTF.replace(/Y/g, "லு");
ctlUTF = ctlUTF.replace(/ÿ/g, "லூ");
ctlUTF = ctlUTF.replace(/by/g, "லெ");
ctlUTF = ctlUTF.replace(/ny/g, "லே");
ctlUTF = ctlUTF.replace(/iy/g, "லை");
ctlUTF = ctlUTF.replace(/š/g, "ல்");
ctlUTF = ctlUTF.replace(/y/g, "ல");//////555



ctlUTF = ctlUTF.replace(/bss/g, "ளௌ");
ctlUTF = ctlUTF.replace(/nsh/g, "ளோ");
ctlUTF = ctlUTF.replace(/bsh/g, "ளொ");
ctlUTF = ctlUTF.replace(/sh/g, "ளா");
ctlUTF = ctlUTF.replace(/Ë/g, "ளி");

ctlUTF = ctlUTF.replace(/ç/g, "ளீ");
ctlUTF = ctlUTF.replace(/S/g, "ளு");
ctlUTF = ctlUTF.replace(/q/g, "ளூ");
ctlUTF = ctlUTF.replace(/bs/g, "ளெ");
ctlUTF = ctlUTF.replace(/ns/g, "ளே");
ctlUTF = ctlUTF.replace(/is/g, "ளை");
ctlUTF = ctlUTF.replace(/Ÿ/g, "ள்");
ctlUTF = ctlUTF.replace(/s/g, "ள");//////555


ctlUTF = ctlUTF.replace(/bts/g, "வௌ");
ctlUTF = ctlUTF.replace(/nth/g, "வோ");
ctlUTF = ctlUTF.replace(/bth/g, "வொ");
ctlUTF = ctlUTF.replace(/th/g, "வா");
ctlUTF = ctlUTF.replace(/É/g, "வி");
ctlUTF = ctlUTF.replace(/å/g, "வீ");
ctlUTF = ctlUTF.replace(/î/g, "வு");
ctlUTF = ctlUTF.replace(/ñ/g, "வூ");
ctlUTF = ctlUTF.replace(/bt/g, "வெ");
ctlUTF = ctlUTF.replace(/nt/g, "வே");
ctlUTF = ctlUTF.replace(/it/g, "வை");
ctlUTF = ctlUTF.replace(/›/g, "வ்");
ctlUTF = ctlUTF.replace(/t/g, "வ");//////555



ctlUTF = ctlUTF.replace(/bHs/g, "ழௌ");
ctlUTF = ctlUTF.replace(/nHh/g, "ழோ");
ctlUTF = ctlUTF.replace(/bHh/g, "ழொ");
ctlUTF = ctlUTF.replace(/Hh/g, "ழா");
ctlUTF = ctlUTF.replace(/Ê/g, "ழி");
ctlUTF = ctlUTF.replace(/æ/g, "ழீ");
ctlUTF = ctlUTF.replace(/G/g, "ழு");
ctlUTF = ctlUTF.replace(/>/g, "ழூ");
ctlUTF = ctlUTF.replace(/bH/g, "ழெ");
ctlUTF = ctlUTF.replace(/nH/g, "ழே");
ctlUTF = ctlUTF.replace(/iH/g, "ழை");
ctlUTF = ctlUTF.replace(/œ/g, "ழ்");
ctlUTF = ctlUTF.replace(/H/g, "ழ");//////555


ctlUTF = ctlUTF.replace(/bws/g, "றௌ");
ctlUTF = ctlUTF.replace(/nwh/g, "றோ");
ctlUTF = ctlUTF.replace(/bwh/g, "றொ");
ctlUTF = ctlUTF.replace(/wh/g, "றா");
ctlUTF = ctlUTF.replace(/¿/g, "றி");
ctlUTF = ctlUTF.replace(/Ö/g, "றீ");
ctlUTF = ctlUTF.replace(/W/g, "று");
ctlUTF = ctlUTF.replace(/ù/g, "றூ");
ctlUTF = ctlUTF.replace(/bw/g, "றெ");
ctlUTF = ctlUTF.replace(/nw/g, "றே");
ctlUTF = ctlUTF.replace(/iw/g, "றை");
ctlUTF = ctlUTF.replace(/‰/g, "ற்");
ctlUTF = ctlUTF.replace(/w/g, "ற");//////555




ctlUTF = ctlUTF.replace(/bAs/g, "ஹௌ");
ctlUTF = ctlUTF.replace(/nAh/g, "ஹோ");
ctlUTF = ctlUTF.replace(/bAh/g, "ஹொ");
ctlUTF = ctlUTF.replace(/Ah/g, "ஹா");
ctlUTF = ctlUTF.replace(/Ï/g, "ஹி");
ctlUTF = ctlUTF.replace(/ë/g, "ஹீ");
ctlUTF = ctlUTF.replace(/A&/g, "ஹு");
ctlUTF = ctlUTF.replace(/A\]/g, "ஹூ");
ctlUTF = ctlUTF.replace(/bA/g, "ஹெ");
ctlUTF = ctlUTF.replace(/nA/g, "ஹே");
ctlUTF = ctlUTF.replace(/iA/g, "ஹை");
ctlUTF = ctlUTF.replace(/à/g, "ஹ்");
ctlUTF = ctlUTF.replace(/A/g, "ஹ");//////555

ctlUTF = ctlUTF.replace(/bõs/g, "ஷௌ");
ctlUTF = ctlUTF.replace(/nõh/g, "ஷோ");
ctlUTF = ctlUTF.replace(/bõh/g, "ஷொ");
ctlUTF = ctlUTF.replace(/õh/g, "ஷா");
ctlUTF = ctlUTF.replace(/Î/g, "ஷி");
ctlUTF = ctlUTF.replace(/ê/g, "ஷீ");
ctlUTF = ctlUTF.replace(/õ&/g, "ஷு");
ctlUTF = ctlUTF.replace(/õ]/g, "ஷூ");
ctlUTF = ctlUTF.replace(/bõ/g, "ஷெ");
ctlUTF = ctlUTF.replace(/nõ/g, "ஷே");
ctlUTF = ctlUTF.replace(/iõ/g, "ஷை");
ctlUTF = ctlUTF.replace(/Z/g, "ஷ்");
ctlUTF = ctlUTF.replace(/õ/g, "ஷ");//////555

ctlUTF = ctlUTF.replace(/b\[s/g, "ஸௌ");
ctlUTF = ctlUTF.replace(/n\[h/g, "ஸோ");
ctlUTF = ctlUTF.replace(/b\[h/g, "ஸொ");
ctlUTF = ctlUTF.replace(/\[h/g, "ஸா");
ctlUTF = ctlUTF.replace(/Ì/g, "ஸி");
ctlUTF = ctlUTF.replace(/è/g, "ஸீ");
ctlUTF = ctlUTF.replace(/\[&/g, "ஸு");
ctlUTF = ctlUTF.replace(/\[\]/g, "ஸூ");
ctlUTF = ctlUTF.replace(/b\[/g, "ஸெ");
ctlUTF = ctlUTF.replace(/n\[/g, "ஸே");
ctlUTF = ctlUTF.replace(/i\[/g, "ஸை");
ctlUTF = ctlUTF.replace(/°/g, "ஸ்");
ctlUTF = ctlUTF.replace(/Þ/g, "ஸ்"); 
ctlUTF = ctlUTF.replace(/\[/g, "ஸ");//////555
//Þ
ctlUTF = ctlUTF.replace(/m/g, "அ");
ctlUTF = ctlUTF.replace(/M/g, "ஆ");
ctlUTF = ctlUTF.replace(/ï/g, "இ");
ctlUTF = ctlUTF.replace(/</g, "ஈ");
ctlUTF = ctlUTF.replace(/c/g, "உ");
ctlUTF = ctlUTF.replace(/C/g, "ஊ");
ctlUTF = ctlUTF.replace(/v/g, "எ");
ctlUTF = ctlUTF.replace(/V/g, "ஏ");
ctlUTF = ctlUTF.replace(/I/g, "ஐ");
ctlUTF = ctlUTF.replace(/x/g, "ஒ")
ctlUTF = ctlUTF.replace(/X/g, "ஓ");
ctlUTF = ctlUTF.replace(/xs/g, "ஔ");
ctlUTF = ctlUTF.replace(/~/g, "ஃ");
ctlUTF = ctlUTF.replace(/\$/g, "ஸ்ரீ");
ctlUTF = ctlUTF.replace(/˜/g, "?");
document.getElementById(oVal).value=objTrim(ctlUTF); }   
function objTrim(Obj)
{	
	objvalue=Obj;	

	while (objvalue.substring(0,1)==' ') 
	{
	objvalue=objvalue.substring(1,objvalue.length);
	}
	
	return objvalue;
	}

function Trim(Obj)
{
	objvalue=eval(Obj).value	
	while (objvalue.substring(0,1)==' ') 
	{
	objvalue=objvalue.substring(1,objvalue.length);
	}
	Obj.value=objvalue;
	if (objvalue.length==0)
			
			return true;
	else
			return false;	}

function KeyPress(e)
{
	var key;
	var keychar;
	
	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();
	
	// control keys
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
	   return true;

	// alphas and numbers
	else if ((("0123456789/").indexOf(keychar) > -1))
	   return true;
	else
	   return false;}

//Date Validation
function IsDate(dateStr) 
{

  var datePat = /^(\d{1,2})(\/|)(\d{1,2})(\/|)(\d{4})$/;
  var matchArray = dateStr.match(datePat); // is format OK?

  if (matchArray == null) 
  {
    alert("Date format must be DD/MM/YYYY");
    return false;
  }

  // parse date into variables
  month = matchArray[3];
  day = matchArray[1];
  year = matchArray[5];

	
	
if (month < 1 || month > 12) { // check month range
   alert("Month must be between 1 and 12."); 

    return false;
  }

if (day < 1 || day > 31) 
{
   alert("Day must be between 1 and 31."); 
   return false;
  }


if ((month==4 || month==6 || month==9 || month==11) && day==31) {
    alert("Month " + month + " doesn't have 31 days!")
    return false;
  }

if (month == 2) { // check for february 29th
    var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
    if (day > 29 || (day==29 && !isleap)) 
    {

      alert("February " + year + " doesn't have " + day + " days!")
      return false;
    }
  }
  return true;  // date is valid 
  }
  
function ConvertASCII(oVal,From) 
{
  var tstr =document.getElementById(oVal).value;
  var bstr = '';
  for(i=0; i<tstr.length; i++)
  {
    if(tstr.charCodeAt(i)>127)
    {
      bstr += '&#' + tstr.charCodeAt(i) + ';';
    }
    else
    {
      bstr += tstr.charAt(i);
    }
  }
  document.getElementById(From).value=bstr;  
}


