//
function PopUp(info, info1, w, h, scroll) {

var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize';
info = info + "?";
win = window.open(info, info1, winprops);
}

// Date Display Function

function displayDate(){
    var this_month = new Array(12);
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "July";
    this_month[7]  = "August";
    this_month[8]  = "September";
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "December";
    var today = new Date();
    var day   = today.getDate();
    var month = today.getMonth();
    var year  = today.getYear();
    if (year < 1900){
        year += 1900;
    }
    return(day+" "+this_month[month]+" " +year);
}

// Newco Browser Sniff

	// Files and directory structures
	var cssDir = "http://www.sysgin.com/play/css/";
	var winNS4CSS = "styles_win_ns4.css";
	var winIECSS = "styles_win_ie.css";
	var macCSS = "styles_mac.css";
	var macNS4CSS = "styles_mac_ns4.css";
	var unixCSS = "styles_unix.css";

// Function to choose the style sheet for use based on the platform
	// and browser version
	function ChooseStyleSheet() {
	  var fileHead = cssDir;
	  var styles;
	  document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + styles + "\">");
	  return true;
	}
	
	//vars for current header and menu
	var activeHeader = null;
	var activeMenu = null;
	
	//Sets the current header and menu
	function dropON(droptopID,dropID)
	{
		var top = 0;
		var left = 0;
		var workVAR1;
		var obj;
		var workVAR2;

		
		if(document.all)
		{
			if(activeHeader != null && activeMenu != null)
			{
				if(activeMenu.style.visibility != 'hidden')
				{
					activeMenu.style.visibility = 'hidden';
					for(var i = 0; i < document.all.tags("select").length; i++)
					{
						obj = document.all.tags("select")[i];
						if(!obj || !obj.offsetParent)
							continue;
						obj.style.visibility = 'visible';
					}
				}
			}
		
			activeHeader = eval("document.all('" + droptopID + "');");
			activeMenu = eval("document.all('" + dropID + "');");
			if(activeHeader.className.toLowerCase() == 'bgcharsmlblkpur')
			{
				activeHeader.className = 'bgcharsmlpurpur';
			}
			else
			{
			activeHeader.className = 'bgcharsmlblkpur';
			}
			workVAR1 = activeHeader;
				
			//Find the top and left of header and its parent elements
			while(workVAR1.tagName.toLowerCase() != 'body')
			{
				top += workVAR1.offsetTop;
				left += workVAR1.offsetLeft;
				workVAR1 = workVAR1.offsetParent;
			}
			
			//Add the width of the header, and width of extra image.
			top += (activeHeader.offsetHeight);
						
			activeMenu.style.left = left;
			activeMenu.style.top = top;
			
			for(var i = 0; i < document.all.tags("select").length; i++)
			{
				obj = document.all.tags("select")[i];
				workVAR1 = obj;
		
				while(workVAR1.tagName.toLowerCase() != 'body')
				{
					top += workVAR1.offsetTop;
					left += workVAR1.offsetLeft;
					workVAR1 = workVAR1.offsetParent;
				}
				if(activeMenu != null)
				{
					workVAR2 = (activeMenu.offsetTop + activeMenu.offsetHeight);
				
					if(top < workVAR2)
					{			
						if((left < (activeMenu.offsetLeft + activeMenu.offsetWidth)) && (left + obj.offsetWidth > activeMenu.offsetLeft)) 
							obj.style.visibility = 'hidden';
					}
				}
				top = 0;
				left = 0;
			}
			if(document.all)
			{
				activeMenu.style.visibility = 'visible';
			}
			
			event.cancelBubble = true;
		}
	}
	
	//Hide the current menu and reset vars
	//if the moved to element is not contained
	//within the menu.
	function dropOFF()
	{
		var obj;

		if(document.all)
		{
			if(activeHeader != null && activeMenu != null)
			{
				//Check if the "moved to" element is not 
				//contained within activeMenu.
				if(!activeMenu.contains(event.toElement)) 
				{
					activeMenu.style.visibility = 'hidden';
					if(activeHeader.className.toLowerCase() == 'bgcharsmlblkpur')
					{
						activeHeader.className = 'bgcharsmlpurpur';
					}
					else
					{
						activeHeader.className = 'bgcharsmlblkpur';
					}
					activeHeader = null;
					activeMenu = null;
					for(var i = 0; i < document.all.tags("select").length; i++)
					{
						obj = document.all.tags("select")[i];
						if(!obj || !obj.offsetParent)
							continue;
						obj.style.visibility = 'visible';
					}
				}
			}
		}
	}
