function Purge(Heretic, Hex, En) { //alert(Heretic + ' ' + Hex); Hexen = 'DelNum' + Hex; if (document.getElementById(Hexen).value == 'Preserve') { if (confirm ('Really delete ' + En + '?')) { document.getElementById(Hex).src = 'static/images/forum/CrossR.png'; document.getElementById(Hexen).value = 'Pickle'; } } else { document.getElementById(Hex).src = 'static/images/forum/Cross.png'; document.getElementById(Hexen).value = 'Preserve'; alert (En + ' restored.'); } } function Add() { var rer = document.getElementById('List').rows.length; var table; if (document.all) table = document.all.uploadtable; else if (document.getElementById) table = document.getElementById('List'); if (table && table.rows && table.insertRow) { var newID = table.rows.length; var tr = table.insertRow(newID); rerToo = 700 + rer;//q&d hack to get around the chance of a board having an ID greater than the current rowcount, thus causing Issues tr.innerHTML = 'Move upMove down' + rer + 'Delete?'; } } function AddBan() { var rer = document.getElementById('List').rows.length; var table; if (document.all) table = document.all.uploadtable; else if (document.getElementById) table = document.getElementById('List'); if (table && table.rows && table.insertRow) { var newID = table.rows.length; var tr = table.insertRow(newID); rerToo = 700 + rer;//q&d hack to get around the chance of a board having an ID greater than the current rowcount, thus causing Issues tr.innerHTML = ' Delete?'; } } function Shift(Ego,Bump) { //Ego = 'this' - the input item in question //SEgo = this.parentNode //Id = input.parentnode.rowindex while (Ego.parentNode && 'tr' != Ego.nodeName.toLowerCase()) { Ego = Ego.parentNode; } var SEgo = Ego.parentNode; var Id = Ego.rowIndex + Bump; if (Id<0) { Id += SEgo.rows.length; } //if off the top, add table length to the offset, effectively wrapping around if (Id==SEgo.rows.length) { Id = 0; } //// prob wrong place, but try to swap class with the class of the row at that position currently //alert(Ego.className); SEgo.removeChild(Ego); var nRow = SEgo.insertRow(Id); SEgo.replaceChild(Ego, nRow); } function sortEm(tehinput) { rowCount = document.getElementById('List').rows.length; x=0; while ((x < rowCount) && (document.getElementById('List').className == 'board')) { if (document.getElementById('List').rows[x].childNodes[1].nodeType == 3) { document.getElementById('List').rows[x].childNodes[2].lastChild.value = x; } else { document.getElementById('List').rows[x].childNodes[1].lastChild.value = x; } x++; } document.getElementById('totalRows').value = rowCount; return submitForm(tehinput.parentNode); }