function checkDate()
{
	 document.getElementById('error').innerHTML="";
 mnth = document.forms[0].Month.options[document.forms[0].Month.selectedIndex].value
 mnth = parseInt(mnth);
 dy = parseInt(document.forms[0].Day.options[document.forms[0].Day.selectedIndex].value)

 //if the month 22 isn't February...
 if (mnth != 2)
 {
 // then see if it's a month that only has 30 days...
 if (mnth == 4 || mnth == 6 || mnth == 9 || mnth == 11)
 {
 // if it is, and the day value is greater than 30, alert the user
 if (dy > 30)
 {
 document.getElementById('error').innerHTML='<font color="#FF0000">'+"لا يمكن أن يكون هناك أكثر من" +maxdy+ "يوما"+' </font>';

 // and select the 30 for them...
 document.forms[0].Day.selectedIndex = 0
 err = true
 return
 }
 }
 }
 else
 {
 //if it IS February , check if it's a leap year
 yr1 = parseInt(document.forms[0].Year.options[document.forms[0].Year.selectedIndex].value)
 // (this is the modulus operation which returns the remainder of the selected year divided by 4
 leapYrTest = yr1 % 4
 // if the year divides evenly by 4, it is a leap year and the remainder will be 0...
 if (leapYrTest == 0)
 {
 // so our max day for february is 29
 maxdy = 29
 }
 else
 {
 maxdy = 28
 }
 // if the user selected a value greater than the max day AND the month is February
 if (dy > maxdy)
 {
 // Alert the user and set the day back to 1

	document.getElementById('error').innerHTML='<font color="#FF0000">'+"لا يمكن أن يكون هناك أكثر من" +maxdy+ "يوما"+' </font>';
 document.forms[0].Day.selectedIndex = 0
 err = true
 return
 }
 }
} 

function changeCityesHandler(sText){
	if(sText){
		document.getElementById('cityes').innerHTML=sText;
	}else{
		document.getElementById('error').innerHTML='<font color="#FF0000">نعتذر منك  تعذر الحصول على مدن لهذا البلد</font>';
	}
}
function changeCityes(value)
{
	AJAXGet(base_url+"changeCityes.php?country_id="+value,changeCityesHandler,false,false);
}
function selectCount(index)
{
	document.getElementById('countchoice'+index).checked="checked";
}