// Inklingza Java Scripts, http://www.jesus.com.au/inklingza

function openNewWindow(URL,x,y) { 
    // popup window made to order, set x/y to zero for maximum, otherwise use percentages
    if ( x<0 || x>100 || y<0 || y>100 ) {
        alert('Function syntax: openNewWindow(URL,x,y): x and y are percentages of screen width and height.');
        return 0;
    }
    isNetscape=(document.layers);
    isMicrosoft=(document.all);
    if (isMicrosoft || isNetscape) {
        w = screen.availWidth;
        h = screen.availHeight;
    }
    popW = (x>0) ? (w / 100) * x : w; 
    popH = (y>0) ? (h / 100) * y : h;
    popX = (w-popW)/2;
    popY = (h-popH)/2;
    windowFeatures = 'scrollbars=yes,toolbar=no,resizable=yes,menubar=no,width='+popW+',height='+popH+',left='+popX+',top='+popY;
    newWindow=window.open(URL,'_blank',windowFeatures); 
}

function cascadeWindow(URL,n) { 
    //  cascades window n of m, at step intervals
    isNetscape=(document.layers);
    isMicrosoft=(document.all);
    if (isMicrosoft || isNetscape) {
        w = screen.availWidth;
        h = screen.availHeight;
    }
    popW = 400;
    popH = 300;
    popX = (n * 50);
    popY = (n * 50);
    windowFeatures = 'scrollbars=yes,toolbar=no,resizable=yes,menubar=no,width='+popW+',height='+popH+',left='+popX+',top='+popY;
    newWindow=window.open(URL,'_blank',windowFeatures); 
}

function closeWindow() {
    window.close(1);
}

var dge = document.getElementById;

function toggleBlock(a) {
  if (!dge) return;
  d = document.getElementById(a).style.display;
  document.getElementById(a).style.display = 
      (d == 'none' || d == '') ?  'block' : 'none';
}

function selectMe() {
    this.select();
}

