function init(){ document.getElementById("overlay").style.display = 'block'; Sortable.create("l"+1001,{dropOnEmpty:true,delay:100,containment:[l1001,l1007,l1008,l1065],constraint:false,tag:'table',handle:'handle2',treeTag:'td',overlap:'vertical',onUpdate:function(){reorder(Sortable.serialize('l1001')) }}); Sortable.create("l"+1007,{dropOnEmpty:true,delay:100,containment:[l1001,l1007,l1008,l1065],constraint:false,tag:'table',handle:'handle2',treeTag:'td',overlap:'vertical',onUpdate:function(){reorder(Sortable.serialize('l1007')) }}); Sortable.create("l"+1008,{dropOnEmpty:true,delay:100,containment:[l1001,l1007,l1008,l1065],constraint:false,tag:'table',handle:'handle2',treeTag:'td',overlap:'vertical',onUpdate:function(){reorder(Sortable.serialize('l1008')) }}); Sortable.create("l"+1065,{dropOnEmpty:true,delay:100,containment:[l1001,l1007,l1008,l1065],constraint:false,tag:'table',handle:'handle2',treeTag:'td',overlap:'vertical',onUpdate:function(){reorder(Sortable.serialize('l1065')) }}); Sortable.create("r"+1,{dropOnEmpty:true,handle:'handle',overlap:'vertical',containment:[r1,r2,r3],constraint:false,tag:'table',treeTag:'td',onUpdate:function(){reorder(Sortable.serialize('r1')) }}); Sortable.create("r"+2,{dropOnEmpty:true,handle:'handle',overlap:'vertical',containment:[r1,r2,r3],constraint:false,tag:'table',treeTag:'td',onUpdate:function(){reorder(Sortable.serialize('r2')) }}); Sortable.create("r"+3,{dropOnEmpty:true,handle:'handle',overlap:'vertical',containment:[r1,r2,r3],constraint:false,tag:'table',treeTag:'td',onUpdate:function(){reorder(Sortable.serialize('r3')) }}); cancel_edit(); // gotmoving = true; // document.getElementById('getmoving').innerHTML = ''; } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var ncat = 0; var sedit = 0; var cedit = 0; var siteform = 0; var catform = 0; var btn = false; function build(shownew){ n = document.getElementById("y"); xmlhttp.open("GET", "execute.php?fun=build&p[]="+shownew); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ n.innerHTML = xmlhttp.responseText; if(shownew=='true'){ document.getElementById("h0").select(); } document.forms[0].q.focus();init(); } } xmlhttp.send(null); } function new_category(){ n = document.getElementById("y"); xmlhttp.open("GET", "execute.php?fun=category"); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) n.innerHTML = n.innerHTML + xmlhttp.responseText; } xmlhttp.send(null); } function editsite(sid,cid){ document.getElementById("overlay").style.display = 'block'; editform = document.getElementById("edit"); editform.style.display = 'block'; xmlhttp.open("GET", "execute.php?fun=editsite&p[]="+sid+"&p[]="+cid); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ editform.innerHTML = xmlhttp.responseText; if(sid==0) document.getElementById("t"+sid).select(); } } xmlhttp.send(null); } function editcat(cid){ if(catform!=0){ catform.style.display = 'none'; catform = 0; if(cedit>0) document.getElementById("head"+cedit).style.display = ''; else document.getElementById("head"+cid).style.display = ''; } cedit = cid; document.getElementById("head"+cid).style.display = 'none'; catform = document.getElementById("catform"+cid); catform.style.display = 'block'; xmlhttp.open("GET", "execute.php?fun=editcat&p[]="+cid); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ catform.innerHTML = xmlhttp.responseText; document.getElementById("h"+cid).select(); } } xmlhttp.send(null); } function cancel_edit(){ document.getElementById("edit").style.display = 'none'; document.getElementById("overlay").style.display = 'none'; document.getElementById("edit").innerHTML = ''; } function savesite(sid,cid){ if(btn) return; btn = true; xmlhttp.open("GET", "execute.php?fun=savesite&p[]="+sid+"&p[]="+cid+"&p[]="+document.getElementById("t"+sid).value+"&p[]="+escape(document.getElementById("u"+sid).value)+"&p[]="+escape(document.getElementById("z"+sid).value)); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ siteform = catform = sedit = cedit = 0; btn = false; //document.getElementById("edit").innerHTML = ''; build(false); cancel_edit(); } } xmlhttp.send(null); } function savecat(cid){ if(btn) return; btn = true; xmlhttp.open("GET", "execute.php?fun=savecat&p[]="+cid+"&p[]="+document.getElementById("h"+cid).value); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ btn = false; build(false); } } xmlhttp.send(null); } function addover(id){ document.getElementById("add"+id).style.visibility = 'visible'; } function addout(id){ document.getElementById("add"+id).style.visibility = 'hidden'; } function sover(id){ document.getElementById("edit"+id).style.visibility = 'visible'; } function sout(id){ document.getElementById("edit"+id).style.visibility = 'hidden'; } function sdel(id){ xmlhttp.open("GET", "execute.php?fun=delsite&p[]="+id); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ build(false); cancel_edit(); } } xmlhttp.send(null); } function reorder(s){ var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } xmlhttp.open("GET", "execute.php?fun=reorder&s="+escape(s)); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4){ //$("log").innerHTML += (xmlhttp.responseText) + '
'; } } xmlhttp.send(null); } function cover(id){ document.getElementById("delc"+id).style.visibility = 'visible'; } function cout(id){ document.getElementById("delc"+id).style.visibility = 'hidden'; } function cdel(id){ xmlhttp.open("GET", "execute.php?fun=delcat&p[]="+id); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) build(false); } xmlhttp.send(null); } function mm(sid, cls){ if(document.getElementById("tr"+sid).className!='ssrow'){ document.getElementById("tr"+sid).className = cls; document.getElementById("td"+sid).className = cls; } //document.getElementById("href"+sid).className = cls; } function hls(obj){ // highlight searchables cls = (obj.value=='')?'srow':'ssrow'; for(s=0;s-1) location = loc; else window.open(loc); } // build('false');