function switchEmailViewTo(showIt, hideIt) { try { var showEl = document.getElementById(showIt + "-Div"); var hideEl = document.getElementById(hideIt + "-Div"); showEl.style.display = "block"; hideEl.style.display = "none"; } catch(error) { alert(error.message); } } function switchEmailViews(txtElName, htmlElName) { try { var txtEl = document.getElementById(txtElName + "-Div"); var htmlEl = document.getElementById(htmlElName + "-Div"); if (txtEl.style.display == "none") { txtEl.style.display = "block"; htmlEl.style.display = "none"; } else { txtEl.style.display = "none"; htmlEl.style.display = "block"; } } catch(error) { alert(error.message); } } function add(el) { var select1 = document.getElementById(el + '_opt'); var select2 = document.getElementById(el + '_val'); for (i = select1.options.length - 1; i > 0; i--) { if (select1.options[i].selected) { select2.options[select2.options.length] = new Option(select1[i].text, select1[i].value); select1.options[i] = null; } } rehash(el); } function remove(el) { var select1 = document.getElementById(el + '_opt'); var select2 = document.getElementById(el + '_val'); for (i = select2.options.length - 1; i > 0; i--) { if (select2.options[i].selected) { select1.options[select1.options.length] = new Option(select2[i].text, select2[i].value); select2.options[i] = null; } } rehash(el); } function rehash(el) { var str = ""; var hide = document.getElementById(el); var val = document.getElementById(el + '_val'); for (i = 1; i < val.options.length; i++) { str += val[i].value; if (i < val.options.length - 1) str += ","; } //alert(str); hide.value = str; } function popUpDg(idEl, valEl, pageName, className) { var popUp = open(pageName + "?RunSearch=true&popUpClass=" + className + "&FieldName=" + idEl.name, "popUp", "scrollbars=1,toolbars=0,width=450height=600"); } function del(id) { return document.getElementById(id); } function getRequestOpts(reqStr, form) { if (reqStr.indexOf(",") == -1) { reqArry = new Array(); reqArry[0] = reqStr; } else { reqArry = reqStr.split(","); } var qs = ""; for (i = 0; i < reqArry.length; i++) { if (reqArry[i] != "") { var el = form ? eval("document." + form.name + "." + reqArry[i]) : del(reqArry[i]); if (el) { try { var elValue = new Array(); if (el.name != "") { if (el.type == "select") { elValue.push(el.options[el.options.selectedIndex].value); } else if(el.type == "select-multiple") { var option = el.options; for(s=0; s 0) { for(v=0; v<\/iframe>'; document.body.innerHTML += iframeHTML; IFrameObj = new Object(); IFrameObj.document = new Object(); IFrameObj.document.location = new Object(); IFrameObj.document.location.iframe = document.getElementById('RSIFrame'); IFrameObj.document.location.replace = function(location) { this.iframe.src = location; } } } function idoc(iframe) { if (iframe.contentDocument) { // For NS6 return iframe.contentDocument; } else if (iframe.contentWindow) { // For IE5.5 and IE6 return iframe.contentWindow.document; } else if (iframe.document) { // For IE5 return iframe.document; } alert("No document provider available"); } function remote(call, request) { var IFrameObj = document.getElementById('remoteFrame'); // our IFrame object var IFrameDoc = idoc(IFrameObj); window.parent.focus(); try { var qs = ""; if (request && request != "") { qs = getRequestOpts(request); } if (qs.length > 1500) qs = qs.substring(0, 1500); //alert("/remote?rc=" + call + qs); IFrameDoc.location.replace("/jspServ/remote.jsp?rc=" + call + qs); return false; } catch(error) { alert("Error loading iframe content: " + error.description); return false; } } function callToServer(page, form, call) { var reqArry = ""; if (form != "") { theForm = document.getElementById(form); if (theForm==null) { theForm = document.getElementById('actionForm'); if (theForm==null) { alert(form + " does not exist"); return; } } var qs = ""; for (i = 0; i < theForm.elements.length; i++) { if (theForm.elements[i] != null) { var elName = theForm.elements[i].name; if ((elName != "") && (elName != "HTML")) { reqArry += theForm.elements[i].name + ","; } } } } remote(call, reqArry); } function selvals(sel, rev) { sel = l(sel); var res = new Array(); for(i=0; i 1) el.options[1] = null; for (x = 0; x < opts.length; x++) { var option = new Option(opts[x][1], opts[x][0]); el.options[el.options.length] = option; if(_selOverride) { if (arycontains(_selOverride, opts[x][0])) { if(!single) { option.selected = true; } else { el.options.selectedIndex = el.options.length - 1; } } } else { if (arycontains(selD, opts[x][0])) { if(!single) { option.selected = true; } else { el.options.selectedIndex = el.options.length - 1; } } } } } } } function getEl(name) { return document.getElementById(name); } function setSel(sel, value) { sel = l(sel); for(i=0; i