function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7_autoLayers() { //v1.1 PVII
 var g,b,k,f,args=P7_autoLayers.arguments;
 if(!document.p7setc) {p7c=new Array();document.p7setc=true;}
 for(k=0; k<p7c.length; k++) {
  if((g=MM_findObj(p7c[k]))!=null) {
   b=(document.layers)?g:g.style;b.visibility="hidden";}}
 for(k=0; k<args.length; k++) {
  if((g=MM_findObj(args[k])) != null) {
   b=(document.layers)?g:g.style;b.visibility="visible";f=false;
   for(j=0;j<p7c.length;j++) {
    if(args[k]==p7c[j]) {f=true;}}
  if(!f) {p7c[p7c.length++]=args[k];}}}
}

function addOnload(fn) { //appends javascript code contained in string fn to the onload handler of the body tag
    if (window.onload) {
        var oldOnload = window.onload;
        window.onload = function() { oldOnload(); eval(fn); }
    } else {
        window.onload = function() { eval(fn); }
    }
}

/**
 *  sweeps anchor, input, select, and label elements
 *  sets a handler
 */
function titleStatusInit() {
    var anchors = document.getElementsByTagName('A');
    var inputs = document.getElementsByTagName('INPUT');
    var selects = document.getElementsByTagName('SELECT');
    var labels = document.getElementsByTagName('LABEL');
    setStatus(anchors); setStatus(inputs); setStatus(selects); setStatus(labels);

    function setStatus(arr) { // dependent function
        for (i=0; i<arr.length; i++) {
            if (arr[i].title) {
                if (arr[i].onmouseover) {
                    var oldOnmouseover = arr[i].onmouseover;
                    arr[i].onmouseover = function() { oldOnmouseover(); window.status = this.title + " : " + this.href; return true; }
                }
                else {
                    arr[i].onmouseover = function() { window.status = this.title + " : " + this.href; return true; }
                }
                if (arr[i].onmouseout) {
                    var oldOnmouseout = arr[i].onmouseout;
                    arr[i].onmouseout = function() { oldOnmouseout(); window.status = ''; return true; }
                }
                else {
                    arr[i].onmouseout = function() { window.status = ''; return true; }
                }
            }
        }
    }
}

addOnload('titleStatusInit();');
