// JavaScript Document
function doSubmit(act,id,txt)
{
    var formObj = document.forms["view_form"]
    switch (act)
    {
        case 'delitem':
        case 'delcat':
                        if (!confirm(txt)) return;                                
                        break;
    }
    formObj.elements['kss_action_target'].value = act
    formObj.elements['id'].value = id
    formObj.submit();
}

function popUp(url, width, height)
{
	var str="directories=no,location=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width="+width+",height="+(height+20);
	win = window.open(url, "", str);
	win.window.focus();
}

function showImg(url, width, height)
{
	var str="directories=no,location=no,resizable=no,scrollbars=no,status=no,toolbar=no,width="+width+",height="+height;
	win = window.open("", "", str);
	win.document.write(
                           			"<html><title>Image</title><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'><img src='" + url + "' width='" + width + "' height='" + height + "'></body></html>"
			);
	win.document.close();
	win.window.focus();
}
	
function reLoad()
{
	document.location.reload();
}

function displayById(val, id)
{
	if (val.checked)
	{
		document.getElementById(id).style.display = 'block';
	}
	else
	{
		document.getElementById(id).style.display = 'none';
	}
}
