function gotoURL(url, target, callback)
{
	if (!url)
	{
		url = "/";
	}

	if ('function' == typeof callback)
	{
		callback(url);
	}

	if(target && '_self' != target)
	{
		popupURL(url, target);
	}
	else
	{
		if (window.event)
		{
			var src = window.event.srcElement;
			if (('A' != src.tagName) && (('IMG' != src.tagName) || ('A' != src.parentElement.tagName)))
			{
				if (window.event.shiftKey)
				{
					window.open(url);
				}
				else
				{
					document.location = url;
				}
			}
		}
		else
		{
			document.location = url;
		}
	}
}

function popupURL(url, target)
{
	window.open(url, target);
}

function getLeftPos(obj)
{
	var res = 0;
	while (obj)
	{
		res += obj.offsetLeft;
		obj = obj.offsetParent;
	}
	return res;
}

function getTopPos(obj)
{
	var res = 0;
	while (obj)
	{
		res += obj.offsetTop;
		obj = obj.offsetParent;
	}
	return res;
}

function preLoad()
{
	if(document.images)
	{
		var argLen = arguments.length;
		for (var i = 0; i < argLen; i++)
		{
			var arg = arguments[i];
			self[arg] = new Image();
			self[arg].src = arg;
		}
	}
}

function ch_img(obj, img )
{
	if (self[img])
	{
		obj.src = self[img].src;
	}
}

function mm_act(obj, img, cl, num, selected)
{
	obj.selected = selected;
	if ('item act' == cl)
	{
		obj.imgAct = img;
		obj.classAct = cl;
		showMenu(obj, num);
	}
	else
	{
		obj.imgInact = img;
		obj.classInact = cl;
		hideMenu(obj, num);
	}
	if (selected)
	{
		return;
	}
}

function mm_highlight(obj, act)
{
	if (obj.selected)
	{
		return;
	}
	if (act)
	{
		img = obj.imgAct;
		cl = obj.classAct;
	}
	else
	{
		img = obj.imgInact;
		cl = obj.classInact;
	}

	if ('undefined' == typeof img || 'undefined' == typeof cl)
	{
		return;
	}

	while (obj)
	{
		obj = obj.childNodes[0];
		if (obj && obj.tagName == 'IMG')
		{
			ch_img(obj,img);
			break;
		}
	}

	while (obj && '' != cl)
	{
		obj = obj.parentNode;
		if (obj && 'DIV' == obj.tagName)
		{
			obj.className = cl;
			break;
		}
	}
}