function element(id) { if (document.getElementById != null) { return document.getElementById(id); } if (document.all != null) { return document.all[id]; } if (document.layers != null) { return document.layers[id]; } return null; } function validate(x) { var to = element("roster_eml_frm").to; var from = element("roster_eml_frm").from; var subject = element("roster_eml_frm").subject; var message = element("roster_eml_frm").message; if (to.value == "") { alert("Please enter a value in the 'to' field"); to.focus(); return false; } if (from.value == "") { alert("Please enter your email address"); from.focus(); return false; } if (message.value == "") { alert("Please enter the message you would like to send"); message.focus(); return false; } try { element("roster_eml_frm").to.disabled = false; element("roster_eml_frm").to.value = "Nancydonatiello@yahoo.com"; element("roster_eml_frm").subject.disabled = false; } catch (e) {} return true; } function enable_email(x) { try { element("roster_eml_frm").to.disabled = true; element("roster_eml_frm").subject.disabled = true; } catch (e) {} if (x == 0 || x == 2) { element("resume").style.display = 'none'; } element("email").style.display = ''; if (x == 0 && element("thankyou").style.display == '') { element("thankyou").style.display = 'none'; } if (x == 0 && element("listings").style.display == '') { element("listings").style.display = 'none'; } if (x == 1) { element("detail").style.display = 'none'; } } function enable_listingdetail() { element("email").style.display = 'none'; element("detail").style.display = ''; } function enable_resume() { if (element("email").style.display == '') { element("email").style.display = 'none'; } if (element("listings").style.display == '') { element("listings").style.display = 'none'; } element("resume").style.display = ''; } function enable_listings() { element("email").style.display = 'none'; element("resume").style.display = 'none'; element("listings").style.display = ''; }