//############################## COPYRIGHT DATE ##############################//

var newDate = new Date();
var daYear = newDate.getFullYear();
var daDate = ""+daYear+"";


//############################## IMAGE ROLLOVER ##############################//

function HoverImage(img){
	var oldSrc = new String(img.src);
	var newSrc = oldSrc.substring(0, oldSrc.length - 6);
	newSrc += "_1.gif";
	img.src = newSrc;
}
	
function unHoverImage(img){
	var oldSrc = new String(img.src);
	var newSrc = oldSrc.substring(0, oldSrc.length - 6);
	newSrc += "_0.gif";
	img.src = newSrc;
}

function rO(t,n,s){
	document.images[n].src = "/nursing/webtemplate_images/" + t + "_" + n + "_" + s + ".gif";
}


//############################## HOME PAGE TAB FUNCTIONS ##############################//

function rO(t,n,s){
	document.images[n].src = "/nursing/webtemplate_images/" + t + "_" + n + "_" + s + ".gif";
}


//############################## SEARCH BOX EXPAND/CONTRACT ##############################//

var expBrowse;
var step = 10; //the amount it opens/closes per interval
var delay = 1; //the delay between intervals

function oC(nm){
	if(parseInt(document.getElementById(nm).style.height) > 52){
		expBrowse = setInterval("expandBox('"+nm+"',52,'c')",delay);
	}else{
		expBrowse = setInterval("expandBox('"+nm+"',290,'o')",delay);
	}
//end
}

function expandBox(nm,h,oc){
	if(oc == "o"){
   		//document.images[nm].src="http://www.exploreeducation.com/images/" + nm + "_header_1.gif";
		if(parseInt(document.getElementById(nm).style.height) >= h){
			clearInterval(expBrowse);
		}else{
			document.getElementById(nm).style.height = (parseInt(document.getElementById(nm).style.height) + step) + "px";
			document.getElementById(nm).style.top = (parseInt(document.getElementById(nm).style.top) - step) + "px";
		}
	}
	if(oc == "c"){
   		//document.images[nm].src="http://www.exploreeducation.com/images/" + nm + "_header_0.gif";
		if(parseInt(document.getElementById(nm).style.height) <= h){
			document.getElementById(nm).style.height = 52 + "px";
			clearInterval(expBrowse);
		}else{
			document.getElementById(nm).style.height = (parseInt(document.getElementById(nm).style.height) - step) + "px";
			document.getElementById(nm).style.top = (parseInt(document.getElementById(nm).style.top) + step) + "px";
		}
	}
//end expandBox
}

//############################## WRITE MENU ##############################//

function writeSubMenu(m){
	var subMenu = eval('menu'+m);
	document.write('<table border="0" cellpadding="2" align="right" style="border: 1px solid #cccccc; margin-left: 4px; margin-bottom: 2px;">\n');
	document.write('<tr>\n<td align="center" bgcolor="#cccccc"><b>Related Links</b></td>\n</tr>\n');
		for(x in subMenu){
			document.write('<tr>\n<td>' + subMenu[x] + '</td>\n</tr>\n');
		}
	document.write('</table>');
}

//############################## TESTIMONIAL ##############################//

function writeTest(){

// Set to the number of grads.  Remember that 0 is a number, so for 5 grads, set the number to 6
var w = 4;

var z=Math.floor(Math.random() * w);

// name/program/text/ for each grad
var img0 = 'test_petershenglei.jpg';
var text0 = 'My MBA has allowed me to enhance my credentials.  As a result of the International Business concentration within my Harding MBA, I now work for Goldlion Enterprises, a renowned clothes manufacturer in China.<br><br>\n\nPeter Shenglei, MBA';

var img1 = 'test_petershenglei.jpg';
var text1 = 'I chose the International Business concentration for my MBA at Harding University.  I now know more about international operations and management than my colleagues do.  As a result, I have received a promotion to Assistant Vice President at my company!<br><br>\n\nPeter Shenglei, MBA';

var img2 = 	'test_sherriemcaleese.jpg';
var text2 = 'The MBA program will sharpen your time management skills and you will be glad you made the choice to enroll in the program.  Now that I have my MBA from Harding University, there are a multitude of opportunities for me to choose from for my career.<br><br>\n\nSherrie McAleese, MBA<br>\nAthletic Insurance Coordinator';

var img3 = 'test_sherriemcaleese.jpg';
var text3 = 'As a mother of two and working full time, I was able to obtain my MBA with a concentration in Information Technology as a full-time student because of the Harding University Online MBA program.<br><br>\n\nSherrie McAleese, MBA<br>\nAthletic Insurance Coordinator';

	document.getElementById('testText').innerHTML = eval('text' + z);
	document.images['testImg'].src = "http://www.onlineharding.com/webtemplate_images/" + eval('img' + z);

//end
}