/*
 * JavaScript for Dobson Teleco
 *
 * Requires MooTools
 */

window.addEvent('domready', function(){
	/*$('headerlink').addEvent('click', function(){
		window.location = '/';
	});*/
	
	var emaillinks = $$('.mailto');
	if (emaillinks.length > 0){
		emaillinks.each(function(o){
			o.addEvent('mouseenter', function(){
				this.href = 'mailto:' + o.getProperty('eml').replace(' ', String.fromCharCode(64));
			});
			o.addEvent('mouseexit', function(){
				this.href = '#';
			});
		});
	}
});




function addslashes(str) {
	str=str.replace(/\'/g,'\\\'');
	str=str.replace(/\"/g,'\\"');
	str=str.replace(/\\/g,'\\\\');
	str=str.replace(/\0/g,'\\0');
	return str;
}
function stripslashes(str) {
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\\\/g,'\\');
	str=str.replace(/\\0/g,'\0');
	return str;
}
