// "SENDMAIL" JavaScript Function - Makes email addresses more difficult for spammers to scrape off page:

	// Variable "v" is the username part of the email address of the current STEM webmaster
	// Variable "domain" is the (full) domain part of the email address of the current STEM webmaster
	var v = "msroberts01"
	var domain = "ysu.edu"

	// Variables "w" and "x" are part of the email address obfuscation code
	var w = "mai"
	var x = "lto:"

	// The code in the HTML page passes two arguments (y,z) to this function: The first, y, is
	// the "username" part of the email address (everything before the "@" sign), which is also the ID of the
	// anchor tag on the HTML page. The second argument, z, represents the domain name part of the email address.

	function sendmail(y,z) {
	// Below are the domain names used in the final part of the email address function. More can be added as necessary.

		switch (z) {
			case 0: z = "devnull.org"
			break;
			case 1: z = "ysu.edu" 
			break;
			case 2: z = "cis.ysu.edu" 
			break;
			case 3: z = "as.ysu.edu" 
			break;
			case 4: z = "aol.com" 
			break;
			case 5: z = "bi.org" 
			break;
			case 6: z = "math.ysu.edu" 
			break;
			case 7: z = "student.ysu.edu" 
			break;
			case 8: z = "hotmail.com" 
			break;
			case 9: z = "eng.ysu.edu" 
			break;
			case 10: z = "yahoo.com" 
			break;
			case 11: z = "cc.ysu.edu" 
			break;
			case 12: z = "ieee.org" 
			break;
			}

		if (y == "webmaster") {
			// This part of the function is for the "email webmaster" code at the bottom of every page
			y = v
			z = domain
			document.getElementById("webmaster").href = w + x + y + "@" + z
			}
		else {
			// This is used for all other email addresses
			document.getElementById(y).href = w + x + y + "@" + z
			}
	}
// END Sendmail JavaScript function

// These functions activate/deactivate the highlighting of the department home page link
	function dept1hilite() {document.getElementById("dept1").className = "brightred"}
	function dept1normal() {document.getElementById("dept1").className = "darkred"}

// Multimedia functions - Sound
function sound1Play(sound_url) {
  document.getElementById("sound1").innerHTML="<embed src='" + sound_url + "' width='240' height='45' autostart='true' loop='false'>";
	}
function sound2Play(sound_url) {
  document.getElementById("sound2").innerHTML="<embed src='" + sound_url + "' width='240' height='45' autostart='true' loop='false'>";
	}
function sound3Play(sound_url) {
  document.getElementById("sound3").innerHTML="<embed src='" + sound_url + "' width='240' height='45' autostart='true' loop='false'>";
	}
function sound14Play(sound_url) {
  document.getElementById("sound4").innerHTML="<embed src='" + sound_url + "' width='240' height='45' autostart='true' loop='false'>";
	}

//		if (z == 1) {z = "ysu.edu"}
//		if (z == 2) {z = "cis.ysu.edu"}
//		if (z == 3) {z = "as.ysu.edu"}
//		if (z == 4) {z = "aol.com"}
//		if (z == 5) {z = "bi.org"}
//		if (z == 6) {z = "math.ysu.edu"}
//		if (z == 7) {z = "student.ysu.edu"}
//		if (z == 8) {z = "hotmail.com"}
//		if (z == 9) {z = "eng.ysu.edu"}
//		if (z == 10) {z = "yahoo.com"}
//		if (z == 11) {z = "cc.ysu.edu"}
//		if (z == 12) {z = "ieee.org"}

