var Mac = (navigator.userAgent.indexOf("Mac") != -1 )
var IE = (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Mac") == -1 && navigator.appVersion.substring(0,1) >= 3);
var NS = (navigator.userAgent.indexOf("Mozilla") != -1 && navigator.userAgent.indexOf("Mac") == -1 && navigator.userAgent.indexOf("MSIE") == -1 && navigator.appVersion.substring(0,1) >= 4);

if (IE)
{
	//document.write("<LINK REL=STYLESHEET HREF=\"/jobs/css/ie_style.css\" TYPE=\"text/css\">");
}

if (Mac)
{
	//document.write("<LINK REL=STYLESHEET HREF=\"/jobs/css/mac_style.css\" TYPE=\"text/css\">");
}

if (NS)
{
	//document.write("<LINK REL=STYLESHEET HREF=\"/jobs/css/ns_style.css\" TYPE=\"text/css\">");
}

var boolBrowserIsCompatible = (navigator.userAgent.indexOf("Mozilla/3") != -1 || navigator.userAgent.indexOf("Mozilla/4") != -1);
var arrGraphics = new Array();
var intTotalGraphics = 0;
var intThisPageID = 0;
var intCntr = 0;


function objGraphic(ID,Destination,ImagePathPrefix)
{
	this.ID = ID;
	this.Destination = Destination;
	if (boolBrowserIsCompatible)
	{
		this.off = new Image();
		this.on = new Image();
		this.selected = new Image();
		this.off.src = ImagePathPrefix + strImagePathOff + strImageFileSuffix;
		this.on.src = ImagePathPrefix + strImagePathOn + strImageFileSuffix;
		this.selected.src = ImagePathPrefix + strImagePathSelected + strImageFileSuffix;
	}
}

function CreateNewGraphic(intID,strDest,ImagePathPrefix)
{
	intTotalGraphics++;
	arrGraphics[intTotalGraphics] = new objGraphic(intID,strDest,ImagePathPrefix);
}

function DoMouseDown(intID)
{
	if (boolBrowserIsCompatible)
	{
		if (intThisPageID != intID)
		{
			document.images["img" + intID].src = arrGraphics[intID].on.src;
		}
		else
		{
			document.images["img" + intID].src = arrGraphics[intID].selected.src;
		}
	}
}

function DoMouseUp(intID)
{
	if (boolBrowserIsCompatible)
	{
		if (intThisPageID != intID)
		{
			document.images["img" + intID].src = arrGraphics[intID].selected.src;
		}
		else
		{
			document.images["img" + intID].src = arrGraphics[intID].selected.src;
		}
	}
}

function DoMouseDim(intID)
{
	if (boolBrowserIsCompatible)
	{
		if (intThisPageID != intID)
		{
			document.images["img" + intID].src = arrGraphics[intID].off.src;
		}
		else
		{
			document.images["img" + intID].src = arrGraphics[intID].selected.src;
		}
	}
}
