// Object containing global website navigation links
function SiteLinkObject(description,page,iName,onImg,offImg)
{
	this.description = description
	this.page = page
	this.imgName = iName;
	this.onImage = onImg;
	this.offImage = offImg;
}

// Constants for the main navigation menu items
HOME 		= 0
ABOUTUS 	= 1
SERVICES 	= 2
STAFF    	= 3
CONTACTUS 	= 4

// List containing object for the main navigation menu
SiteLinkList = new Array()
SiteLinkList[HOME] = new SiteLinkObject('Home Page','index.htm','nav_home','images/nav_home_on.gif','images/nav_home_off.gif')
SiteLinkList[ABOUTUS] = new SiteLinkObject('About Us','aboutus.htm','nav_aboutus','images/nav_aboutus_on.gif','images/nav_aboutus_off.gif')
SiteLinkList[SERVICES] = new SiteLinkObject('Services','services.htm','nav_services','images/nav_services_on.gif','images/nav_services_off.gif')
SiteLinkList[STAFF] = new SiteLinkObject('Staff','staff.htm','nav_staff','images/nav_staff_on.gif','images/nav_staff_off.gif')
SiteLinkList[CONTACTUS] = new SiteLinkObject('Contact Us','contactus.htm','nav_contactus','images/nav_contactus_on.gif','images/nav_contactus_off.gif')

// Link to a page from the main navigation menu
function doSiteLink(index)
{
	if ((index >= HOME) && (index <= CONTACTUS)) 
	{
		curLink = SiteLinkList[index]
		if (curLink != null)
		{
			if (curLink.page == '')
			{
				alert('The page "'+curLink.description+'" is under construction.  Please check again at a later date.')
			}
			else
			{
				window.location.href = curLink.page
			}
		}
	}
}

function replacePage(pageURL)
{
	window.location.replace(pageURL)
}

function gotoPage(pageURL)
{
	window.location.href = pageURL
}

// Function to perform rollovers for the main navigation menu
function changeNavImage(index,state)
{
	curImage = SiteLinkList[index]
	if ((curImage != null) && (document.images[curImage.imgName] != null))
	{
		if (state == 1) 
		{
			document.images[curImage.imgName].src = curImage.onImage;
		}
		else
		{
			document.images[curImage.imgName].src = curImage.offImage;
		}
	}
}

function doPopup(pageURL,windowWidth,windowHeight) 
{
	// path, width and height as arguments
	winparams = 'Width=' + windowWidth + ',Height=' + windowHeight + 'resizable=yes,scrollbars=yes'
	if (screen != null)
	{
		var winl = (screen.width - windowWidth) / 2;
		var wint = (screen.height - windowHeight) / 2;
		winparams = winparams+",left="+winl+",top="+wint
	}

	employmentWindow = window.open(pageURL,'EMPLOYMENT',winparams);
}


