function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function submitSearch() {
}

function swapImage(imageName, stateTo) {
	if (document.images) {
		if (stateTo=='on') {
			document.images[imageName].src = eval(imageName + '_mo.src')

//			if (imageName!='b_homeicon') document.images['b_descr'].src = eval(imageName + '_descr.src');			

		} else {
			document.images[imageName].src = eval(imageName + '.src')			
		}
	}
}

if (document.images) {
	var b_sitemap = new Image(); b_sitemap.src = 'img/icon_sitemap.gif';
	var b_sitemap_mo = new Image(); b_sitemap_mo.src = 'img/icon_sitemap_mo.gif';

	var b_share = new Image(); b_share.src = 'img/icon_share.gif';
	var b_share_mo = new Image(); b_share_mo.src = 'img/icon_share_mo.gif';

	var b_fav = new Image(); b_fav.src = 'img/icon_fav.gif';
	var b_fav_mo = new Image(); b_fav_mo.src = 'img/icon_fav_mo.gif';

	var b_print = new Image(); b_print.src = 'img/icon_print.gif';
	var b_print_mo = new Image(); b_print_mo.src = 'img/icon_print_mo.gif';
					
	var b_homeicon = newImage('img/b_home.gif');
	var b_homeicon_mo = newImage('img/b_home_mo.gif');
}
			
function swapPic(whichPic,whichSrc, blnIsObject){
	if (document.images) {
		if(blnIsObject=="True") {
			document.images[whichPic].src = eval(whichSrc + '.src')
		} else {
			document.images[whichPic].src = whichSrc
		}
	}
}

function show() {
	var args = show.arguments;
		swapImage('b_' + args[0], 'on');
	layerVisibility(args[0],'on');
}

function hide() {
	var args = hide.arguments;
	layerVisibility(args[0],'off');
	//if (!layerVisibility(args[0],'on')) swapImage('b_' + args[0], 'off');
}

function linkTo(strMenu) {
	void(0)

}

//these are for the tool box layers

var timerToolbar = null;
var activeLayer = '';

function hideLayer(theLayer,intDelay) {
var strTimeout;
	if (typeof(document.all[theLayer]) == 'object') {
		strTimeout = 'document.all.tags(\'DIV\')[\'' + theLayer + '\'].style.visibility=\'hidden\';swapImage(\'b_' + theLayer +'\', \'off\');';
		timerToolbar = setTimeout(strTimeout,intDelay); 
	}
}

function layerVisibility(theLayer,toState) {
var intWinWidth = document.body.clientWidth;
var intXCoordToAdd;
	if (typeof(document.all[theLayer])=='object' && blnOffset) {
		if (toState=='on') {
			if (timerToolbar)  {
				clearTimeout(timerToolbar);
			}
			if (activeLayer != theLayer)
			{	hideLayer(activeLayer,0);	}
			intXCoordToAdd = eval('intOffset'+theLayer);	
			if (intWinWidth > 760)
			{
				document.all[theLayer].style.left = (((intWinWidth-760)/2)+353	)+intXCoordToAdd;
			}
			else {
				document.all[theLayer].style.left = 396+intXCoordToAdd;		
			}
			
			document.all[theLayer].style.visibility="visible";
			activeLayer = theLayer;
		}
		else if (toState=='off') {
			hideLayer(theLayer,400);		
		}
	}
}

var objDrpMenuTimer = null;

function showDrpLayer(f_strId) {
	if (typeof(document.all[f_strId]) == 'object' && typeof(document.all['drp_menu_href_' + f_strId]) == 'object') {
		var objLink = document.all['drp_menu_href_' + f_strId];
		var objDrpMenu = document.all[f_strId];
		if (objDrpMenuTimer)  {			
			clearTimeout(objDrpMenuTimer);
		}		
		objDrpMenu.style.left = getCoord(objLink, 'floatingNavi', 'x') - 4;
		objDrpMenu.style.top = getCoord(objLink, 'floatingNavi', 'y') + 15;

		objDrpMenu.style.display = 'block';
	}
}
function hideDrpLayer(f_strId) {
	if (typeof(document.all[f_strId])=='object') {
		var objDrpMenu = document.all[f_strId];
		var strTimeout = 'document.all[\'' + f_strId + '\'].style.display = \'none\'';
		objDrpMenuTimer = setTimeout(strTimeout, 400);
	}
}
function empty() {
	return true;
}
