
function isPresent(object) {
    return object ? true : false;
}

var isOpera, isNN, ieIE, isMozilla
isOpera = isPresent(navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById);
isIE = isPresent(document.all);
isNN = isPresent(document.layers);
isMozilla = isPresent(!document.all && document.getElementById);
var idVisible = ""



function GetStyleProperty(id) {
    var prop;
    if(isIE) prop=eval("document.all."+id+".style");
    if(isNN) prop=eval("document."+id);
    if(isMozilla || isOpera) prop=eval("document.getElementById('"+id+"').style");
    return prop;
}


function h_showsubmenu(id, bShow)
{

	
var submenustyle=GetStyleProperty(id)
if (!submenustyle)
{
		alert("Unfortunately your browser will not do this - this site was built for IE - sorry")
		return
		}

	
submenustyle.visibility  = (bShow ? "visible" : "hidden")

if (submenustyle.visibility == "visible")
	{
	if ((idVisible !== "") && (idVisible !== id))
		{
		submenustyle=GetStyleProperty(idVisible)
		submenustyle.visibility = "hidden"
		}
  idVisible = id
  
	}
  if (!document.getElementById("ddlTitle"))
	return;
  var oDrop = GetStyleProperty("ddlTitle")
  if (!oDrop)
		return
  oDrop.visibility = "hidden"
}

function h_hidesubmenus()
{
	var s 
	for (i = 1; i < 6 ; i++)
		{
			s = 'submenu' + i
			h_showsubmenu(s, false)
		}
if (!document.getElementById("ddlTitle"))
	return;
  	
	var oDrop = GetStyleProperty("ddlTitle")
  if (!oDrop)
   return
	oDrop.visibility = "visible";
	
}
function h_gopage(sURL,sBookmark,sQuerystring)
{
sURL = escape(sURL)
if ((sBookmark !== null) && (typeof(sBookmark) !== "undefined") && (sBookmark !== ""))
	sURL = sURL + "#" + sBookmark
	
if ((sQuerystring !== null) && (typeof(sQuerystring) !== "undefined") && (sQuerystring !== ""))
	sURL = sURL + sQuerystring

window.document.location.href = sURL;
}

function h_godownload(sDescription,sFile)
{
window.document.location.href = "UserRequest.aspx?req=dld&doc=" + escape(sFile) + "&des=" + escape(sDescription) + "&frm=" + escape(window.document.location.href);
}

function h_enquiry(sEventName,sEventDate,sEventPrice)
{
if ((sEventDate == null) || (typeof(sEventDate) == "undefined"))
	{sEventDate = ""}

window.document.location.href = "UserRequest.aspx?req=enq&evt=" + escape(sEventName) + "&evd=" + escape(sEventDate)  + "&frm=" + escape(window.document.location.href);

}

function h_buy(iProductNo)
{
if (isPresent(window.document.activeElement))
	h_enquiry(window.document.activeElement.innerHTML)
else
	if (document.getElementById(iProductNo))
			h_enquiry(document.getElementById(iProductNo).innerHTML)
	else
		alert("sorry -your browser can't find:" + iProductNo)	
}


