function expandAll(){
var param, n = 0;
while (param = document.getElementById('div' + n++))
param.style.display=(param.style.display=="none")?"":"none";
}
function expand(param)	{		
param.style.display=(param.style.display=="none")?"":"none";	
}
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
function cbo_showOther(cboName,val,tirggerID){
	par = document.getElementById(cboName);
	if(par.value==val || par.value==val){
		ShowContent(tirggerID);
		ShowContent(tirggerID+1);
		document.getElementById(tirggerID).style.backgroundColor="ccc";
		document.getElementById(tirggerID).focus();
	}else{
		HideContent(tirggerID);
		HideContent(tirggerID+1);
	}
}
function validatefields(theForm){
// check if the first drop down is selected, if so, invalid selection
if (theForm.cbo_QuestionSet.selectedIndex == 0)
{
alert("Specify Question Set type (Pre or Post).");
theForm.cbo_QuestionSet.focus();
return (false);
}
}

<!-- Prevew sections PopUp Window Opener -->
<!-- var newwindow; -->
function popupwin(url)
{
var newwindow;
newwindow=window.open(url,'name','height=610,width=750,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
if (window.focus) {newwindow.focus()}
}
function popupwintest(url,windowName,height,width)
{
var newwindow;
newwindow=window.open(url,'name','height=610,width=750,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
if (window.focus) {newwindow.focus()}
}
<!-- PopUp Window Opener -->
function openNewWindow(URLtoOpen,windowName,height,width)
{
windowFeatures ="menubar=no,scrollbars=yes,location=no,favorites=no,resizable=yes,status=no,toolbar=no,directories=no";
var test = "'"; 
winLeft = (screen.width-width)/2; 
winTop = (screen.height-(height+110))/2; 
myWin= open(URLtoOpen,windowName,"width=" + width +",height=" + height + ",left=" + winLeft + ",top=" + winTop + test + windowFeatures + test);
if (window.focus) {myWin.focus()}
}

<!-- Open PopUp Window in full screen -->
function openNewWindowFull(URLtoOpen,windowName)
{
myWin= open(URLtoOpen,windowName,'menu=no,toolbar=no,resizable=yes,scrollbars=yes,status=yes');
document.write('<center><br>If you see this page but did not get to IDL registration or login page, you will need to disable you popup blocker.<br /><br />If you see an yellow bar saying "Popup blocked" on top of this page, right click on it and select "Always allow..."<br /><br />It is required that you disable popup blocker and enable javascript on your browser to enable some functionalities. <br><br>Click Back button of your browser or<br> Go back to <a href="/" target="_self">EPEC IDL</a></center>');
}
function openNewWindowResize(URLtoOpen,windowName,height,width)
{
if (window.showModalDialog) {
window.showModalDialog(URLtoOpen,windowName,"dialogWidth:" + width + "px;dialogHeight:" + height + "px;edge:sunken;scroll:yes;resizable:yes;status:no;center:yes");
} else {
windowFeatures ="menubar=yes,scrollbars=yes,location=yes,favorites=yes,resizable=yes,status=yes,toolbar=yes,directories=yes";
var test = "'"; 
winLeft = (screen.width-width)/2; 
winTop = (screen.height-(height+110))/2; 
newwindow=window.open(URLtoOpen,windowName,"width=" + width +",height=" + height + ",left=" + winLeft + ",top=" + winTop + test + windowFeatures + test);
if (window.focus) {newwindow.focus()}
}
}
function openNewWindowNoResize(URLtoOpen,windowName,height,width)
{
if (window.showModalDialog) {
window.showModalDialog(URLtoOpen,windowName,"dialogWidth:" + width + "px;dialogHeight:" + height + "px;edge:sunken;scroll:no;resizable:no;status:no;center:yes");
} else {
windowFeatures ="menubar=no,scrollbars=no,location=no,favorites=no,resizable=no,status=no,toolbar=no,directories=no";
var test = "'"; 
winLeft = (screen.width-width)/2; 
winTop = (screen.height-(height+110))/2; 
newwindow=window.open(URLtoOpen,windowName,"width=" + width +",height=" + height + ",left=" + winLeft + ",top=" + winTop + test + windowFeatures + test);
if (window.focus) {newwindow.focus()}
}
}
<!-- External Video Player in Modal Window -->
function modalWin(myplayer, width, height) {
windowFeatures ="toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes ,modal=yes";
if (window.showModalDialog) {
window.showModalDialog(myplayer,"EPEC-Video",
"dialogWidth:" + width + "px;dialogHeight:" + height + "px;edge:sunken;scroll:no;resizable:no;status:no");
} else {
window.open(myplayer,'EPEC-Video',
'height=' + height + ',width=' + width + ',' + windowFeatures);
}
} 
<!-- External Video Player -->
function ExternalPlayer(player, videofile,windowName,height,width)
{
var playernum
var s1 = new SWFObject("flvplayer.swf","single","350","280","7");
	s1.addParam("allowfullscreen","true");
	s1.addVariable("image","images/start.gif");
	s1.addVariable("file","<?php echo $myvideo; ?>");
	s1.addVariable("backcolor","0x000000");
	s1.addVariable("frontcolor","0xCCCCCC");
	s1.addVariable("lightcolor","0xFFFCCC");
	s1.addVariable("overstretch","fit");
	//s1.addVariable("width","300");
	//s1.addVariable("height","250");
	s1.addVariable("autostart","false");
	s1.write("player"+playernum);
}
<!-- Refreshes parent window and cloase the popup -->
function win(){
window.opener.document.location.reload();
self.close();
}

<!-- START CHANGE FONT SIZE -->
	<!-- var fontSize = 100; -->
	checkCookie();
	function DeleteCookie(){
		setCookie('fontSize',105,-1);
	}
	function setCookie(c_name,value,expiredays)
	{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
	}
	function getCookie(c_name)
	{
	if (document.cookie.length>0)
	  {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1)
		{
		c_start=c_start + c_name.length+1;
		c_end=document.cookie.indexOf(";",c_start);
		if (c_end==-1) c_end=document.cookie.length;
		return unescape(document.cookie.substring(c_start,c_end));
		}
	  }
	return "";
	}
	function checkCookie()
	{
	fSize=getCookie('fontSize');
	if (fSize==null || fSize=="" || fSize=="NaN")
	  {
		setCookie('fontSize',100,365);
	  }
	  return true;
	}
	function FontSizeSet()
	{
	var fontSize = getCookie('fontSize');
	var el, n =0;
	while (n <= 3){
	while (el = document.getElementById('content' + n++)){
	//while (el = document.getElementById('content'))
	el.style.fontSize = fontSize + '%';
	}
	}
	return false;
	}
	function SetFontLarger()
	{
	var fontSize = getCookie('fontSize');
	//document.getElementById('mytextbox').value= getCookie('fontSize');
	if (fontSize < 150)
	fontSize=parseInt(fontSize)+15;
	setCookie('fontSize',fontSize, 2)
	return FontSizeSet();
	}
	
	function SetFontSmaller()
	{
	var fontSize = getCookie('fontSize');
	if (fontSize > 80) 
	fontSize=parseInt(fontSize)-15;
	setCookie('fontSize',fontSize, 2)
	return FontSizeSet();
	}
<!-- END CHANGE FONT SIZE -->
<!-- MENU GENERATOR -->
var menuids=["psep2"] //Enter id(s) of SuckerTree UL menus, separated by commas
function buildsubmenus_horizontal(){
	for (var i=0; i<menuids.length; i++){
	  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
		for (var t=0; t<ultags.length; t++){
			if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
				ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
				ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
			}
			else{ //else if this is a sub level menu (ul)
			  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
			ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon"
			}
		ultags[t].parentNode.onmouseover=function(){
		this.getElementsByTagName("ul")[0].style.visibility="visible"
		}
		ultags[t].parentNode.onmouseout=function(){
		this.getElementsByTagName("ul")[0].style.visibility="hidden"
		}
		}
	  }
}
if (window.addEventListener)
	window.addEventListener("load", buildsubmenus_horizontal, false)
else if (window.attachEvent)
	window.attachEvent("onload", buildsubmenus_horizontal)
<!-- END MENU GENERATOR -->
