function popLock(theURL,windowname,horz,vert,resizeMe) {
	if (resizeMe == null) { resizeMe = 1; }
	hCent	= (screen.availWidth / 2) - (horz / 2);
	vCent = (screen.availHeight / 2) - (vert / 2);
	window.open(theURL, windowname,'toolbar=0,location=0,directories=0,status=no,left=' + hCent + ',top=' + vCent + ',menubar=0,scrollbars=no,resizable=' + resizeMe + ',width=' + horz + ',height=' + vert );
}

function ajax(theCall,theDiv) {
    var xhr;
    if (window.XMLHttpRequest) { // non-IE
        xhr = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // IE
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //assign a handler for the response
    xhr.onreadystatechange = function() {
     if(xhr.readyState == 4){
   if(xhr.status  == 200) 
    document.getElementById(theDiv).innerHTML = xhr.responseText;
   else 
    alert('Cannot contact server: ' + theCall);
     }
    }
    // open page
    xhr.open('GET', theCall, true);
    xhr.send(null);
}

function swapLinks(theLink,theDiv){
	document.getElementById('about').className = "nav";
	document.getElementById('aboutDiv').className = "hide";
	document.getElementById('contact').className = "nav";
	document.getElementById('contactDiv').className = "hide";
	document.getElementById('projects').className = "nav";
	document.getElementById('projectsDiv').className = "hide";
	document.getElementById('shack').className = "nav";
	document.getElementById('shackDiv').className = "hide";
	document.getElementById('signupDiv').className = "hide";
	document.getElementById(theLink).className = "navActive";
	document.getElementById(theDiv).className = "show";
	
}