/*	Copyright (C) 2004 Masque Graphics Limited.  All Rights Reserved. */

// browser initialisation
initBrowser();

function initBrowser() {
dom = (document.getElementById)? true:false;
ie4 = (document.all && !dom)? true:false;
ie5 = (dom && navigator.appVersion.indexOf("MSIE 5")>-1)? true:false;
ns4 = (document.layers)? true:false;
ns6 = (document.createRange)? true:false;
opera = (navigator.userAgent.indexOf("Opera")>-1)? true:false;
ismac=(navigator.platform.indexOf("Mac")>-1);
}

// removing the border when clicking on a link with ie
function unfocusImageLink() {
for (a in document.links) document.links[a].onfocus=document.links[a].blur;
}

function imgSet(imgName,imgSetName) {
eval( "document." + imgName + ".src="+imgSetName+".src" );
}

if (ie4 || ie5) document.onmousedown = unfocusImageLink;

function objStyle(sID) {
    var obj=null;
    if (document.layers)
        obj=document.layers[sID];
    else if (document.all)
        obj=document.all(sID);
    else if (document.getElementById)
        obj=document.getElementById(sID);

    if (obj!=null && obj.style)
        obj=obj.style;

    return obj;
}
function show(sID) {
    var obj=objStyle(sID);
    if (obj!=null) {
        if (document.layers)
            obj.visibility="show";
        else
            obj.visibility="visible";
    }
}
function hide(sID) {
    var obj=objStyle(sID);
    if (obj!=null) {
        if (document.layers)
            obj.visibility="hide";
        else
            obj.visibility="hidden";
    }
}
function subOn(sID,col) {
	var o=objStyle(sID);
	if (o!=null)
		o.borderRightColor=col;
}
function subOff(sID,col) {
	var o=objStyle(sID);
	if (o!=null)
		o.borderRightColor=col;
}
function doPop(sURL,w,h,scrl) {
	scrl=((scrl==null || !scrl) ? "no" : "yes");
	window.open(sURL,"ABBCpop","width="+w+",height="+h+",toolbar=no,status=no,scrollbars="+scrl+",resizable=no",true);
}