// JavaScript Document
//
// <a href="javascript:mailto('yourdomain.com','you')">you@yourdomain.com</a>
//
function mailto(domain,user) 
{ 
document.location.href = "mailto:" + user + "@" + domain;
}

function showPanel(theImgId) {
	document.getElementById(theImgId).style.display = "block";
	document.getElementById(theImgId+"SW").style.display = "none";
}
function closePanel(theImgId) {
	document.getElementById(theImgId).style.display = "none";
	document.getElementById(theImgId+"SW").style.display = "block";
}

function toggleShowTables() {
	var theElementList = document.getElementsByTagName("table");
	for ( var i = 0; i < theElementList.length; i++ ) {
		theClass = theElementList[i].className;
		theID = theElementList[i].getAttribute("id");
		isReviews = 0;
		isSwitch = 0;
		isUnscored = 0;
		isHead = 0;
		if ( theClass.search(/reviews/) >= 0 ) { isReviews = 1; };
		if ( theClass.search(/switch/) >= 0 ) { isSwitch = 1; };
		if ( theClass.search(/unscored/) >= 0 ) { isUnscored = 1; };
		if ( theClass.search(/head/) >= 0 ) { isHead = 1; };
		//alert(theID+": "+theClass+" [ "+isReviews+isSwitch+isUnscored+" ]");
		if ( isReviews && !isSwitch && !isUnscored && !isHead) {
			if ( theElementList[i].style.display == "block") { 
				theElementList[i].style.display = "none"
			} else {
				theElementList[i].style.display = "block"
			};
		};
		if ( isReviews && isSwitch && !isUnscored  && !isHead) {
			if ( theElementList[i].style.display == "none") { 
				theElementList[i].style.display = "block"
			} else {
				theElementList[i].style.display = "none"
			};
		};
	};
} 