var isNav=false;var MSIEIndex=navigator.userAgent.indexOf("MSIE");if(navigator.userAgent.indexOf("MSIE")==-1||navigator.userAgent.indexOf("Windows")==-1||navigator.userAgent.substring((MSIEIndex+5),(MSIEIndex+6))<4){isNav=true}function CorrectDay(a,b,c){var d;if((c.options[c.selectedIndex].value%4)==0){d=29}else{d=28}if(a.selectedIndex==30&&(b.selectedIndex==3||b.selectedIndex==5||b.selectedIndex==8||b.selectedIndex==10)){a.selectedIndex=29}else{if(a.selectedIndex>(d-1)&&b.selectedIndex==1){a.selectedIndex=d-1}}}function FromToDateValidate(a,b,c,d,e,f,g,h,i){var j=parseInt(a.options[a.selectedIndex].value);var k=parseInt(b.selectedIndex)+1;var l=parseInt(c.options[c.selectedIndex].value);var m=parseInt(d.options[d.selectedIndex].value);var n=parseInt(e.selectedIndex)+1;var o=parseInt(f.options[f.selectedIndex].value);if(l<o){alert("Your "+h+" date is after your "+i+" date for "+g);return false}else{if(l==o){if(k<n){alert("Your "+h+" date is after your "+i+" date for "+g);return false}else{if(k==n){if(j<m){alert("Your "+h+" date is after your "+i+" date for "+g);return false}}}}}return true}function isEmail(a){var b=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;if(b.test(a)){return true}else{return false}}function CorrectDay(a,b,c){var d;if((c.options[c.selectedIndex].value%4)==0){d=29}else{d=28}if(a.selectedIndex==30&&(b.selectedIndex==3||b.selectedIndex==5||b.selectedIndex==8||b.selectedIndex==10)){a.selectedIndex=29}else{if(a.selectedIndex>(d-1)&&b.selectedIndex==1){a.selectedIndex=d-1}}}function IsNotEmpty(a,b){if(a.value==""){alert('Please enter a value for the \"'+b+'\" field.');a.focus();return(false)}return(true)}function FutureDate(a,b,c,d){var e;e=new Date();var f=new Array('January','February','March','April','May','June','July','August','September','October','November','December');var g=e.getDate();var h=e.getMonth();var j=e.getYear();for(i=0;i<11;i++){if(b==f[i])break}if(c<j){alert('The date ['+d+'] you enter must be in the future');return false}else{if(c==j){if(i<h){alert('The date ['+d+'] you enter must be in the future');return false}else{if(i==h){if(parseInt(a)<g){alert('The date ['+d+'] you enter must be in the future');return false}}}}}return true}function IsEmail(a,b){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@.1234567890ƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-~";var d=a.value;var e=true;for(i=0;i<d.length;i++){ch=d.charAt(i);for(j=0;j<c.length;j++)if(ch==c.charAt(j))break;if(j==c.length){e=false;break}}if(!e){alert('\"'+b&+'\" is an invalid email address.');a.focus();return(false)}return(true)}function IsNumber(a,b){var c="0123456789-,";var d=a.value;var e=true;var f=0;var g="";if(d.length==0){alert('Please enter only digit characters in the \"'+b+'\" field.');a.focus();return(false)}for(i=0;i<d.length;i++){ch=d.charAt(i);for(j=0;j<c.length;j++)if(ch==c.charAt(j))break;if(j==c.length){e=false;break}if(ch!=",")g+=ch}if(!e){alert('Please enter only digit characters in the \"'+b+'\" field.');a.focus();return(false)}return(true)}function IsInteger(a,b,c,d){var e="0123456789-,";var f=a.value;var g=true;var h=0;var k="";if(f.length==0){alert('Please enter only digit characters in the \"'+b+'\" field.');a.focus();return(false)}for(i=0;i<f.length;i++){ch=f.charAt(i);for(j=0;j<e.length;j++)if(ch==e.charAt(j))break;if(j==e.length){g=false;break}if(ch!=",")k+=ch}if(!g){alert('Please enter only digit characters in the \"'+b+'\" field.');a.focus();return(false)}var l=k;var m=parseInt(k);if(l!=""&&!(m>=c&&m<=d)){alert('Please enter a value greater than or equal to \"'+c+'\" and less than or equal to \"'+d+'\" in the \"'+b+'\" field.');a.focus();return(false)}return(true)}function IsDecimal(a,b,c,d){var e="0123456789-.,";var f=a.value;var g=true;var h=0;var k="";for(i=0;i<f.length;i++){ch=f.charAt(i);for(j=0;j<e.length;j++)if(ch==e.charAt(j))break;if(j==e.length){g=false;break}if(ch!=",")k+=ch}if(!g){alert('Please enter only digit characters in the \"'+b+'\" field.');a.focus();return(false)}var l=k;var m=parseFloat(k);if(l!=""&&!(m>=c&&m<=d)){alert('Please enter a value greater than or equal to \"'+c+'\" and less than or equal to \"'+d+'\" in the \"'+b+'\" field.');a.focus();return(false)}return(true)}function HandleNumericKey(e){var a = e.charCode ? e.charCode : e.keyCode;  if(a!=8){if(a<48||a>57)return false}}function addLoadEvent(a){var b=window.onload;if(typeof window.onload!='function'){window.onload=a}else{window.onload=function(){b();a()}}}