/* FILE ARCHIVED ON 14:12:28 Nov 5, 2008 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 18:55:33 May 7, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ function search_onclick() { var search = document.getElementById('SearchString1'); if (search.value == 'Enter your search query') { search.value = ''; } } function search_onblur() { var search = document.getElementById('SearchString1'); if (search.value == '') { search.value = 'Enter your search query'; } } /* General form-validation */ function validate(form) { var isValid = true; for (var i = 0; i < form.elements.length; i++) { var elem = form.elements[i]; if (elem.className.indexOf('reqd') > 0) { /* input, select og textarea er höndlađ á sama hátt .... */ if ((elem.tagName == "INPUT") || (elem.tagName == "TEXTAREA") || (elem.tagName == "SELECT")) { if (elem.className.indexOf('emailval') > 0) { isValid = isValidEmail(elem.value); } else { isValid = (elem.value != ''); } if (!isValid) { alert(elem.title + ' is not properly specified!'); elem.focus(); elem.style.borderColor = '#FF4A4A'; elem.style.backgroundColor = '#FDFAD0'; return false; } else { elem.style.borderColor = ''; elem.style.backgroundColor = ''; } } } } return true; } function isValidEmail(value) { return (value.indexOf(".") > 2) && (value.indexOf("@") > 0); } // Björgvin Sigurđsson 26. júlí 2007 // The function is used in employee lists to avoid showing full email addresses on the web. // Changes email address with [at] instead of @ and adds the new value to the // href of the element which has the id specified in id. // Assumes that the element is a link and assumes that the email is a string with [at] instead of @. // param email: the string with the [at] // param id: ID of the link-element which the email address belongs to. function changeEmail(email, id) { var newEmail = email.replace('[at]', '@'); document.getElementById(id).href = "mailto:"+email.replace('[at]', '@'); }