// corebrowsercheck

// currently only checks to see whether the browser is Macish
// go to http://www.webreference.com/ for more tests

    var appVer = navigator.appVersion.toLowerCase();
    var is_minor = parseFloat(appVer);
    var is_major = parseInt(is_minor);
    var agt=navigator.userAgent.toLowerCase();
    var is_gecko = ((navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
    var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                    (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                    (is_gecko) && 
                    ((navigator.vendor=="")||(navigator.vendor=="Mozilla")));
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                    && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)
                    && (!(is_moz)));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_mac    = (navigator.userAgent.toLowerCase().indexOf("mac")!=-1);

// pop

function popup(url,w,h) {
   window.open(url, 'aru', 'location=0,resizable=1,status=0,titlebar=0,directories=0,toolbar=1,menubar=1,scrollbars=1,width='+w+',height='+h);
   return false;
}

function popfeedback(url,w,h) {
   var popped = window.open(url,'feedback','location=0,resizable=1,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,width='+w+',height='+h);
   return (popped)?false:true;
}

// expcol

// go to http://support.internetconnection.net/CODE_LIBRARY/Javascript_Collapse_Expand.shtml 
// for code samples

function is_shown(id) {
   if(document.getElementById(id).style.display != 'none') {
      return true;
   } else {
      return false;
   }
}

function show(id, showtype) {
   //REQUIRES: an element with the id id exists
   //EFFECTS: if id is hidden, unhides it, otherwise displays it inline
   document.getElementById(id).style.display = showtype;
}

function hide(id) {
   //REQUIRES: an element with the id id exists
   //EFFECTS: if id is hidden, does nothing, otherwise hides it
   document.getElementById(id).style.display = "none";
}
