
function gotoURL(url){
           location.href = url;
}

function deep_purple(iist, sp){
           var dp1 = document.getElementById('deep_purple_1');
           var dp2 = document.getElementById('deep_purple_2');
           var search_p = document.getElementById('search_p');
           if(dp1 && dp2 && search_p && iist && sp){
                      if(iist==1){
                                 dp2.style.display = 'none';
                                 dp1.style.display = 'block';
                      }
                      if(iist==2){
                                 dp1.style.display = 'none';
                                 dp2.style.display = 'block';
                      }
                      search_p.value = sp;
           }
}

function forshow(container, ixp, cmd){
           if(container && ixp){
                      var el = document.getElementById(container);
                      var t = '<img src="/img/loader.gif" width=16 height=16 border=0 alt=" please wait... " title=" please wait... ">';

                      if(el.innerHTML.length){
                                 if(el.style.display == 'none'){
                                            el.style.display = 'block';
                                 }else if(el.style.display == 'block'){
                                            el.style.display = 'none';
                                 }else{
                                            el.style.display = 'none';
                                 }
                      }else{
                                 var cm_string = '';
                                 if(cmd instanceof Array){
                                            for(var a=0; a<cmd.length; a++){
                                                       cm_string += cmd[a][0] + '=' + cmd[a][1] + '&';
                                            }
                                 }
                                 reLoad('/jax.pl?a=directory&p=' + ixp + '&' + cm_string, container, 1);
                      }
           }
}







var ch_checked = new Array(4);
for (i=1; i<5; i++) {ch_checked[i]=new Array();}
var ch_unchecked = new Array(4);
for (i=1; i<5; i++) {ch_unchecked[i]=new Array();}

function directory(p, id, f) {
           if(f) {
                      for(var i=0; i<ch_unchecked[p].length; i++) {
                             if (ch_unchecked[p][i]==id) { ch_unchecked[p].pop(id); }
                      }
           
                      var exist = 0;
                      for(var i=0; i<ch_checked[p].length; i++) {
                             if (ch_checked[p][i]==id) { exist = 1; }
                      }
                      if (!exist) ch_checked[p].push(id);
                      
           }else{
                      for(var i=0; i<ch_checked[p].length; i++) {
                             if (ch_checked[p][i]==id) { ch_checked[p].pop(id); }
                      }
           
                      var exist = 0;
                      for(var i=0; i<ch_unchecked[p].length; i++) {
                             if (ch_unchecked[p][i]==id) { exist = 1; }
                      }
                      if (!exist) ch_unchecked[p].push(id);
           }
           
           var ch_checked_str = ch_checked.join(";");
           var ch_unchecked_str = ch_unchecked.join(";");
           
           document.getElementById('ch_checked').value = ch_checked_str;
           document.getElementById('ch_unchecked').value = ch_unchecked_str;
           
}

