//-- 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 checkAllCheckboxes(obj)
{
	var result = false;

	if (typeof checkValue == "undefined") checkValue = 1;

	try {
		for (i in document.forms[0].elements) {
	//			if (document.forms[0][i] && document.forms[0].elements[i].type && document.forms[0].elements[i].type=="checkbox") {
				if (document.forms[0][i] && document.forms[0].elements[i].name && document.forms[0].elements[i].name.indexOf && (document.forms[0].elements[i].name.indexOf("checked") != -1)) {
					document.forms[0].elements[i].checked = checkValue;
				}
		}
	} 
	catch (e) {
		result = true;
	}
	checkValue = !checkValue;
	return result;
}

//-- --

