//-- pop up --
function popupEx(url, width, height, name)
{
	var settings = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height;

	var oNewWin = window.open(url,name,settings);
}

function popup(url, width, height)
{
	var settings = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height;

	var oNewWin=window.open(url,'view', settings);
}

function popup_image(url, width, height, name){
	var settings = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=100,top=100,width=" + width + ",height=" + height;

    var oNewWin = window.open('about:blank', null, settings);
    
    var sHTML = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
		+ "<HTML><HEAD>"
		+ "<TITLE>" + name + "</TITLE></HEAD>"
		+ "<BODY style='margin:0; background-color:#000000;' onload='self.focus()' onblur='self.close()'>"
		+ "<img src='" + url + "' width='" + width + "' height='" + height + "' alt='" + name + "' />"
		+ "</BODY></HTML>";
    oNewWin.document.writeln(sHTML);
    oNewWin.document.close();
}

function jump2url(url)
{
	window.location=url;
}

function checkAll(form, ch)
{
	for (i=0; i < form.elements.length; i++)
		if (form.elements[i].type=='checkbox' && form.elements[i].name=='checked[]') 
			form.elements[i].checked = ch;
}

//--

function Dump(d,l) {
    if (l == null) l = 1;
    var s = '';
    if (typeof(d) == "object") {
        s += typeof(d) + " {\n";
        for (var k in d) {
            for (var i=0; i<l; i++) s += "  ";
            s += k+": " + Dump(d[k],l+1);
        }
        for (var i=0; i<l-1; i++) s += "  ";
        s += "}\n"
    } else {
        s += "" + d + "\n";
    }
    return s;
}
