function
MoveUp()
{
for
(i=1; i<document.forms[0].lstItem.all.length; i++)
{
if
(document.forms[0].lstItem.item(i).selected)
{
st = document.forms[0].lstItem.item(i-1).value ;
document.forms[0].lstItem.item(i-1).value = document.forms[0].lstItem.item(i).value;
document.forms[0].lstItem.item(i).value = st;
st = document.forms[0].lstItem.item(i-1).text ;
document.forms[0].lstItem.item(i-1).text = document.forms[0].lstItem.item(i).text;
document.forms[0].lstItem.item(i).text = st;
document.forms[0].lstItem.item(i-1).selected =
true
;
document.forms[0].lstItem.item(i).selected =
false
;
}
}
}
function
MoveDown()
{
for
(i=document.forms[0].lstItem.all.length-2; i>=0; i--)
{
if
(document.forms[0].lstItem.item(i).selected)
{
st = document.forms[0].lstItem.item(i+1).value ;
document.forms[0].lstItem.item(i+1).value = document.forms[0].lstItem.item(i).value;
document.forms[0].lstItem.item(i).value = st;
st = document.forms[0].lstItem.item(i+1).text ;
document.forms[0].lstItem.item(i+1).text = document.forms[0].lstItem.item(i).text;
document.forms[0].lstItem.item(i).text = st;
document.forms[0].lstItem.item(i+1).selected =
true
;
document.forms[0].lstItem.item(i).selected =
false
;
}
}
}