// Misc functions to make flash sniffer and Publications hider work

// *** CHECK FOR FLASH *** //
var flashinstalled = 0;
var flashversion = 0;

MSDetect = "false";

if (navigator.plugins && navigator.plugins.length)
{
   x = navigator.plugins["Shockwave Flash"];
   if (x)
   {
      flashinstalled = 2;
      if (x.description)
      {
         y = x.description;
         flashversion = y.charAt(y.indexOf('.')-1);
      }
   }
   else
   {
      flashinstalled = 1;
   }
   if (navigator.plugins["Shockwave Flash 2.0"])
   {
      flashinstalled = 2;
      flashversion = 2;
   }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
   x = navigator.mimeTypes['application/x-shockwave-flash'];
   if (x && x.enabledPlugin) flashinstalled = 2;
   else flashinstalled = 1;
}
else
{
   MSDetect = "true";
}




// *** code for [Show / Hide Abstract] *** //
var bV=parseInt(navigator.appVersion);
var sNS6 = false;

sNS4=(document.layers) ? true : false;

sIE4=((document.all)&&(bV>=4))?true:false;

sver4 = (sNS4 || sIE4) ? true : false;

if (navigator.appName == 'Netscape')
{
   if(bV >= 5)
   {
      sNS6 = true ;
   }
}

function expandIt(){return}
function expandAll(){return}

with (document)
{
   write("<STYLE TYPE='text/css'>");
   if (sNS4)
   {
      write(".parent {position:absolute; visibility:hidden} ");
      write(".child {position:absolute; visibility:hidden} ");
      write(".regular {position:absolute; visibility:hidden} ")
   }
   else
   {
      write(".child {display:none}")
   }
   write("</STYLE>");
}

// Code for showing and hiding publications info that is hard coded
// into the CMS on any given page
function closePubs() {
   for(i=1; i<=pubItems; i++) {
      var theDESC = 'pub_'+i+'_Desc';
      document.getElementById(theDESC).style.display = 'none';
   }
}

function openPub(pubID) {
   closePubs();
   var theDESC = 'pub_'+pubID+'_Desc';
   document.getElementById(theDESC).style.display = 'block';
}
