Array.prototype.has = function (val)
{
	for (e=0;e<this.length;e++){
		if (this[e]==val)  {
			return true;
		}
	}
	return false;
}
function item_over (itm)
{
	cls = trim(itm.getAttribute("class"));
	
	if (cls.indexOf("_selected")<0) {
		cls += "_over";
	}
	itm.setAttribute("class",cls);
}
function item_out (itm)
{
	cls = itm.getAttribute("class");
	cls = cls.replace("_over","");
	itm.setAttribute("class",cls);
}
function item_deselect (itm)
{
	cls = itm.getAttribute("class");
	cls = cls.replace("_selected","");
	itm.setAttribute("class",cls);
}
function item_select (itm)
{
	cls = itm.getAttribute("class");
	cls = cls + "_selected";
	itm.setAttribute("class",cls);
}
function gotoUrl(url)
{
	window.location = url;
}
function trim (str) {
	var	str = str.replace(/^\s\s*/, ''),
		ws = /\s/,
		i = str.length;
	while (ws.test(str.charAt(--i)));
	return str.slice(0, i + 1);
}
