/* - FILE - cpf.js - - DESCRIPTION - The list of javascript functions for message lovs - - MODIFIED (MM/DD/YY) - mningomb 09/20/04 - mningomb_final - apbharga 09/03/04 - - mningomb 08/02/04 - created - --*/ function setHostRedirValue() { var form = document.forms[0]; var host = form.hostLov.value; var contextpath = form.contextPath.value; var path = contextpath + form.hostLovPage.value; var params = "&hostLov="+host; var imagepath = form.imagePath.value; var redir = imagepath + "cabo/jsps/frameRedirect.jsp?redirect="+ path+delimitSpaceToCaret(params); document.forms[0].hostRedir.value=redir; } function hostCallBack(lovwin, event) { var value = lovwin.hostName; if (value!=(void 0)) document.forms[0].hostLov.value = value; } function setDirRedirValue() { var form = document.forms[0]; var dir = form.dirLov.value; var host = form.hostLov.value; var contextpath = form.contextPath.value; var path = contextpath + form.dirLovPage.value; var params = "&hostLov="+host+"&dirLov="+dir; var imagepath = form.imagePath.value; var redir = imagepath + "cabo/jsps/frameRedirect.jsp?redirect="+ path+delimitSpaceToCaret(params); document.forms[0].dirRedir.value=redir; } function dirCallBack(lovwin, event) { var value = lovwin.dirName; if (value!=(void 0)) document.forms[0].dirLov.value = value; } function delimitSpaceToCaret(chkStr) { var newStr = ""; var cmpStr = ""; var space = " "; var caret = "^"; strBegLoc = 0; spcLoc = chkStr.indexOf(space); while ( spcLoc > -1) { newStr = newStr+chkStr.substr(strBegLoc,spcLoc)+caret; cmpStr = chkStr.substr(strBegLoc+spcLoc+1); spcLoc = cmpStr.indexOf(space); strBegLoc = newStr.length; } // add the last chunk if (cmpStr.length > 0) newStr = newStr+cmpStr; if (newStr.length > 0) return newStr; else return chkStr; } function myHostSelect() { var choice = document.form1.host; top.hostName = choice.options[choice.selectedIndex].value; top.close(); } function myDirSelect() { var choice = document.form1.dir; top.dirName = choice.options[choice.selectedIndex].value; top.close(); } function myAlertSelect() { var choice = document.form1.alert; top.alertName = choice.options[choice.selectedIndex].value; top.close(); } function setAlertRedirValue() { var form = document.forms[0]; var alert = form.alertLov.value; var contextpath = form.contextPath.value; var path = contextpath + form.alertLovPage.value; var params = "&alertLov="+alert; var imagepath = form.imagePath.value; var redir = imagepath + "cabo/jsps/frameRedirect.jsp?redirect="+ path+delimitSpaceToCaret(params); document.forms[0].alertRedir.value=redir; } function alertCallBack(lovwin, event) { var value = lovwin.alertName; if (value!=(void 0)) document.forms[0].alertLov.value = value; } function setHomesHostRedirValue() { var form = document.forms[0]; var platform = form.platform.options[form.platform.selectedIndex].value; var host = form.hostLov.value; var contextpath = form.contextPath.value; var path = contextpath + form.hostLovPage.value; var params = "&platform="+platform+"&hostLov="+host; var imagepath = form.imagePath.value; var redir = imagepath + "cabo/jsps/frameRedirect.jsp?redirect="+ path+delimitSpaceToCaret(params); document.forms[0].hostRedir.value=redir; } function setVersionRedirValue() { var form = document.forms[0]; var version = form.versionLov.value; var product = form.product.options[form.product.selectedIndex].value; var contextpath = form.contextPath.value; var path = contextpath + form.versionLovPage.value; var params = "&product="+product+"&versionLov="+version; var imagepath = form.imagePath.value; var redir = imagepath + "cabo/jsps/frameRedirect.jsp?redirect="+ path+delimitSpaceToCaret(params); document.forms[0].versionRedir.value=redir; } function versionCallBack(lovwin, event) { var value = lovwin.versionName; if (value!=(void 0)) document.forms[0].versionLov.value = value; } function myVersionSelect() { var choice = document.form1.version; top.versionName = choice.options[choice.selectedIndex].value; top.close(); }