<!--
function fncFesGetEnvironment()
{
this.useragent = navigator.userAgent;
this.appname = navigator.appName;
this.appversion = navigator.appVersion;
var loc_usragt = navigator.userAgent.toLowerCase();
this.major_version = parseInt(navigator.appVersion);
this.minor_version = parseFloat(navigator.appVersion);
this.ns  = ((loc_usragt.indexOf('mozilla')!= -1) &&
(loc_usragt.indexOf('spoofer') == -1) &&
(loc_usragt.indexOf('compatible') == -1) &&
(loc_usragt.indexOf('opera') == -1) &&
(loc_usragt.indexOf('webtv') == -1) &&
(loc_usragt.indexOf('hotjava') == -1));
this.ns2 = (this.ns &&
(this.major_version == 2));
this.ns3 = (this.ns &&
(this.major_version == 3));
this.ns4 = (this.ns &&
(this.major_version == 4));
this.ns6 = (this.ns &&
this.major_version == 5 &&
loc_usragt.indexOf("netscape 7") == -1 &&
loc_usragt.indexOf("netscape/7") == -1);
this.ns7 = (this.ns &&
this.major_version == 5 &&
(loc_usragt.indexOf("netscape 7") != -1 ||
loc_usragt.indexOf("netscape/7") != -1));
this.ns4up = (this.ns &&
(this.major_version >= 4));
this.ns6up = (this.ns &&
(this.major_version >= 5));
this.ns7up = (this.ns &&
this.major_version == 5 &&
(loc_usragt.indexOf("netscape 7") != -1 ||
loc_usragt.indexOf("netscape/7") != -1));
this.nsonly =  (this.ns &&
((loc_usragt.indexOf(";nav") != -1) ||
(loc_usragt.indexOf("; nav") != -1)));
this.gecko = (loc_usragt.indexOf('gecko') != -1);
this.ie      = ((loc_usragt.indexOf("msie") != -1) &&
(loc_usragt.indexOf("opera") == -1));
this.ie3     = (this.ie &&
(this.major_version < 4));
this.ie4     = (this.ie &&
(this.major_version == 4) &&
(loc_usragt.indexOf("msie 4")!=-1));
this.ie5     = (this.ie &&
(this.major_version == 4) &&
(loc_usragt.indexOf("msie 5.0")!=-1));
this.ie5_5   = (this.ie &&
(this.major_version == 4) &&
(loc_usragt.indexOf("msie 5.5") !=-1));
this.ie6     = (this.ie &&
(this.major_version == 4) &&
(loc_usragt.indexOf("msie 6.")!=-1) );
this.ie4up   = (this.ie  &&
(this.major_version >= 4));
this.ie5up   = (this.ie  &&
!this.ie3 &&
!this.ie4);
this.ie5_5up = (this.ie &&
!this.ie3 &&
!this.ie4 &&
!this.ie5);
this.ie6up   = (this.ie  &&
!this.ie3 &&
!this.ie4 &&
!this.ie5 &&
!this.ie5_5);
this.aol   = (loc_usragt.indexOf("aol") != -1);
this.aol3  = (this.aol &&
this.ie3);
this.aol4  = (this.aol &&
this.ie4);
this.aol5  = (loc_usragt.indexOf("aol 5") != -1);
this.aol6  = (loc_usragt.indexOf("aol 6") != -1);
this.opera =  (loc_usragt.indexOf("opera") != -1);
this.opera2 = (loc_usragt.indexOf("opera 2") != -1 ||
loc_usragt.indexOf("opera/2") != -1);
this.opera3 = (loc_usragt.indexOf("opera 3") != -1 ||
loc_usragt.indexOf("opera/3") != -1);
this.opera4 = (loc_usragt.indexOf("opera 4") != -1 ||
loc_usragt.indexOf("opera/4") != -1);
this.opera5 = (loc_usragt.indexOf("opera 5") != -1 ||
loc_usragt.indexOf("opera/5") != -1);
this.opera6 = (loc_usragt.indexOf("opera 6") != -1 ||
loc_usragt.indexOf("opera/6") != -1);
this.opera7 = (loc_usragt.indexOf("opera 7") != -1 ||
loc_usragt.indexOf("opera/7") != -1);
this.opera5up = (this.opera &&
!this.opera2 &&
!this.opera3 &&
!this.opera4);
this.opera6up = (this.opera &&
!this.opera2 &&
!this.opera3 &&
!this.opera4 &&
!this.opera5);
this.opera7up = (this.opera &&
!this.opera2 &&
!this.opera3 &&
!this.opera4 &&
!this.opera5 &&
!this.opera6);
this.webtv = (loc_usragt.indexOf("webtv") != -1);
this.tvnavigator = ((loc_usragt.indexOf("navio") != -1) ||
(loc_usragt.indexOf("navio_aoltv") != -1));
this.aoltv = this.tvnavigator;
this.hotjava = (loc_usragt.indexOf("hotjava") != -1);
this.hotjava3 = (this.hotjava &&
(this.major_version == 3));
this.hotjava3up = (this.hotjava &&
(this.major_version >= 3));
if (this.ns2 ||
this.ie3)
{
this.js = 1.0;
}
if (this.ns3)
{
this.js = 1.1;
}
if (this.opera)
{
this.js = 1.1;
}
if (this.opera5up)
{
this.js = 1.3;
}
if ((this.ns4 &&
(this.minor_version <= 4.05)) ||
this.ie4)
{
this.js = 1.2;
}
if ((this.ns4 &&
(this.minor_version > 4.05)) ||
this.ie5)
{
this.js = 1.3;
}
if (this.hotjava3up)
{
this.js = 1.4;
}
if (this.ns6 ||
this.gecko)
{
this.js = 1.5;
}
if (this.ns6up)
{
this.js = 1.5;
}
if (this.ie5up&
loc_usragt.indexOf("mac") == -1)
{
this.js = 1.3;
}
if (this.ie5up&
loc_usragt.indexOf("mac") != -1)
{
this.js = 1.4;
}
this.win = ((loc_usragt.indexOf("win") != -1) ||
(loc_usragt.indexOf("16bit") != -1));
this.win95 = ((loc_usragt.indexOf("win95") != -1) ||
(loc_usragt.indexOf("windows 95") != -1));
this.win16 = ((loc_usragt.indexOf("win16") != -1) ||
(loc_usragt.indexOf("16bit") != -1) ||
(loc_usragt.indexOf("windows 3.1") != -1) ||
(loc_usragt.indexOf("windows 16-bit") != -1));
this.win31 = ((loc_usragt.indexOf("windows 3.1") != -1) ||
(loc_usragt.indexOf("win16") != -1) ||
(loc_usragt.indexOf("windows 16-bit") != -1));
this.win98 = ((loc_usragt.indexOf("win98") != -1) ||
(loc_usragt.indexOf("windows 98") != -1));
this.winnt = ((loc_usragt.indexOf("winnt") != -1) ||
(loc_usragt.indexOf("windows nt") != -1) ||
(loc_usragt.indexOf("windows 2000") != -1));
this.win32 =  (this.win95 ||
this.winnt ||
this.win98 ||
((this.major_version >= 4) &&
(navigator.platform == "Win32")) ||
(loc_usragt.indexOf("win32") != -1) ||
(loc_usragt.indexOf("32bit") != -1));
this.winme = (loc_usragt.indexOf("win 9x 4.90") != -1);
this.win2k = ((loc_usragt.indexOf("windows nt 5.0") != -1) ||
(loc_usragt.indexOf("windows 2000") != -1));
this.winxp = (loc_usragt.indexOf("windows nt 5.1") != -1);
this.os2   = ((loc_usragt.indexOf("os/2") != -1) ||
(navigator.appVersion.indexOf("OS/2") != -1) ||
(loc_usragt.indexOf("ibm-webexplorer") != -1));
this.mac    = (loc_usragt.indexOf("mac") != -1);
this.mac68k =  (this.mac &&
((loc_usragt.indexOf("68k") != -1) ||
(loc_usragt.indexOf("68000") != -1)));
this.macppc =  (this.mac &&
((loc_usragt.indexOf("ppc") != -1) ||
(loc_usragt.indexOf("powerpc") != -1)));
this.sun   = (loc_usragt.indexOf("sunos") != -1);
this.sun4  = (loc_usragt.indexOf("sunos 4") != -1);
this.sun5  = (loc_usragt.indexOf("sunos 5") != -1);
this.suni86 = (this.sun && (loc_usragt.indexOf("i86") != -1));
this.irix  = (loc_usragt.indexOf("irix") != -1);
this.irix5 = (loc_usragt.indexOf("irix 5") != -1);
this.irix6 = ((loc_usragt.indexOf("irix 6") != -1) ||
(loc_usragt.indexOf("irix6") != -1));
this.hpux  = (loc_usragt.indexOf("hp-ux")!=-1);
this.hpux9 = (this.hpux &&
(loc_usragt.indexOf("09.") != -1));
this.hpux10= (this.hpux &&
(loc_usragt.indexOf("10.") != -1));
this.aix   = (loc_usragt.indexOf("aix") != -1);
this.aix1  = (loc_usragt.indexOf("aix 1") != -1);
this.aix2  = (loc_usragt.indexOf("aix 2") != -1);
this.aix3  = (loc_usragt.indexOf("aix 3") != -1);
this.aix4  = (loc_usragt.indexOf("aix 4") != -1);
this.linux = (loc_usragt.indexOf("inux") != -1);
this.sco   = (loc_usragt.indexOf("sco") != -1) ||
(loc_usragt.indexOf("unix_sv") != -1);
this.unixware = (loc_usragt.indexOf("unix_system_v") != -1);
this.mpras    = (loc_usragt.indexOf("ncr") != -1);
this.reliant  = (loc_usragt.indexOf("reliantunix") != -1);
this.dec   = ((loc_usragt.indexOf("dec") != -1) ||
(loc_usragt.indexOf("osf1") != -1) ||
(loc_usragt.indexOf("dec_alpha") != -1) ||
(loc_usragt.indexOf("alphaserver") != -1) ||
(loc_usragt.indexOf("ultrix") != -1) ||
(loc_usragt.indexOf("alphastation") != -1));
this.sinix = (loc_usragt.indexOf("sinix") != -1);
this.freebsd = (loc_usragt.indexOf("freebsd") != -1);
this.bsd = (loc_usragt.indexOf("bsd") != -1);
this.unix  = ((loc_usragt.indexOf("x11") != -1) ||
this.sun ||
this.irix ||
this.hpux ||
this.sco ||
this.unixware ||
this.mpras ||
this.reliant ||
this.dec ||
this.sinix ||
this.aix ||
this.linux ||
this.bsd ||
this.freebsd);
this.vms   = ((loc_usragt.indexOf("vax")!=-1) || (loc_usragt.indexOf("openvms")!=-1));
}
function fncFesGetUrlParameters()
{
var loc_str = window.top.location.search.substr(1);
if (loc_str.length > 0)
{
var loc_params_array = loc_str.split("&");
for (var loc_ind1 in loc_params_array)
{
loc_params_array[loc_ind1] = loc_params_array[loc_ind1].split("=");
}
}
else
{
var loc_params_array = new Array;
}
return loc_params_array;
}
var pub_fes_mo_dir  = '';
var pub_fes_mo_options = new Array();
var pub_fes_mo_preloaded = false;
function fncFesMoPreLoad(prm_id,prm_img,prm_status)
{
if(!document.images)
{
return false;
}
else
{
pub_fes_mo_options[prm_id] = new fncFesMoCreateOptionArrayElement(prm_id,prm_img,prm_status);
return true;
}
}
function fncFesMoCreateOptionArrayElement(prm_id,prm_img,prm_status)
{
this.Id = prm_id;
this.Status = prm_status;
this.ImgOff = new Image;
this.ImgOn = new Image;
loc_image_name = pub_fes_mo_dir + prm_img;
loc_file_ext = loc_image_name.substr(loc_image_name.lastIndexOf("."));
loc_file_name = loc_image_name.substr(0,loc_image_name.lastIndexOf("."));
this.ImgOff.src = loc_file_name + loc_file_ext;
this.ImgOn.src = loc_file_name + '_on' + loc_file_ext;
}
function fncFesMoChangeState(prm_action, prm_id, prm_imgswap)
{
if (document.images && pub_fes_mo_preloaded==true)
{
if (prm_action)
{
if (prm_imgswap)
{
document[prm_id].src = pub_fes_mo_options[prm_id].ImgOn.src;
}
window.status = pub_fes_mo_options[prm_id].Status;
}
else
{
if (prm_imgswap)
{
document[prm_id].src = pub_fes_mo_options[prm_id].ImgOff.src;
}
window.status = '';
}
}
return true;
}
function fncFesOpenWindow(prm_page_name,
prm_target_name,
prm_window_width,
prm_window_height,
prm_xoffset,
prm_yoffset,
prm_scrollbars,
prm_toolbar,
prm_location,
prm_directories,
prm_status,
prm_menubar,
prm_resizeable)
{
var loc_xpos = ((screen.width - prm_window_width) / 2) + prm_xoffset;
var loc_ypos = ((screen.height - prm_window_height) / 2) + prm_yoffset;
if (fes_environment.ns4)
{
loc_win_features = "toolbar=" + prm_toolbar + ",location=" + prm_location + ",directories=" + prm_directories + ",status=" + prm_status + ",menubar=" + prm_menubar + ",scrollbars=" + prm_scrollbars +",resizable=" + prm_resizeable + ",screenX=" + loc_xpos + ",screenY=" + loc_ypos + ",width=" + prm_window_width + ",height=" + prm_window_height;
}
else
{
loc_win_features = "toolbar=" + prm_toolbar + ",location=" + prm_location + ",directories=" + prm_directories + ",status=" + prm_status + ",menubar=" + prm_menubar + ",scrollbars=" + prm_scrollbars +",resizable=" + prm_resizeable + ",left=" + loc_xpos + ",top=" + loc_ypos + ",width=" + prm_window_width + ",height=" + prm_window_height;
}
loc_win = window.open(prm_page_name,prm_target_name,loc_win_features);
if (fes_environment.ns)
{
loc_win.focus();
}
return true;
}
function fncFesResizeWindow(prm_window_width, prm_window_height)
{
if (screen.width < prm_window_width)
{
prm_window_width = screen.width;
}
if (screen.height < prm_window_height)
{
prm_window_height = screen.height;
}
window.resizeTo(prm_window_width,prm_window_height);
}
function fncFesCheckResizeWindow(prm_window_width, prm_window_height, prm_new_window_width, prm_new_window_height)
{
if (!fes_environment.ns4)
{
if (fes_environment.ie)
{
if (document.body.clientWidth != prm_window_width ||
document.body.clientHeight != prm_window_height)
{
fncFesResizeWindow(prm_new_window_width,prm_new_window_height);
}
}
else
{
if (window.innerWidth != prm_window_width ||
window.innerHeight != prm_window_height)
{
fncFesResizeWindow(prm_new_window_width,prm_new_window_height);
}
}
}
}
function fncSelectFormElementText(prm_form_name,prm_element_name)
{
document.forms[prm_form_name].elements[prm_element_name].focus();
document.forms[prm_form_name].elements[prm_element_name].select();
loc_range=document.forms[prm_form_name].elements[prm_element_name].createTextRange();
loc_range.execCommand('Copy');
}
function fncFesPrintPage()
{
if (window.print)
{
window.print();
}
else
{
var loc_web_browser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', loc_web_browser);
WebBrowser1.ExecWB(6, 2); //Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";
}
}
function fncFesRandomNumber(prm_start,prm_end)
{
return prm_start + Math.floor(Math.random() * (prm_end - prm_start + 1));
}
var fes_environment = new fncFesGetEnvironment();
function fncFesGoToURLFromSelect (prm_form,
prm_field)
{
var loc_index = prm_form.elements[prm_field].selectedIndex;
if(loc_index != "")
{
window.location.href=prm_form.elements[prm_field].options[loc_index].value;
}
}
//=================================================================================================
var pub_contextmenu_message="";
//=================================================================================================
function fncFesHandleContextMenuForImages(prm_event)
//
// Function to disable right mouse click context menu for images only
//
// Arguments
//
//  prm_event - in this instance equates to mouse key pressed
//
{
// The script pops up an alert box with a 'message' or if no message is passed just returns
// without any action
// Internet Explorer 4 - test for mouse button press
if (fes_environment.ie4)
{
if (event.button == 2 || event.button == 3)
{
if (event.srcElement.tagName == "IMG")
{
if (pub_contextmenu_message != "")
{
alert(pub_contextmenu_message);
}
return false;
}
}
}
// Internet Explorer 5 upwards
else if (fes_environment.ie5up)
{
if (event.srcElement.tagName == "IMG")
{
if (pub_contextmenu_message != "")
{
alert(pub_contextmenu_message);
}
return false;
}
}
// Netscape 4 - test for mouse button press
else if (fes_environment.ns4)
{
if (prm_event.which == 3)
{
if (pub_contextmenu_message != "")
{
alert(pub_contextmenu_message);
}
return false;
}
}
// Netscape 6
else if (fes_environment.ns6up)
{
if (prm_event.target.tagName == "IMG")
{
if (pub_contextmenu_message != "")
{
alert(pub_contextmenu_message);
}
return false;
}
}
// Opera 6 upwards - not currently functional due to bug in Opera apparently
else if (fes_environment.opera6up)
{
if (prm_event.which == 3 && prm_event.target.tagName == "IMG")
{
if (pub_contextmenu_message != "")
{
alert(pub_contextmenu_message);
}
return false;
}
}
}
//=================================================================================================
function fncFesAssociateImages()
//
// Function to associate mousedown event on images with context menu handler - used for Netscape
// 4 only.
//
// Arguments
//
//  None
//
{
for(loc_counter = 0; loc_counter < document.images.length; loc_counter++)
{
document.images[loc_counter].onmousedown = fncFesHandleContextMenuForImages;
}
}
//=================================================================================================
function fncFesDisableContextMenuForImages()
//
// Function to invoke the disabling of the right mouse click context menu for images only
//
// Arguments
//
//  None
//
{
if (fes_environment.ie4)
{
document.onmousedown = fncFesHandleContextMenuForImages;
}
else if (fes_environment.ie5up)
{
document.oncontextmenu = fncFesHandleContextMenuForImages;
}
else if (fes_environment.ns6up)
{
document.oncontextmenu = fncFesHandleContextMenuForImages;
}
else if (fes_environment.opera6up)
{
document.onmouseup = fncFesHandleContextMenuForImages;
}
else if (fes_environment.ns4)
{
fncFesAssociateImages();
}
}
//=================================================================================================
function fncFesDisableCopyText()
//
// Function to disable the copying of text via select and copy on an HTML page
//
// Arguments
//
//  None
//
{
// Note that there is currently a cludge in here for Safari - need to test when we can afford a Mac
if ((fes_environment.ie4up ||
fes_environment.opera6up) &&
!fes_environment.safari)
{
document.onselectstart=new Function ("return false");
}
else if (fes_environment.ns6up &&
!fes_environment.safari)
{
document.onmousedown=new Function ("return false");
document.onclick=new Function ("return true");
}
}