function showBox(box) {
    document.getElementById(box).style.display='block';
}
function hideBox(box) {
	document.getElementById(box).style.display='none';
}
function changeBox(new_id){
	if(current != new_id){
		hideBox('mainbox-' + current);
		showBox('mainbox-' + new_id);
		current = new_id;
	}
	document.cookie = "tab="+new_id;
	return false;
}
function setinner(box, val) {
	document.getElementById(box).innerHTML = val;
}
function getinner(box) {
	return document.getElementById(box).innerHTML;
}
function getval(box) {
	return document.getElementById(box).value;
}
function setval(box, val) {
	return document.getElementById(box).value = val;
}
function changetab(tabber, tab) {
	document.getElementById(tabber).tabber.tabShow(tab);

}

function fixFloat(x){
   if(x==undefined||x==''){x=0;}
   str = x+'';
   ind = str.indexOf('.');
   if(ind==-1)return str+".00";
   return str.substring(0,ind+3);
}