function sfHover()
{
	var str_className;
	var arr_classNames = new Array('submenu', 'menu');
	for (var x = 0; x < arr_classNames.length; x++)
	{
		str_className = arr_classNames[x];
		var sfEls = document.getElementById("table_"+ str_className).getElementsByTagName("td");
		for (var i=0; i<sfEls.length; i++)
		{
			if ((sfEls[i].className == str_className +'_item') || (sfEls[i].className == str_className +'_item_active'))
			{
				sfEls[i].onmouseover=function()
				{
					this.className+= "_hover";
				}
				sfEls[i].onmouseout=function()
				{
					this.className=this.className.replace(new RegExp("_hover", "gi"), "");
				}
			}
		}
	}
}

function getIeVersion()
{
	var versionSearchString = 'MSIE';
	var index = navigator.userAgent.indexOf(versionSearchString);
	if (index == -1) return 0;
	return parseFloat(navigator.userAgent.substring(index + versionSearchString.length+1));
}

var v = getIeVersion();
if (v > 0 && v < 7)
{
	if (window.attachEvent) window.attachEvent("onload", sfHover);
}

function appendOnLoadAlert(str_msg)
{
	var appendOnLoadAlert_oldOnload = (window.onload) ? window.onload : function () { };
	window.onload = function () { appendOnLoadAlert_oldOnload(); alert(str_msg); }
}

function input_onfocus(obj_input, str_default)
{
	if (obj_input.value == str_default)
		obj_input.value = '';
	else
		obj_input.select();

	return true;
}

function input_onblur(obj_input, str_default)
{
	if (obj_input.value == '')
		obj_input.value = str_default;
	return true;
}

function popImg(sImg, width, height, caption)
{
	winFeatures = "width=" + width + ",height=" + height + ",left=50,top=50,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,location=no";
	spawn = window.open(sImg, "", winFeatures);
	spawn.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="pragma" content="no-cache"><meta http-equiv="expires" content="sat, 01 jan 2000 1:00:00 gmt"><title>'+ caption +'<\/title><\/head>'+
		'<body onBlur="self.close()" onclick="self.close()" background="'+ sImg +'" '+
		'style="background-repeat: no-repeat; background-position: top center;"><\/body><\/html>');
	spawn.document.close();
}