function popup(mylink,windowname) { if (! window.focus) return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href,windowname,'width=500,height=800,resizable=yes,scrollbars=yes'); return false; }; function confirmdelete() { return confirm("Delete This Item ?"); }; function confirmdeleteimage() { return confirm("Note: Any changes you have made to the text will be ignored, and the image deleted if you proceed. Delete This Item ?"); }; function confirmcancel() { return confirm("Cancel this edit ?"); }; function confirmunlock() { return confirm("An article is locked when someone is editing it. The only time you should unlock an article is if you were editing an article and your system crashed, or you closed the editing window. Please confirm you really want to unlock article."); }; function imagepopup(mylink,windowname) { if(! window.focus)return true; var href; if (typeof(mylink)=='string') href=mylink; else href=mylink.href; window.open(href,windowname,'width=640,height=480,scrollbars=yes'); return false; }; /** * DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) */ // Declaring valid date character, minimum year and maximum year var dtCh= "/"; var minYear=1999; var maxYear=2050; function isInteger(s){ var i; for (i = 0; i < s.length; i++){ // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true; } function stripCharsInBag(s, bag){ var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++){ var c = s.charAt(i); if (bag.indexOf(c) == -1) returnString += c; } return returnString; } function DaysArray(n) { for (var i = 1; i <= n; i++) { this[i] = 31 if (i==4 || i==6 || i==9 || i==11) {this[i] = 30} if (i==2) {this[i] = 29} } return this } function ValidateDate() { day=document.getElementById('day').value; month=document.getElementById('month').value; year=document.getElementById('year').value; // Check Days in Feb // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. if (month==2) { daysinfeb=(((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 ); if (day > daysinfeb) { alert ("February only has " + daysinfeb + " days in " + year); return false; } } else { // 30 days hath september, april, june and november, all the rest have 31 .... Apr = 4, May = 6, Nov = 11 if ((month == 4) || (month = 6) || (month = 11)) { if (day > 30) { alert ("The month you selected only has 30 days"); return false; } } else { if (day > 31) { alert ("The month you selected only has 31 days"); return false; } } } }