﻿/* Global JavaScript */
function startList()
{
	if (document.all && document.getElementById)
	{
		navRoot = document.getElementById("nav");
		for (i = 0; i < navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName == "LI") 
			{
				if(node.id == "navprograms")
				{
					node.onmouseover = function() 
					{
						this.className += " pover";
					}
					
					node.onmouseout = function() 
					{
						this.className = this.className.replace(" pover", "");
					}
				}
				else
				{
					node.onmouseover = function() 
					{
						this.className += " over";
					}
					node.onmouseout = function() 
					{
						this.className = this.className.replace(" over", "");
					}
				}				
			}
		}
	}
}

//    Opens a new window with specified properties
function openWin(url,name,w,h,scroll,resize,status,title,tool,menubar)
{
      var sFeatures;
      if (typeof(h) == "undefined") h = 300;
      if (typeof(w) == "undefined") w = 400;
      
      var screenW = screen.width;
      var screenH = screen.height;
      var posX = (screenW/2)-(w/2);
      var posY = (screenH/2)-(h/2);
      
      sFeatures = "screenY="+posY+",screenX="+posX+",top="+posY+",left="+posX+",height="+h+",width="+w;
      
      if (typeof(scroll) != "undefined"){ sFeatures += ",scrollbars=" + scroll; }
      if (typeof(resize) != "undefined"){ sFeatures += ",resizable=" + resize; }
      if (typeof(status) != "undefined"){ sFeatures += ",status=" + status; }
      if (typeof(title) != "undefined"){ sFeatures += ",titlebar=" + title; }
      if (typeof(tool) != "undefined"){ sFeatures += ",toolbar=" + tool; }
      if (typeof(menubar) != "undefined"){ sFeatures += ",menubar=" + menubar; }
      
      //alert(sFeatures);
      var win = window.open(url,name,sFeatures);
      win.focus();
      return win;
}

function helpFile(which)
{
	var url = "/Help/Index.aspx#";
	openWin(url + which,"_help",600,500,'yes','no','yes','yes','yes','yes');
}
