function showimg(theButton, theState) {
	document.getElementById(theButton.name).src = eval(theButton.name + theState).src;
}

var fb1, fb2;

function preload_menu() {
	fb1 = new Image(144, 44);
	fb1.src = "/images/fb1.png";
	
	fb2 = new Image(144, 44);
	fb2.src = "/images/fb2.png";
}

function checkEmail(str) {
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);

	if (	(str == '') ||
		(str.indexOf(at) == -1 || str.indexOf(at) == 0 || str.indexOf(at) == lstr) ||
		(str.indexOf(dot) == -1 || str.indexOf(dot) == 0 || str.indexOf(dot) == lstr) ||
		(str.indexOf(at,(lat + 1)) != -1) ||
		(str.substring(lat - 1, lat) == dot || str.substring(lat + 1, lat + 2) == dot) ||
		(str.indexOf(dot, (lat + 2)) == -1) ||
		(str.indexOf(" ") != -1) ||
		(str.indexOf(at) == -1)	) {
		   return false
	}
	else {
		return true;
	}
}
	
function limit2Int(theValue) {
	theValue.value=theValue.value.replace(/[^\d]+/g,'');
}
	
function isInteger(theValue) {
	return (theValue.toString().search(/^[0-9]+$/) == 0);
}
