function get_path (source)
{
	index = source.lastIndexOf("/");
	if (index>0)
	 return source.slice(0, index+1);
	else
	 return "";
}

function listover (elem)
{
 	document.getElementById(elem).className = "grey_row";
	elem += "_a";
	document.getElementById(elem).className = "white_link";

}

function listout (elem)
{
 	document.getElementById(elem).className = "";
	elem += "_a";
	document.getElementById(elem).className = "grey_link";

}

function ln_over1 (elem)
{
	path = get_path(document.getElementById((elem+"_1")).src);
 	document.getElementById(elem).background = path+"btn_ln_1_2.png";
 	document.getElementById((elem+"_1")).src = path+"btn_ln_1_1.png";
 	document.getElementById((elem+"_2")).src = path+"btn_ln_1_3.png";	
}

function ln_out1 (elem)
{
	path = get_path(document.getElementById((elem+"_1")).src);
 	document.getElementById(elem).background = path+"btn_ln_2_2.png";
 	document.getElementById((elem+"_1")).src = path+"btn_ln_2_1.png";
 	document.getElementById((elem+"_2")).src = path+"btn_ln_2_3.png";	
}

function prod_over (elem)
{
	elem2 = "prod_"+elem;
	path = get_path(document.getElementById((elem2)).src);
 	document.getElementById(elem2).src = path+"btn_"+elem+"_2.png";
}

function prod_out (elem)
{
	elem2 = "prod_"+elem;
	path = get_path(document.getElementById((elem2)).src);
 	document.getElementById(elem2).src = path+"btn_"+elem+"_1.png";
}

function menu_over (elem)
{
	elem2 = "menu_"+elem;
	path = get_path(document.getElementById((elem2)).background);
 	document.getElementById(elem2).background = path+"btn_menu_1.png";
}

function menu_out (elem)
{
	elem2 = "menu_"+elem;
	path = get_path(document.getElementById((elem2)).background);
 	document.getElementById(elem2).background = path+"menu_1_4.png";
}

function goSort ()
{
 	document.forms['sortForm'].submit();
}

function sForm (cName, cAction)
{
 	elem = document.forms[cName];
	elem.act.value = cAction;
	document.forms[cName].submit ();

}

function goToList (cVal)
{
 	document.forms['sortForm_h'].list.value = cVal;
 	document.forms['sortForm_h'].submit();
}

<!--
function Images(url, width, height) {
	var left = Math.round((screen.width/2)-(width/2));
	var top = Math.round((screen.height/2)-(height/2));
	FormWin = window.open(url, '', "width="+width+", height="+height+", menubar=no, resizable=no, scrollbars=no, status=no, border=no, toolbar=no, left="+left+", top="+top);
	FormWin.focus();
}
function VRview(url, width, height) {
	var left = Math.round((screen.width/2)-(width/2));
	var top = Math.round((screen.height/2)-(height/2));
	FormWin = window.open(url, '', "width="+width+", height="+height+", menubar=no, resizable=yes, scrollbars=no, status=no, border=no, toolbar=no, left="+left+", top="+top);
	FormWin.focus();
}

function newWindow(url, width, height) {
	var left = Math.round((screen.width/2)-(width/2));
	var top = Math.round((screen.height/2)-(height/2));
	FormWin = window.open(url, '', "width="+width+", height="+height+", menubar=no, resizable=no, scrollbars=no, status=no, border=no, toolbar=no, left="+left+", top="+top);
	FormWin.focus();
}
-->
