function openRFSWindow2(lovFieldName, listingTypeVal, methodForDefault) { document.forms[0].lovName.value = lovFieldName; document.forms[0].listingType.value = listingTypeVal; //document.forms[0].curDir.value = document.all(lovFieldName).value; document.forms[0].curDir.value = document.getElementById(lovFieldName).value; document.forms[0].defaultMethod.value = methodForDefault; openWindow(top,'/em/console/page/rfs/postBackWithEvent', 'lovWindow', {width:750, height:550}, true, 'dialog', ''); } function openRFSWindow(lovFieldName, listingTypeVal, methodForDefault,parentFieldName) { document.forms[0].lovName.value = lovFieldName; document.forms[0].listingType.value = listingTypeVal; //document.forms[0].curDir.value = document.all(lovFieldName).value; document.forms[0].curDir.value = document.getElementById(lovFieldName).value; document.forms[0].defaultMethod.value = methodForDefault; var parentFieldValue = document.getElementById(parentFieldName).value; if (parentFieldValue != null) { parentFieldValue = trim(parentFieldValue); if ( parentFieldValue.length == 0) return; } openWindow(top,'/em/console/page/rfs/postBackWithEvent', 'lovWindow', {width:750, height:550}, true, 'dialog', ''); } function openTargetSelWindow(lovFieldName) { document.forms[0].lovName.value = lovFieldName; openWindow(top,'/em/console/target/sel/postBackWithEvent?eventParam=initializeTargetSelection', 'lovWindow', {width:750, height:550}, true, 'dialog', ''); } function ltrim(argvalue) { while (1) { if (argvalue.substring(0, 1) != " ") break; argvalue = argvalue.substring(1, argvalue.length); } return argvalue; } function rtrim(argvalue) { while (1) { if (argvalue.substring(argvalue.length - 1, argvalue.length) != " ") break; argvalue = argvalue.substring(0, argvalue.length - 1); } return argvalue; } function trim(argvalue) { var tmpstr = ltrim(argvalue); return rtrim(tmpstr); }