<!--
function isValidEmail(elementValue){  
   var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
   return emailPattern.test(elementValue);  
}  

function isNumberKey(evt){
	 var charCode = (evt.which) ? evt.which : event.keyCode
	 if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;
	
	 return true;
}


function dateChange( d, m, y ) {
	//work out if it is a leap year	
	var IsLeap = parseInt(document.getElementById(y)[document.getElementById(y).selectedIndex].value );
	IsLeap = !( IsLeap % 4 ) && ( ( IsLeap % 100 ) || !( IsLeap % 400 ) );
	//find the number of days in that month
	IsLeap = [31,(IsLeap?29:28),31,30,31,30,31,31,30,31,30,31][document.getElementById(m).selectedIndex];
	//store the current day - reduce it if the new month does not have enough days
	var storedDate = ( document.getElementById(d).selectedIndex > IsLeap - 1 ) ? ( IsLeap - 1 ) : document.getElementById(d).selectedIndex;
	while( document.getElementById(d).options.length ) { document.getElementById(d).options[0] = null; } //empty days box then refill with correct number of days
	for( var x = 0; x < IsLeap; x++ ) { document.getElementById(d).options[x] = new Option( x + 1, x + 1 ); }
	document.getElementById(d).options[storedDate].selected = true; //select the number that was selected before
	if( window.opera && document.importNode ) { window.setTimeout('MWJ_findSelect( \''+document.getElementById(d).name+'\' ).options['+storedDate+'].selected = true;',0); }
}

function issuedVSexpiry(num)
{
	if(J("#issueyear"+num).val() == J("#expiryyear"+num).val()){
		
		if(parseInt(J("#issuemonth"+num).val()) > parseInt(J("#expirymonth"+num).val())){
			J("#expiryyear"+num).val(parseInt(J("#expiryyear"+num).val())+1);
		}
		else if(parseInt(J("#issuemonth"+num).val()) == parseInt(J("#expirymonth"+num).val()) & parseInt(J("#issueday"+num).val()) >= parseInt(J("#expiryday"+num).val())){
			J("#expiryyear"+num).val(parseInt(J("#expiryyear"+num).val())+1);
		}
	}
}
-->
