﻿/*****************************************************
 * JavaScript routines for handling rolldown menus
 *
 * Created 13OCT08 Julian Madle - Future Shock Ltd
 *
 *****************************************************/

function showRolldown(strRolldownID) {
    if ((document.getElementById) && (document.getElementById(strRolldownID))) {setRolldownDisplay(strRolldownID,true)}
    }

function hideRolldown(strRolldownID) {
    if ((document.getElementById) && (document.getElementById(strRolldownID))) {document.getElementById(strRolldownID).timeout=setTimeout("setRolldownDisplay('" + strRolldownID + "',false)",250)}
    }

function setRolldownDisplay(strRolldownID,state) {
    if ((document.getElementById) && (document.getElementById(strRolldownID))) {
        var objRolldown=document.getElementById(strRolldownID);
        if (objRolldown.timeout) {clearTimeout(objRolldown.timeout); objRolldown.timeout=null}
        objRolldown.style.display=(state ? "block" : "none");
        var parentLink=objRolldown.parentNode.parentNode.getElementsByTagName("A")[0];
        if (state) {parentLink.style.backgroundColor="#FF6600"} else {parentLink.style.backgroundColor="#7d706d"}
        }
    }

function FSfncPopUp(NextPage,width,height,resizable,scrollbars,status) {
	// resizable,scrollbars, and status are optional, when not provided these default to no.
	// Implement by adding onClick handler to any element, eg. onClick="FSfncPopUp('PopupContent.htm',200,100,'yes','yes','yes')".
	if (resizable=="") {resizable="no"}
	if (scrollbars=="") {scrollbars="no"}
	if (status=="") {status="no"}
	x=self.screenLeft + 10;
	y=self.screenTop + 10;
	if (navigator.appVersion.indexOf("AOL")>0) {winName="A" + (Math.round(Math.random() * 1000))} else {winName="FSpopUpWindow"}
	FSpopUp=window.open(NextPage,winName,'toolbar=no,width=' + width + ',height=' + height + ',left=' + x + ',screenX=' + x + ',top=' + y + ',screenY=' + y + ',status=' + status + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',menubar=no,directories=no');
	}
