
function isIE()
{
        return( (navigator.userAgent.indexOf("MSIE") != -1) );
}

function isMAC()
{
        return( (navigator.appVersion.indexOf('Mac') != -1) );
}

function isIE4()
{
   // convert all characters to lowercase to simplify testing
   var agt=navigator.userAgent.toLowerCase();

   // Note: On IE5, these return 4
   var is_major = parseInt(navigator.appVersion);
   var is_minor = parseFloat(navigator.appVersion);

   var is_ie      = (agt.indexOf("msie") != -1);
   var is_ie3     = (is_ie && (is_major < 4));
   var is_ie4     = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1));
   var is_ie4up   = (is_ie  && (is_major >= 4));

   var ok = (is_ie4up || is_ie3 || is_ie4up);
   return(ok);

}
/*
   popUp window
*/

function PICpopUp(myLink,windowName,myWidth,myHeight,myScroll,myFocus)
{
   if(!myScroll)
      myScroll ='yes';
   else if(myScroll == 'noscroll' )
      myScroll = 'no';

   var myWin = null;
   var myWin=window.open("",windowName,"height=" + myHeight + ",width=" + myWidth + ",resizable=yes,dependent=no,scrollbars=" + myScroll + ",menubar=no,toolbar=no,alwaysRaised=no");

  if( (myFocus != "nofocus") && !isIE4 )
      myWin.focus();

    myLink.target=windowName;


}

/*
   Domain 4 document
*/

function setDomain(dom)
{
  document.domain = dom;
}

/*
   Resize browser window
*/

function resizeWindow(myWidth,myHeight)
{
        if (navigator.appName == "Netscape")
        {
                width = eval(myWidth-window.outerWidth+window.innerWidth);
                height = eval(myHeight-window.outerHeight+window.innerHeight);
                window.resizeTo(width,height);
        }
   else window.resizeTo(myWidth,myHeight);
}
