// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '/images/home%20page.jpg'
Pic[1] = '/images/homepage2.jpg'
Pic[2] = '/images/homepage3.jpg'
Pic[3] = '/images/home.jpg'


// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
//  End -->

function chkenter(f,e){
    var code;
      if (!e) var e = window.event;
      if (e.keyCode) code = e.keyCode;
      else if (e.which) code = e.which;
      if(code == 13){
        vallogin(f);
      }
  }


function CheckNumber(input,msg)
{
	var str = input.value;

	for (var i = 0; i < str.length; i++) 
	{
        	var ch = str.substring(i, i + 1)
	        if ((ch < "0" || "9" < ch) && ch != '.'  && ch!=",") 
			{
			input.value=""
        	      	alert(msg);
			input.focus();
		        return false;
	    	}
	}
	return true;
}

function CheckNumberdash(input,msg)
{
	
	var str = input.value;
	for (var i = 0; i < str.length; i++) 
	{
        	var ch = str.substring(i, i + 1)
	        if ((ch < "0" || "9" < ch) && ch != '-' ) 
			{
			input.value=""
        	      	alert(msg);
			input.focus();
		        return false;
	    	}
	}
	return true;
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

//validation for phone/mobile
function phnocheck(input)
{
	var str = input.value;
	if (str!="")
	{
		for (var i = 0; i < str.length; i++) 
		{
        	var ch = str.substring(i, i + 1)
	        if (ch < "0" || "9" < ch) 
			{
			input.value=""
        	alert("Invalid Phone number...");
			input.focus();
		    return false;
	    	}
		}
	}
	return true;
}

function mobcheck(input)
{

var str = input.value;

	if (str.length!=10)
	{
		alert("Invalid Mobile number...");
		input.focus();
	    return false;
	}
	if (str.substring(1,0)<"8")
	{
		alert("Invalid Mobile number...");
		input.focus();
	    return false;
	}
	for (var i = 0; i < str.length; i++) 
	{
        	var ch = str.substring(i, i + 1)
	        if (ch < "0" || "9" < ch) 
			{
			input.value=""
        	alert("Invalid Mobile number...");
			input.focus();
		    return false;
	    	}
	}
	return true;
}

function monthdays(mon1,yr)
{
	switch (mon1){	
	case "2":
		if (yr==0)
			mdays=29;
		else
		{
			lp1=yr % 400;
			if (lp1==0)
				mdays=29;
			else
			{
				lp2=yr % 4;
				lp3=yr % 100;
				if ((lp2==0) && (lp3>0))
					mdays=29;
				else
					mdays=28;
			}
		}
		break;
	case "4":	
	case "6":
	case "9":	
	case "11":
		mdays=30;
		break;
	default:
		mdays=31;
		break;
	}
	return mdays;
}	


function chkseldate(dy,mth,yrs,msg)
{
	td=dy.selectedIndex;
	td=dy.options[td].value;
	if (td==0)
	{
		alert("Please specify date!");
		dy.focus();
		return 0;
	}
	tm=mth.selectedIndex;
	tm=mth.options[tm].value;
	if (tm==0)
	{
		alert("Please specify Month!");
		mth.focus();
		return 0;
	}
	ty=yrs.selectedIndex;
	ty=yrs.options[ty].value;
	if (ty==0)
	{
		alert("Please specify Year!");
		yrs.focus();
		return 0;
	}
	md=monthdays(tm,ty);
	if (td>md)
	{
		alert(msg);
		dy.focus();	
		return 0;
	}
	else
	
		return 1;
}

//Blank textfield validation
function chkblank(t,msg)
{
	if (t.value=="")
	{
		alert(msg);
		t.focus();
		return 0;
	}
	return true;
}

//validation for selection list
function chkselect(t,msg)
{
	selno = t.selectedIndex; 
	
	selvalue = t.options[selno].value; 
	if (selvalue==0)
	{
		alert(msg);
		t.focus();
		return 0;
	}
	return true;
}

function chkradio(r,msg)
{
myOption = -1;
	
	for (i=r.length-1; i > -1; i--)
	 {
	if (r[i].checked) 
	{
		myOption = i; i = -1;
	}
	}
	if (myOption == -1) {
	alert(msg);
	return 0;
	}
}

function validreg1(f)
{
	if (chkblank(f.fname,"Please specify your first name!")==0)
			return 0;
	//if (chkblank(f.mname,"Please specify full name!")==0)
	//		return 0;
	if (chkblank(f.lname,"Please specify your last name!")==0)
			return 0;
	if (chkseldate(f.dd,f.mm,f.yy,"Invalid birthdate!")==0)
		return 0;
	if (chkradio(f.gender,"Please specify your gender!")==0)
		return 0;
	if (chkblank(f.address,"Please key in the proper address!")==0)
		return 0;

	
	if (chkselect(f.country,"Select country!")==0)
		return 0;
	if (chkblank(f.state,"Please specify your state!")==0)
		return 0;
	if (chkblank(f.city,"Please specify your city name!")==0)
		return 0;
	if (chkblank(f.pincode,"Please specify your city pin code number!")==0)
		return 0;
	if (getlistval(f.country)!=82)
	{
		if (chkblank(f.contactno,"Please key in your contact no!")==0)
			return 0;	
	}
	else
	{
		if (chkblank(f.isdno,"Please key in your ISD Code!")==0)
			return 0;		
		if (chkblank(f.mobile,"Please specify mobile no through which you can receive race alerts!")==0)
			return 0;		
	}
	if (CheckNumberdash(f.contactno,"Invalid Contact Number!")==0)
			return 0;
	if (CheckNumber(f.isdno,"Please specify proper ISD Code!")==0)
			return 0;
	if ((f.mobile.value!="") || (f.mobile.value!=0))
	if (mobcheck(f.mobile)==0)
				return 0;
	if (chkblank(f.email,"Please specify your email id!")==0)
		return 0;
		if (echeck(f.email.value)==false)
		{
			f.email.value="";
			f.email.focus();
			return 0;
		}
	if (chkblank(f.cpname,"Please key in the name of contact person!")==0)
		return 0;
	if (chkblank(f.cpmobile,"Please spcify the mobile no. of contact person!")==0)
		return 0;
	if (mobcheck(f.cpmobile)==0)
			return 0;
	if (chkblank(f.cprelation,"Please specify your relation with the contact person!")==0)
		return 0;
	if (chkradio(f.joint,"Please specify whether you suffer from joint pain?")==0)
		return 0;
	if (chkradio(f.hlbp,"Please specify whether you suffer from high/low blood pressure?")==0)
		return 0;
	if (chkblank(f.illness,"Please specify whether you have any other illness - type none if not applicable!")==0)
		return 0;
	f.contue.value=1;
	f.submit();
	return 1;
}

function validreggroup1(f)
{
	if(f.regtype[1].checked || f.regtype[2].checked)
		if (f.regcount.value<2 || f.regcount.value>25)
		{
			alert("Team size cannot be less than 3 members and cannot extend above 25 members... Please check");
			f.regcount.focus();
			return 0;
		}
	if (chkblank(f.fname,"Please specify Name/ Group/ Corporate Name!")==0)
			return 0;
			
	if(f.regtype[0].checked)
		if (chkblank(f.lname,"Please specify your last name!")==0)
			return 0;

	if (chkseldate(f.dd,f.mm,f.yy,"Invalid Birth Date/ Date of Incorporation!")==0)
			return 0;
	
	if(f.regtype[0].checked)
		if (chkradio(f.gender,"Please specify your gender!")==0)
			return 0;

if (chkblank(f.address,"Please key in the proper address!")==0)
		return 0;

	
	if (chkselect(f.country,"Select country!")==0)
		return 0;
	if (chkblank(f.state,"Please specify your state!")==0)
		return 0;
	if (chkblank(f.city,"Please specify your city name!")==0)
		return 0;
	if (chkblank(f.pincode,"Please specify your city pin code number!")==0)
		return 0;
	if (getlistval(f.country)!=82)
	{
		if (chkblank(f.contactno,"Please key in your contact no!")==0)
			return 0;	
	}
	else
	{
		if (chkblank(f.isdno,"Please key in your ISD Code!")==0)
			return 0;		
		if (chkblank(f.mobile,"Please specify mobile no through which you can receive race alerts!")==0)
			return 0;		
	}
	if (CheckNumberdash(f.contactno,"Invalid Contact Number!")==0)
			return 0;
	if (CheckNumber(f.isdno,"Please specify proper ISD Code!")==0)
			return 0;
	if ((f.mobile.value!="") || (f.mobile.value!=0))
	if (mobcheck(f.mobile)==0)
				return 0;
	if (chkblank(f.email,"Please specify your email id!")==0)
		return 0;
		if (echeck(f.email.value)==false)
		{
			f.email.value="";
			f.email.focus();
			return 0;
		}
	if (chkblank(f.cpname,"Please key in the name of contact person!")==0)
		return 0;
	if (chkblank(f.cpmobile,"Please spcify the mobile no. of contact person!")==0)
		return 0;
	if (mobcheck(f.cpmobile)==0)
			return 0;
	if (chkblank(f.cprelation,"Please specify Relation/ Identity of Contact Resource!")==0)
		return 0;
	if (chkblank(f.username,"Please specify valid Login User Name....")==0)
		return 0;
	if (chkblank(f.password,"Please specify valid Login Password...")==0)
		return 0;
	if (f.ustatus.value==0)
	{
		alert("Please check desired Username Availability by clicking on Check Availability button to proceed ahead...");
		f.username.focus();
		return 0;
	}
	f.contue.value=1;
	f.submit();
	return 1;
}

function validreg2(f)
{
	if (chkselect(f.category,"Please specify race category!")==0)
		return 0;
	//if (chkradio(f.ownhire,"Please select whether you want to hire a cycle or do you own it!")==0)
	//	return 0;
	//if(f.ownhire[1].checked)
		//if (chkradio(f.cyclohire,"Please specify whether you want to complete registration even if there is no cyclohire option!")==0)
			//return 0;

	if (chkblank(f.username,"Please specify username for login purpose!")==0)
		return 0;
	
	if (f.ustatus.value==0)
	{
		alert("Please specify proper user name and check for availability!")
		f.username.focus();
		return 0;
	}
	if (chkblank(f.password,"Please specify password for login purpose!")==0)
		return 0;
	if (chkradio(f.paymode,"Please specify the payment mode!")==0)
		return 0;
	if (f.paymode[1].checked)
		paymode=1;
	else
		paymode=0;	
	if (paymode==1)
	{
		if (chkradio(f.cdd,"Please specify whether you want to pay through cheque / Demand Draft!")==0)
		return 0;
		if (chkblank(f.chequeno,"Please specify cheque / DD No!")==0)
		return 0;
		if (chkseldate(f.ddd,f.dmm,f.dyy,"Invalid Cheque / DD Date!")==0)
		return 0;
		if (chkblank(f.bankname,"Please specify Bank Name!")==0)
		return 0;
		
	}
	
	f.submit();
	return 1;
}

function validreggroup2(f)
{
	if (chkselect(f.category,"Please specify race category!")==0)
		return 0;
	
	totcnt=f.regcount.value;
	for(kk=1;kk<=totcnt;kk++)
	{
		pnm1=eval("f.pname1"+kk);
		//pbdate1=eval("f.pbdate1"+kk);
		//pcycle1=eval("f.pcycle1"+kk);
		//pcycle1x=eval("f.pcycle1"+kk+"[1].checked");
		//phire1=eval("f.phire1"+kk);
		jointpain1=eval("f.jointpain1"+kk);
		bproblem1=eval("f.bproblem1"+kk);
		illness1=eval("f.illness1"+kk+".value");
		if (chkblank(pnm1,"Please specify Participant-"+kk+" Name!")==0)
			return 0;
		//if (chktextdate(pbdate1,"Please specify valid birth date for Participant-"+kk+"!")==0)
		//	return 0;
		//if (chkradio(pcycle1,"Please specify whether Participant-"+kk+" Own/ Hire a cycle?")==0)
		//	return 0;
		//if(pcycle1x)
			//if (chkradio(phire1,"Please specify whether Participant-"+kk+"  want to complete registration even if there is no cyclohire option!")==0)
				//return 0;
		if (chkradio(jointpain1,"Please specify whether Participant-"+kk+" has Joint/ Bones Pain Problem?")==0)
			return 0;
		if (chkradio(bproblem1,"Please specify whether Participant-"+kk+" has High/ Low Blood Pressure Problem?")==0)
			return 0;
	}
	if (chkradio(f.paymode,"Please specify the payment mode!")==0)
		return 0;
	if (f.paymode[1].checked)
		paymode=1;
	else
		paymode=0;	
	if (paymode==1)
	{
		if (chkradio(f.cdd,"Please specify whether you want to pay through cheque / Demand Draft!")==0)
		return 0;
		if (chkblank(f.chequeno,"Please specify cheque / DD No!")==0)
		return 0;
		if (chkseldate(f.ddd,f.dmm,f.dyy,"Invalid Cheque / DD Date!")==0)
		return 0;
		if (chkblank(f.bankname,"Please specify Bank Name!")==0)
		return 0;
		
	}
	
	f.submit();
	return 1;
}

function disppay(cnt)
{
	if (cnt==1)
	{
		window.document.getElementById('cddet4').style.display='none';
		window.document.getElementById('cddet1').style.display='none';
		window.document.getElementById('cddet2').style.display='none';
		window.document.getElementById('cddet3').style.display='none';
	}
	else
	{
		window.document.getElementById('cddet4').style.display='block';
		window.document.getElementById('cddet1').style.display='block';
		window.document.getElementById('cddet2').style.display='block';
		window.document.getElementById('cddet3').style.display='block';
	}
}

//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,mumbai admin,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,mumbai admin,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
function valcat(f)
{
		if (chkblank(f.txtmaincat,"Please specify  Main Category Name!")==0)
			return 0;
		if (chkblank(f.txtcatname,"Please specify  Category Name!")==0)
			return 0;
		if (chkradio(f.rbm,"Please Specify Gender!")==0)
			return 0;
	
		if (chkblank(f.txtkms,"Please specify Kms!")==0)
			return 0;
		if (CheckNumber(f.txtkms)==0)
			return 0;
		if (chkblank(f.txtfee,"Please specify Fee!")==0)
			return 0;
		if (CheckNumber(f.txtfee)==0)
			return 0;
		if (chkradio(f.rbchip,"Please Specify Champion chip Yes / No!")==0)
			return 0;
		if (chkblank(f.txtdiscount,"Please specify Discount!")==0)
			return 0;
		if (chkblank(f.txtbib,"Please specify First charecter!")==0)
			return 0;
		if (chkradio(f.rbshow,"Please Specify  Show Registration Yes / No!")==0)
			return 0;
		if (chkblank(f.txtnote,"Please specify Note !")==0)
			return 0;
		if (chkseldate(f.bd,f.bm,f.by,"Invalid birthDate!")==0)
		return 0;			
f.submit();
		return 1;

}
function cdelcategory(nid)
{
	x=confirm("Are you sure of deleting this category!");
	if (x==true)	
		{
		document.location.href="delcategory.asp?id=" + nid;
		//window.close();
	}
}

function cdelreg(nid)
{
	x=confirm("Are you sure of deleting this record!");
	if (x==true)	
		{
		document.location.href="delreg.asp?id=" + nid;
		//window.close();
	}
}

function changep(f)
{
	if (chkblank(f.opwd,"Please specify your old password!")==0)
		return 0;
	if (chkblank(f.npwd,"Please specify new password!")==0)
		return 0;
	if (chkblank(f.cpwd,"Please confirm your password by retyping it!")==0)
		return 0;
	if (f.npwd.value!=f.cpwd.value)
		{
			alert("Your new password does not match with the confirm password. Make sure they are same!!!")
			f.npwd.focus();
			return 0;
		}
		f.submit();
		return 1;	
}

function getlistval(t)
{
	lval=t.selectedIndex;
	lval=t.options[lval].value;
	return lval;
}

function chkuser(f)
{
	if (chkblank(f.username,"Please specify user name!")==0)
		return 0;
	else
	{	
	unm=f.username.value;
	fnm="chkuseravail.asp?uid=" + unm ;
	window.open(fnm,"Geneology","resizable=no,toolbar=0,location=0,menubar=0,status=0,height=400,top=220,left=250,width=830,,scrollbars=0");	
	}
}

function vallogin(t)
{
	window.document.getElementById('capt0').style.display='block';
	window.document.getElementById('capt1').style.display='none';
	window.document.getElementById('capt2').style.display='none';
	if(t.uname.value=="")
	{
		alert("Please specify your User ID....");
		t.uname.focus();
		return 0;
	}
	if(t.upwd.value=="")
	{
		alert("Please specify your Login Password....");
		t.upwd.focus();
		return 0;
	}
	t.submit();
	return 1;
}

function valforgot(t)
{
	window.document.getElementById('capt0').style.display='none';
	window.document.getElementById('capt1').style.display='block';
	window.document.getElementById('capt2').style.display='block'
	if(t.uname.value=="")
	{
		alert("Please specify your User ID to retrive password....");
		t.uname.focus();
		return 0;
	}
	if(t.strCAPTCHA.value=="")
	{
		alert("Please specify capture code shown in image above - Used to control Automated Harvesting....");
		t.strCAPTCHA.focus();
		return 0;
	}
	t.action='/register/forgot.asp';
	t.submit();
	return 1;
}

function ccpay(f)
{
	if (chkradio(f.paymode,"Please specify the payment mode!")==0)
		return 0;
	if (f.paymode[1].checked)
		paymode=1;
	else
		paymode=0;	
		
	if (paymode==1)
	{
		if (chkradio(f.cdd,"Please specify whether you want to pay through cheque / Demand Draft!")==0)
		return 0;
		if (chkblank(f.chequeno,"Please specify cheque / DD No!")==0)
		return 0;
		if (chkseldate(f.ddd,f.dmm,f.dyy,"Invalid Cheque / DD Date!")==0)
		return 0;
		if (chkblank(f.bankname,"Please specify Bank Name!")==0)
		return 0;
		f.action="registeroffline.asp";
	}
	else
		f.action="https://www.ccavenue.com/shopzone/cc_details.jsp";
				
	f.submit();
	return 1;
}

function valxls(t)
{
	if(t.xlsname=="")
	{
		alert("Please specify Excel Sheet to Upload...");
		t.xlsname.focus();
		return 0;
	}
	strr=t.xlsname.value;
	ln=strr.length;
	s1=strr.substring(ln-4,ln);
	
	if(s1!=".xls" && s1!=".XLS")
	{
		alert("Please specify EXCEL SHEET Only - .XLS");
		t.xlsname.focus();
		return false;	
	}

	return 1;
}

function isxlsverify()
{

	if (frmbulkload.verifyflag.value=="Not Verified")
		frmbulkload.b1.disabled=true;
	else
		frmbulkload.b1.disabled=false;
		
}

function countit(t)
{
	
	var str = t.msgtopost.value;
	var tt=0;
	for (var i = 0; i < str.length; i++) 
	{
        	tt++;
	document.getElementById('thiscount').innerHTML=tt;
	t.cit.value=tt;
	}
	return 1;	
}

function chk160(f)
{
	if (f.cit.value>159)
	{
		alert("Message limit exceeding 160 characters!");
		msg=f.msgtopost.value
	
		f.msgtopost.value=msg.substr(0,159);
	}
}
function valsendmsg(t)
{
    if (t.msgtopost.value=="") 
	{
		alert("Please specify desired message to post...");
		t.msgtopost.focus();
		t.msgtopost.select();
		return false;
	}
	
	t.submit();
	return 1;	
}

function showsmscnt(f)
{
	ccc=getlistval(f.sel1);
	aaa=getlistval(f.sel2);	
	bbb=getlistval(f.cycletype);	
	document.getElementById('sss').innerHTML="<iframe src='showsmscnt.asp?cycletype=" + bbb + "&selc=" + ccc + "&sela=" + aaa + "' width=220px; height=80px frameborder=0 bgcolor=ffffcc>"; 
}

 function showmobileaction(rid)
{
document.getElementById('vlist1').style.display='block';
 document.getElementById('showmob').innerHTML="<iframe src='sendindmsg.asp?rid=" + rid + "' frameborder=0 height=118 width=363>"
 }
 
  function showemailaction(rid)
{
document.getElementById('vlist2').style.display='block';
 document.getElementById('showemail').innerHTML="<iframe src='sendindemail.asp?rid=" + rid + "' frameborder=0 height=170 width=363>"
 }
 
function checksearch(f)
{
	if (chkblank(f.searchtext,"Please specify string to Search for!")==0)
		return 0;
	
	if (chkselect(f.searchfield,"Please specify valid serach criteria!")==0)
		return 0;
	f.action="searchresults.asp";
	f.submit();
	return 1;

}

function showhide1()
{
	window.document.getElementById('regcounttr').style.display='none';
	window.document.getElementById('genderrow').style.display='block'
	window.document.getElementById('addinfo0').style.display='block'
	window.document.getElementById('addinfo1').style.display='block'
	window.document.getElementById('addinfo2').style.display='block'
	window.document.getElementById('addinfo3').style.display='block'
}
function showhide2()
{
	window.document.getElementById('regcounttr').style.display='block';
	window.document.getElementById('genderrow').style.display='none'
	window.document.getElementById('addinfo0').style.display='none'
	window.document.getElementById('addinfo1').style.display='none'
	window.document.getElementById('addinfo2').style.display='none'
	window.document.getElementById('addinfo3').style.display='none'
}

// check date input in text field
function chktextdate(datestring,msg)
{
	syscomp=0;
	dt=datestring.value;
	dd=dt.substring(0,2);
	mm=dt.substring(3,5);
	yy=dt.substring(6,10);

	// date length check
	tl=dt.length;
	if (tl<10)
	{
		alert("Please specify valid date in DD/MM/YYYY format");
		datestring.focus();
		return 0;
	}
	//mm part check
	if (mm<1 || mm>12)
	{
		alert("Please specify valid month...");
		datestring.focus();
		return 0;
	}
	//dd part check
	if (dd<1 || dd>31)
	{
		alert("Please specify valid day...");
		datestring.focus();
		return 0;
	}
	if((mm==4 || mm==6 || mm==9 || mm==11) && dd>30)
	{
		alert("Please specify valid day...");
		datestring.focus();
		return 0;
	}
	
	if (mm==2 && dd>29)
	{
		alert("Please specify valid day...");
		datestring.focus();
		return 0;
	}
	//yy check
	if(syscomp==1)
	{
		var mydate=new Date();
		if(dt!=mydate)
		{
			alert("No back dated/ post dated entries allowed...");
			datestring.focus();
			return 0;
		} 
	}
	else
		if(yy<1940 || yy>2010)
		{
			alert("Please specify valid year...");
			datestring.focus();
			return 0;
		}
	return 1;
}

function printrcpt()
{
	window.open("/register/acceptance.asp?print=1","Acceptance","resizable=no,toolbar=0,location=0,menubar=0,status=0,height=600,top=220,left=250,width=830,,scrollbars=1");	
}

function printind()
{
	window.open("/register/indemnity.pdf","Indemnity","resizable=no,toolbar=0,location=0,menubar=0,status=0,height=600,top=220,left=250,width=830,,scrollbars=0");	
}
