
function openWithSelfMain(url,name,width,height) {
var options = "width=" + width + ",height=" + height + "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no";

new_window = window.open(url, name, options);
window.self.name = "main";
new_window.moveTo(((screen.availWidth/2)-(width/2)),((screen.availHeight/2)-(height/2)))
new_window.focus();
}

function enableButton(chk, btn) {
    btn.disabled = !chk.checked;
}
