function swapImg(inImage, t){
	if (t == 1){
		if (inImage.src.indexOf('_on.gif') == -1) {
			inImage.src = inImage.src.slice(0,inImage.src.length-4) + '_on.gif';
		}
	}
	else {
		inImage.src = inImage.src.slice(0,inImage.src.length-7) + '.gif';
	}
}
function openNewWindow(loc){
	window.open(loc,'newwindow');
}
function openWin(url, height, width) {
	var height = height;
	var width = width;
	var scroll = 0;
	var wleft = (screen.width - width-20) / 2;
	var wtop = (screen.height - height) / 2;
	window.open(url,'holewin','fullscreen=0,scrollbars='+scroll+',height='+height+',width='+width+',top='+wtop+',left='+wleft+'');
}
function openWin2(url, height, width) {
	var height = height;
	var width = width;
	var scroll = 1;
	var wleft = (screen.width - width-20) / 2;
	var wtop = (screen.height - height) / 2;
	window.open(url,'holewin','fullscreen=0,scrollbars='+scroll+',height='+height+',width='+width+',top='+wtop+',left='+wleft+'');
}
function swapInfoSection(section) {
	var sections = new Array('About','Achievements','Goals','Mission');
	
	for (var s in sections) {
		document.getElementById('link' + sections[s]).className = 'tabs2Links';
		document.getElementById('tab' + sections[s]).style.display = 'none';
	}
	document.getElementById('link' + section).className = 'tabs2LinksSel';
	document.getElementById('tab' + section).style.display = 'block';
}
function swapAwardSection(section) {
    var sections = new Array('2008', '2006', '2005', '2005Ezzat', '2004', '2003', '2002');

    for (var s in sections) {
        document.getElementById(sections[s]).style.display = 'none';
    }
    document.getElementById(section).style.display = 'block';
}
function swapShareLinks() {
    var shareDiv = document.getElementById('share');
    shareDiv.style.left = document.getElementById('mainTable').offsetLeft + 640;
    if (shareDiv.style.visibility == 'hidden' || shareDiv.style.visibility == '') {
        shareDiv.style.visibility = 'visible';
    } else {
        shareDiv.style.visibility = 'hidden';
    }
}
function showBio(inDiv) {
    inDiv = document.getElementById(inDiv);
    inDiv.style.top = document.body.scrollTop;

    if (inDiv.style.display == 'none' || inDiv.style.display == '') {
        inDiv.style.display = 'block';
        //document.body.style.overflow = 'hidden';
    } else {
        inDiv.style.display = 'none';
        document.body.style.overflow = 'auto';
    }
}
function swapDesc(inDiv) {
    var sdesc = document.getElementById('sdesc' + inDiv);
    var ldesc = document.getElementById('ldesc' + inDiv);

    if (sdesc.style.display == 'block') {
        sdesc.style.display = 'none';
        ldesc.style.display = 'block';
    }
    else {
        sdesc.style.display = 'block';
        ldesc.style.display = 'none';
    }
}
function swapDesc2(inDiv) {
    inDiv = document.getElementById(inDiv);

    if (inDiv.style.display == 'none' || inDiv.style.display == '') {
        inDiv.style.display = 'block';
    } else {
        inDiv.style.display = 'none';
    }
}
function info(loc,pos){
	var h = 400; var w = 420; var t = 0; var l = 0;
	if (pos == 1) {
		t = (this.screen.height-h) / 2;
		l = (this.screen.width-w) / 2;
	}
	window.open(loc,'info','fullscreen=0,scrollbars=1,height=' + h + ',width=' + w + ',top=' + t + ',left=' + l);
}

function showTerm(type) {
    var termDiv = document.getElementById('termDiv');

    if (type == 1) {
        termDiv.style.display = 'block';
        termDiv.style.left = event.clientX;
        termDiv.style.top = event.clientY - 185;
    }
    else {
        termDiv.style.display = 'none';
    }
}
function chkNumeric(total) {
    var regex = /^[0-9\.]+$/;
	if (regex.test(total.value)) {
		return true;
	} 
	total.value = 100;
	alert('Please Enter a Numeric Value');
   	event.returnValue=false;
}