/*
 *==================================================================================================
 * FILE	: ind_fun.js
 * DESC	: - Javascript functions related to business logic of Search by Industry homepage
 *
 *				- with global variables defined
 *					> event_x_pos
 *					> event_y_pos
 *					> selectedInd
 *					> selectedIndJobCount
 *
 * BY		: Alfred Cheong ITSD C3D
 * HIST :
 *				- 20030228 first version
 *==================================================================================================
 */

function menuTimeout(src) {
	if (selectedInd == src) {
		selectedInd='';
		selectedIndJobCount=0;

		hideObjects('menu_industries',
								'menu_pointer_left',
								'menu_pointer_right');

		SwapImage('ind_' + src + '_1', '');
		SwapBackground('ind_' + src + '_2', '');

//		document.getElementById('ind_' + src + '_1').focus();
	}
}


function menuTimeout_800(src) {
	if (selectedInd == src) {
		selectedInd='';
		selectedIndJobCount=0;

		hideObjects('menu_industries',
								'menu_pointer_left',
								'menu_pointer_right');

		SwapImage('ind_' + src + '_1', '');
		SwapBackground('ind_' + src + '_2', '');
		SwapBackground('ind_' + src + '_3', '');
		SwapImage('ind_' + src + '_4', '');

//		document.getElementById('ind_' + src + '_1').focus();
	}
}


function IndLinkMouseOver(src) {
	if (selectedInd != src) {
		SwapImage('ind_' + src + '_1', '_clk');
		SwapBackground('ind_' + src + '_2', '_clk');
	}
}


function IndLinkMouseOver_800(src) {
	if (selectedInd != src) {
		SwapImage('ind_' + src + '_1', '_clk');
		SwapBackground('ind_' + src + '_2', '_clk');
		SwapBackground('ind_' + src + '_3', '_clk');
		SwapImage('ind_' + src + '_4', '_clk');
	}
}


function IndLinkMouseOut(src) {
	if (selectedInd != src) {
		SwapImage('ind_' + src + '_1', '');
		SwapBackground('ind_' + src + '_2', '');
	}
}


function IndLinkMouseOut_800(src) {
	if (selectedInd != src) {
		SwapImage('ind_' + src + '_1', '');
		SwapBackground('ind_' + src + '_2', '');
		SwapBackground('ind_' + src + '_3', '');
		SwapImage('ind_' + src + '_4', '');
	}
}


function IndLinkClick(src, srcJobCount, col, x_pos, y_pos) {
	event_x_pos = x_pos;
	event_y_pos = y_pos;

	if (selectedInd != "") {
		SwapImage('ind_' + selectedInd + '_1', '');
		SwapBackground('ind_' + selectedInd + '_2', '');
	}

	selectedInd=src;
	selectedIndJobCount=srcJobCount;

	SwapImage('ind_' + src + '_1', '_clk');
	SwapBackground('ind_' + src + '_2', '_clk');

	triggerMenu(src, col);
}


function IndLinkClick_800(src, srcJobCount, col, x_pos, y_pos) {
	event_x_pos = x_pos;
	event_y_pos = y_pos;

	if (selectedInd != "") {
		SwapImage('ind_' + selectedInd + '_1', '');
		SwapBackground('ind_' + selectedInd + '_2', '');
		SwapBackground('ind_' + selectedInd + '_3', '');
		SwapImage('ind_' + selectedInd + '_4', '');
	}

	selectedInd=src;
	selectedIndJobCount=srcJobCount;

	SwapImage('ind_' + src + '_1', '_clk');
	SwapBackground('ind_' + src + '_2', '_clk');
	SwapBackground('ind_' + src + '_3', '_clk');
	SwapImage('ind_' + src + '_4', '_clk');

	triggerMenu(src, col);
}

