//These are clientside utilities // //Available Functions: // MoveAllLBItems - move items from 1 LB to another // SelectAllLBItems - select all options in a LB // MoveSectedLBItems - Move selected items from 1 LB to another // AddOption - add an option to a LB // SortSelect - sort a LB based on the display value var sMail = 'mailto'; //Moves all items from one LB to another function MoveAllLBItems(p_oFrom, p_oTo) { SelectAllLBItems(p_oFrom); MoveSelectedLBItems(p_oFrom,p_oTo); } //Selects all items within the LB function SelectAllLBItems(p_oLB) { for (var i=(p_oLB.options.length-1); i>=0; i--) { var o=p_oLB.options[i]; o.selected = true; } return; } //UnSelects all items within the LB function UnSelectAllLBItems(p_oLB) { for (var i=(p_oLB.options.length-1); i>=0; i--) { var o=p_oLB.options[i]; o.selected = false; } return; } //Moves selected items from one listbox to another and re-sorts function MoveSelectedLBItems(p_oFrom, p_oTo) { //Move selected options for (var i=(p_oFrom.options.length-1); i>=0; i--) { var o=p_oFrom.options[i]; if (o.selected) { //from.options[i] = null; AddOption(p_oTo, o.text, o.value, false); } } //Delete selected Options for (var i=(p_oFrom.options.length-1); i>=0; i--) { var o = p_oFrom.options[i]; if (o.selected) { p_oFrom.options[i] = null; } } //unselect all p_oFrom.selectedIndex = -1; //Sort results based on display values SortSelect(p_oFrom); SortSelect(p_oTo); return; } //Remove All Options function RemoveAllOptions(p_oLB) { for (var i=(p_oLB.options.length-1); i>=0; i--) { p_oLB.options[i] = null; } return; } //Get the selected row //Parms: //p_oLB - the LB //p_iText - 1, return text // ?, return value function GetFirstSelectedRow(p_oLB, p_iText) { for (var i=(p_oLB.options.length-1); i>=0; i--) { if (p_oLB.options[i].selected) { if (p_iText == 1 ) return p_oLB.options[i].text; else return p_oLB.options[i].value; } } return ""; } //Adds an item to a listbox function AddOption(p_oLB,p_sText,p_sValue,p_bSelected) { if (p_oLB!=null && p_oLB.options!=null) { p_oLB.options[p_oLB.options.length] = new Option(p_sText, p_sValue, true, p_bSelected); } return; } //Sorts items within a listbox function SortSelect(p_oLB) { var o = new Array(); if (p_oLB.options==null) { return; } for (var i=0; i (b.text+"")) { return 1; } return 0; } ); for (var i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= 0 ) return true; } return false; } function concat(domain, user) { return (user + '@' + domain); }