function displayAlert(alertthis){
	document.getElementById("alert").style.display = '';
	document.getElementById("alert").innerHTML = alertthis;
}


function emailvalidate(email){
	if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
		//alert("valid");
		//displayAlert('Email valid');
		return(true);
	}
	//alert("Invalid e-mail address.");
	//displayAlert('Email not valid');
	return(false);
}


function confirmation(msg,url){
	var answer = confirm(msg);
	if(answer){window.location = url;}
}


function hide(thiss){
	if(document.getElementById){document.getElementById(thiss).style.display = 'none';}
	else{ 
		if(document.layers){document.thiss.display = 'none';}
		else{document.all.thiss.style.display = 'none';}
	}
}
function unhide(thiss){
	if(document.getElementById){document.getElementById(thiss).style.display = '';}
	else{ 
		if(document.layers){document.thiss.display = '';}
		else{document.all.thiss.style.display = '';}
	}
}
function replace(thiss,withthis){
	hide(thiss);
	unhide(withthis);
}


function encode(input){
	/*
	input = input.replace("<", "&lt;", "gi");
	input = input.replace(">", "&gt;", "gi");
	input = input.replace("'", "&#39;", "gi");
	*/
	input = input.replace("&", "kutampersandshit", "gi");
	return input;
}
function decode(input){
	input = input.replace("kutampersandshit", "&", "gi");
	return input;
}


function classchange(target,classs){
	document.getElementById(target).className = classs;
}

function swapBg(naardit){
	document.getElementById('body').style.background = naardit;
}
