function pmove_up(itemid) {
 document.all['mu'+itemid].src="list_pmove_up.cfm?pid="+itemid + "&" + Math.random(10000);
 document.all['tr'+itemid].swapNode(document.all['tr'+itemid].previousSibling);
}

function pmove_down(itemid) {
 document.all['md'+itemid].src="list_pmove_down.cfm?pid="+itemid + "&" + Math.random(10000);
 document.all['tr'+itemid].swapNode(document.all['tr'+itemid].nextSibling);
}

function move_up(itemid) {
 document.all['mu'+itemid].src="list_move_up.cfm?itemid="+itemid + "&" + Math.random(10000);
 document.all['tr'+itemid].swapNode(document.all['tr'+itemid].previousSibling);
}

function move_down(itemid) {
 document.all['md'+itemid].src="list_move_down.cfm?itemid="+itemid + "&" + Math.random(10000);
 document.all['tr'+itemid].swapNode(document.all['tr'+itemid].nextSibling);
}


function set_edit_mode(inpt,m) {
  if (m == 1) 
  inpt.className = 'inline_editor_active';
  else {
  inpt.className = 'inline_editor';
  frm.sid.blur();
  }
}

function list_submit(itemid) {
 var pimg = document.all['p'+itemid];
 pimg.src = 'list_submit.cfm?itemid='+itemid+'&name='+escape(document.all['l'+itemid].value) + '&' +Math.random(10000) ;
 //document.all['l'+itemid].className = 'inline_editor';
 //document.all['l'+itemid].blur();
 return false;
}

function dellistitem(id) {
var tbindx = 'tb' + id;
	trindx = 'tr' + id;
	pindx  = 'p' + id;
if (confirm( "Are you sure you want to delete this item?"))
	{
	document.all[pindx].src = 'list_del.cfm?' + id;
	document.all[trindx].removeNode(true);
	}
}

function sform(act)
{
document.forms[0].action=act;
document.forms[0].submit();
}

function PopUpWindowSmall(newURL) 
{
var l = (screen.width-400)/2;
var h = (screen.height-150)/2;
myRemote = launch(newURL, "PopUpWindow", "status=0,scrollbars=0,height=150,width=400,left="+l+",top="+h+"",  "maincontent");
}

function PopUpWindow(newURL) {
var l = (screen.width-550)/2;
var h = (screen.height-450)/2;
myRemote = launch(newURL,
  "PopUp",
  "scrollbars=1,height=450,width=550,left="+l+",top="+h+", alwaysLowered=0,alwaysRaised=0, channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,status=0,titlebar=0,toolbar=0,z-lock=0",
  "maincontent");
}


function launch(newURL, newName, newFeatures, orgName) {
  var remote = window.open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function RefreshParent() {
opener.location.reload();
close();
}
function ReloadParent(newURL) {
opener.location = newURL;
close();
}


