function show(id)
{
	h = document.getElementById(id);
	if(h)
	{
		h.style.display = "";
		//ie bug fix
		show(id + "_");
	}
}

function get_value(id)
{
h = document.getElementById(id);
if(h) return h.value;

}

function set_value(id, text)
{
h = document.getElementById(id);
if(h) h.value=text;

}

function hide(id)
{
	h = document.getElementById(id);
	if(h)
	{
		h.style.display = "none";
		//ie bug fix
		hide(id + "_");
	}
}

function toogle(id)
{
h = document.getElementById(id);
if (h)
{
if (h.style.display == "none")
	show(id);
else	hide(id);
}
};

function getselected(id)
{
h=document.getElementById(id);
if(h) return h.selectedIndex;
}
function setselected(id, index)
{
h=document.getElementById(id);
if(h) h.selectedIndex=index;
}
function settext(id, text)
{
h = document.getElementById(id);
if(h) h.innerHTML = text;
}

function appendtext(id, text)
{
h = document.getElementById(id);
if(h) h.innerHTML += text;
}

function setoption(id, optnum, text)
{
h = document.getElementById(id);
if(h) h.options[optnum] = new Option(text);
}

function addoption(id, text)
{
h = document.getElementById(id);
if(h) {h.options[h.options.length] = new Option(text);return (h.options.length-1);}

}

function clear_select(id)
{h = document.getElementById(id);

while (h.options.length>0)
h.options[h.options.length-1]=null;

}

function deleteoption(id, num)
{
h = document.getElementById(id);
if(h) {
for (i=num+1; i<h.options.length; i++)
h.options[i-1] = h.options[i]; 
h.options.pop();}

}

function is_checked(id)
{
h = document.getElementById(id);
if(h) if (h.checked) return true;
return false;
}

function addoption(id, text)
{
h = document.getElementById(id);
if(h) {h.options[h.options.length] = new Option(text);return (h.options.length-1);}

}

function is_type(i, obj)
{
return (i & obj);
}

function move_to(obj, x, y)
{
h = document.getElementById(obj);
if(h) {h.style.left=x+"px"; h.style.top=y+"px";}
}
function move_tooffset(obj, offx, offy)
{
h = document.getElementById(obj);
if(h) {h.style.left=(eval(h.style.left.substring(0, h.style.left.length-2))+offx)+"px"; h.style.top=(eval(h.style.top.substring(0, h.style.top.length-2))+offy)+"px";}
}
function set_cursor(obj,cursor)
{
h = document.getElementById(obj);
if(h) {h.style.cursor=cursor;}
}

function set_img(id, _src)
{	
	h = document.getElementById(id);
	if(h)
		h.src=_src;

}

