var FILE_INFO = "@(#) [file] [version] [environment] [state] [crtime]";
var bExplorer = false;
var bNavigator = false;
var bGecko = false;
var bOpera = false;
var bOperaIdentifyAsAnotherBrowser = false;
getBrowsertype();
function getBrowsertype( withReturn )
{
var GECKO = "gecko";
var MICROSOFT = "microsoft";
var MICROSOFT4 = "msie 4";
var MICROSOFT5 = "msie 5.0";
var MICROSOFT55 = "msie 5.5";
var NETSCAPE = "netscape";
var OPERA = "opera";
var fExplorerVersionOK = 4.0;
var fNavigatorVersionOK = 4.61;
var fGeckoVersionOK = 5.0;
var fOperaVersionOK = 5.02;
var fAppVersion = parseFloat( navigator.appVersion );
var sUserAgent = navigator.userAgent.toLowerCase();
var sAppName = navigator.appName.toLowerCase();
if( sAppName.indexOf( OPERA ) > -1 )
{
if ( fAppVersion >= fOperaVersionOK )
{
bOpera = true;
}
}
else if( sUserAgent.indexOf( GECKO ) > -1 || ( sAppName.indexOf( NETSCAPE ) > -1 && fAppVersion >= 5.0 ) )
{
if ( fAppVersion >= fGeckoVersionOK )
{
bGecko = true;
}
}
else if( sAppName.indexOf( NETSCAPE ) > -1 && sUserAgent.indexOf( GECKO ) < 0 )
{
if ( fAppVersion >= fNavigatorVersionOK && fAppVersion < 5.0 )
{
bNavigator = true;
}
}
else if( sAppName.indexOf( MICROSOFT ) > -1 )
{
fAppVersion = 0.0;
if( sUserAgent.indexOf( MICROSOFT4 ) > -1 )
{
fAppVersion = 4.0;
}
else if( sUserAgent.indexOf( MICROSOFT5 ) > -1 )
{
fAppVersion = 5.0;
}
else if( sUserAgent.indexOf( MICROSOFT55 ) > -1 )
{
fAppVersion = 5.5;
}
if ( fAppVersion >= fExplorerVersionOK )
{
bExplorer = true;
}
}
if( sUserAgent.indexOf( OPERA ) > -1 && bOpera == false )
{
bOperaIdentifyAsAnotherBrowser = true;
}
bOpera = false;
bGecko = false;
if (bOperaIdentifyAsAnotherBrowser)
{
bExplorer = false;
bNavigator = false;
bOpera = true;
}
if (!bNavigator && !bExplorer && !bOpera && !bGecko)
{
bExplorer = true;
}
if ( withReturn && ( bExplorer || bGecko || bNavigator || bOpera ) )
{
return true;
}
}
function doStatus( sLayer )
{
if ( bNavigator && sLayer != null && !bGecko)
{
for (i=0; i<eval('document.'+sLayer+'.document.links.length'); i++)
{
eval('document.'+sLayer+'.document.links[' + i + '].onmouseover = showStatusOver');
eval('document.'+sLayer+'.document.links[' + i + '].onmouseout= showStatusOut');
eval('document.'+sLayer+'.document.links[' + i + '].onfocus= showStatusOver');
}
}
else if ( (bNavigator && sLayer == null ) || bExplorer || bGecko || bOpera)
{
for (i=0; i<document.links.length; i++)
{
document.links[i].onmouseover = showStatusOver;
document.links[i].onmouseout= showStatusOut;
document.links[i].onfocus= showStatusOver;
}
}
}
function showStatusOver()
{
window.status="";
return true;
}
function showStatusOut()
{
window.status="";
return true;
}
function clearFieldValue(oField) {
oField.value="";
}
function removeFocus(oField, oButtonGroup, iValue)
{
if ( iValue != null)
{
if ( oButtonGroup.length != null )
{
if ( !oButtonGroup[iValue].checked )
{
oField.blur();
}
}
}
else
{
oField.blur();
}
}
function setInitialFocus(oField)
{
self.focus();
oField.focus();
}
function printFrame() {
if (window.print)
window.print();
}
function goHelp(helpLink) {
aWindow=window.open(helpLink,
'width',
'toolbar=no,width=460,height=580,status=no,scrollbars=no,resize=no,menubar=no');
}
function openWindow(sURL, sWindow, iType)
{
var sType="";
switch(iType)
{
case 1:
var sType="resizable=1,scrollbars=0,status=0,width=400,height=300,leftmargin=0,topmargin=0";
break;
default:
var sType="menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,width=460,height=580";
break;
}
oWindow = window.open(sURL, sWindow, sType);
oWindow.focus();
}
function offerBookmark() {
if (bExplorer)
{
document.write('You can bookmark this page. Click ');
document.write('<A class=uLine HREF="javascript:window.external.AddFavorite(sBookmarkURL,sBookmarkTitle)">here</a>');
document.write(' to add this to your favourites list.');
} else {
var msg = "You can bookmark this page. Please add this page to your bookmarks.";
if(bNavigator) msg += " Press (CTRL-D)";
document.write(msg);
}
}

