function openWindow(url,width,height) {
	var availheight=((screen.availHeight-height)/2);
	var availwidth=((screen.availWidth-width)/2);
	winStats='resizable=yes,toolbar=no,status=no,location=no,directories=no,menubar=no,';
	winStats+='scrollbars=yes,width='+width+',height='+height;
	if (navigator.appName.indexOf("Microsoft")>=0) {
		winStats+=',left='+availwidth+',top='+availheight;
	}else{
		winStats+=',screenX='+availwidth+',screenY='+availheight;
	}
	floater=window.open(url,"",winStats)
}

function confirmMessage(url, msg){
	if (confirm(msg)){
		document.location.href=url;
	}
}

// toggleCategory
function tc(categoryId,formname){
    var c = document.getElementById(categoryId).checked;
    for (var i=0;i < formname.elements.length;i++) {
        var e = formname.elements[i];
        if ((e.id.indexOf(categoryId) == 0) && (e.type=='checkbox')) {
            e.checked = c;
        }
    }
}

// uncheckCategory
function uc(categoryId) {
    document.getElementById(categoryId).checked = false;
}