function checkMath() {
	var math = document.getElementById('math').value;
	
	if (math == 3) {
		document.getElementById('subForm').disabled = false;
	} else {
		document.getElementById('subForm').disabled = 'disabled';
	}
}

function clearForm() {
	var TA = document.getElementById('msg');
	
	if (TA.innerHTML == 'Type your message here, and don\'t forget your contact info!') {
		TA.innerHTML = '';
		TA.style.color = 'black';
		TA.style.fontStyle = 'normal';
	}
}

function showPortfolio(id) {
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			document.getElementById('litebox').innerHTML=xmlHttp.responseText;
		}
	}
	
	document.getElementById('litebox').innerHTML = 'Loading . . .';
	document.getElementById('greybox').style.display='block';
	document.getElementById('litebox').style.display='block';
	
	var queryString = "?id=" + id;

	xmlHttp.open("GET","scripts/showPortfolio.php" + queryString,true);
	xmlHttp.send(null);
}

function closebox() {
	document.getElementById('litebox').innerHTML = 'Loading . . .';
	document.getElementById('greybox').style.display='none';
	document.getElementById('litebox').style.display='none';
}