
function noSpam() {
    if (document.getElementById) {
		var at = "@";
	  	var links = document.getElementsByTagName('a');
	  
	  	for (var i = 0; i < links.length; i++) {
		  	var linkElem = links[i];
			
		  	if (linkElem.className == 'escape') {
		  		var mail = linkElem.firstChild; var domain = linkElem.lastChild;
		  		mail.nextSibling.firstChild.innerHTML = at;
		  		linkElem.href = "mailto:" + mail.data + at + domain.data;
		  	}
			
	  	} // End for
	  
    } // End if
}

function getMusicStatus(status) {
	if(document.cookie) {
		var a = document.cookie;
		var cookiewert = a.substr(a.search('musicSound=')+11,3);
		return cookiewert;
	}
}

function setMusicStatus() {
	var a = document.cookie;
	var cookiewert = a.substr(a.search('musicSound=')+11,3);

	if(cookiewert != "") {
		setSound = (cookiewert == "off") ? "onn" : "off";
		
		var t = new Date();
		t = new Date(t.getTime() +1000*60*60*24*7);
		document.cookie = 'musicSound='+setSound+'; expires='+t.toGMTString()+';'; 
	}
}

// Onload-Methode ohne Prototype:
//window.onload = noSpam;
Event.observe(window, 'load', noSpam, false);
