// Madgex Limited
// Copyright (c) 2005 Madgex Limited. All Rights Reserved.
// Drop Menu 
// 12 Aug 2004 (23 Nov 2004)
// Version 1

// This code has been tested on IE 5-6 win, NS 6+ win, Firefox 1 win, and Mozilla 1+ win
// It does not conform to W3C DOM2 standard as it supports IE4. Do not use
// with XHTML strict doctype.

/*
var is = new Is();

function Is () {
	var agt=navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.gecko = (agt.indexOf('gecko') != -1);
	this.safari = (agt.indexOf('safari') != -1);
	this.camino = (agt.indexOf('camino') != -1);
    this.ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
    this.ie4up  = (this.ie  && (this.major >= 4));
    this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
    this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
    this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
    this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);
   	this.win = ((agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1));
    this.mac = (agt.indexOf("mac")!=-1);
}

function CSSClassRef(){
	if (is.gecko) sRef =  "class" ;
	if (is.ie4up) sRef = "className";
	return sRef;
}

*/


function LoadButtons(){
									// over, out
	LoadButton("jobsbutton", "jobsover", "jobs");
	LoadButton("subscribebutton", "subscribeover", "subscribe");
	LoadButton("logonbutton", "logonover", "logon");
	LoadNewsButton();
}

function LoadButton(objname, c1, c2){
	if(document.getElementById){
		if(document.getElementById(objname))
		{
			oATag = document.getElementById(objname);
			oATag.setAttribute("overclass",c1);
			oATag.setAttribute("outclass",c2);
			oATag.onmouseover = mousebuttonover;
			oATag.onmouseout = mousebuttonout;
		}
	}
}

function LoadNewsButton(){
	if(document.getElementById){
		if(document.getElementById("breakingnewsbutton"))
		{
			oATag = document.getElementById("breakingnewsbutton");
			oATag.setAttribute("overclass","newsover");
			oATag.setAttribute("outclass","news");
			oATag.onmouseover = mousebuttonover;
			oATag.onmouseout = NewsButtonOut;
		}
	}
}

function NewsButtonOut(){
	if(document.getElementById){
		obj = document.getElementById("breakingnewsbutton");
		if(document.getElementById("M"))
		{
			oMenu = document.getElementById("M");
			//alert(oMenu.style.display);
			if(oMenu.style.display != "block"){
				obj.parentNode.setAttribute(CSSClassRef(),"news");
			}
		}
	}
}

function NewsButtonOutCall(){
	if(document.getElementById){
		obj = document.getElementById("breakingnewsbutton");
		obj.parentNode.setAttribute(CSSClassRef(),"news");
	}
}

function NewsButtonOverCall(){
	if(document.getElementById){
		obj = document.getElementById("breakingnewsbutton");
		obj.parentNode.setAttribute(CSSClassRef(),"newsover");
	}
}

function mousebuttonover(event){
	if (window.event) {
		obj = window.event.srcElement;
	}else{
		obj = event.target;
	}
	obj.parentNode.setAttribute(CSSClassRef(),obj.getAttribute("overclass"));
}

function mousebuttonout(event){
	if (window.event) {
		obj = window.event.srcElement;
	}else{
		obj = event.target;
	}
	obj.parentNode.setAttribute(CSSClassRef(),obj.getAttribute("outclass"));
}


