var trap_error = true;
var DHTML = (document.getElementById || document.all || document.layers);
function getObj(name)
{
if (!DHTML) return;
if (document.getElementById)
{
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all)
{
this.obj = document.all[name];
this.style = document.all[name].style;
}
else if (document.layers)
{
this.obj = document.layers[name];
this.style = document.layers[name];
}
}
function set_trap() {
trap_error=true;
}
function unset_trap() {
trap_error=false;
}
function checkfields(form) {
if (!trap_error) return true;
if (!DHTML) return false;
var mypage = new getObj('thepage');
var mytop = mypage.style.top;
var ebox1 = new getObj('errorbox1');
//hide them all
ebox1.style.visibility = 'hidden';
var retval = false;
form.search_name.value = form.search_name.value.replace(/^\s*/g, "");
form.search_name.value = form.search_name.value.replace(/\s*$/g, "");;
if (form.search_name.value.length==0) {
mytop = 120;
mypage.style.top = mytop;
ebox1.style.visibility = 'visible';
} else {
retval = true;
}
return retval;
}
function openHelpWindow(theURL) {
var win_w = parseInt(screen.width * .85);
var win_h = parseInt(screen.height * .70);
winprops = 'height='+win_h+',width='+win_w+',top=70,left=60, menubar=yes, resizable=yes, scrollbars=yes, status=no';
newwindow=window.open(theURL, '_WOK_Help_', winprops);
if (window.focus) {newwindow.focus()}
}
function submit_profiles() {
var total_chkboxes = document.OpenHistories.sprofile.length;
var num_chked = 0;
if (total_chkboxes != undefined) {
var idx = 0;
while ((idx < total_chkboxes) && (num_chked == 0)) {
if (eval("document.OpenHistories.sprofile[" + idx + "].checked") == true) {
num_chked += 1;
}
idx++;
}
} else {
(document.OpenHistories.sprofile.checked) ? num_chked =1 : num_chked =0;
}
if (num_chked > 0) {
return (confirm('NOTICE: This will submit the selected profiles for overnight processing.\nUntil processing is complete, you will not be able to modify the profile.\n\n Click OK to Submit the Profile for Processing.\n Or click Cancel.'));
}
alert('Please select at least 1 profile to Submit for Processing using the checkboxes.');
return (false);
}
function delete_profiles() {
var total_chkboxes = document.OpenHistories.dprofile.length;
var num_chked = 0;
if (total_chkboxes != undefined) {
var idx = 0;
while ((idx < total_chkboxes) && (num_chked == 0)) {
if (eval("document.OpenHistories.dprofile[" + idx + "].checked") == true) {
num_chked += 1;
}
idx++;
}
} else {
(document.OpenHistories.dprofile.checked) ? num_chked =1 : num_chked =0;
}
if (num_chked > 0) {
return (confirm('WARNING: This will delete the selected profiles and all associated publication activity data.\n\n Click OK to delete.\n Click Cancel to keep.'));
}
alert('Please select at least 1 profile to delete using the checkboxes.');
return (false);
}
function openprofile(pid) {
document.OpenHistories.open_profile_id.value = pid;
return;
}