/*
//____________________________________________________________________
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//____________________________________________________________________
*/
//____________________________________________________________________
// Globals
var bmeDOM_isAccessible = 0;
var bmeDOM_isMSIE = 0;
var bmeDOM_isNetscape = 0;
var bmeDOM_isStandard = document.getElementById;
if (bmeDOM_isStandard)
{
// alert('bmeDOM_isstandard, bmeDOM_isaccessible');
bmeDOM_isAccessible = 1;
}
else
{
bmeDOM_isMSIE = document.all;
if (bmeDOM_isMSIE)
{
bmeDOM_isAccessible = 1;
}
else
{
bmeDOM_isNetscape =
navigator.appName.indexOf('Netscape') != -1
&& (parseInt(navigator.appVersion, 10) == 4)
;
}
if (bmeDOM_isNetscape)
{
bmeDOM_isAccessible = 1;
}
}
//____________________________________________________________________
// Object access
function bmeDOM_getObjectStyle(objectid, withstyle)
{
// Get Document Object Model object with or without style
if (bmeDOM_isStandard)
{
// Standard DOM
return withstyle
? document.getElementById(objectid).style
: document.getElementById(objectid)
;
}
if (bmeDOM_isMSIE)
{
// MSIE-specific DOM
return withstyle
? document.all[objectid].style
: document.all[objectid]
;
}
if (bmeDOM_isNetscape
&& document.layers
&& document.layers[objectid]
)
{
// Netscape-specific DOM
return document.layers[objectid];
}
// Object/style not found or not accessible
// alert('[bmeDOM_getObjectStyle] WARNING 1 (' + objectid + ')');
return null;
}
function bmeDOM_getObject(objectid)
{
// Get Document Object Model object
return bmeDOM_getObjectStyle(objectid, 0);
}
//____________________________________________________________________
// Object class queries/settings
function bmeDOM_getClassName(objectid)
{
// Get DOM object
var obj = bmeDOM_getObject(objectid);
// Return empty string if no DOM object
return obj == null ? '' : obj.className;
}
function bmeDOM_setClassName(objectid, classname, replace)
{
// Get DOM object
var obj = bmeDOM_getObject(objectid);
//
if (obj)
{
if (replace != null && replace)
{
obj.className = obj.className.replace(replace, classname);
}
else
{
obj.className = classname;
}
}
}
//____________________________________________________________________
// Object style queries/settings
function bmeDOM_StyleDisplay(objectid, displaymode)
{
// Get DOM object
var obj = bmeDOM_getObject(objectid);
// Abort if no DOM object
if (obj == null)
{
// alert('[bmeDOM_StyleDisplay('+ objectid + ', ' + displaymode + ')] ERROR 1');
return;
}
// Check if DOM object style accessible
if (obj.style)
{
// Get current display style
var currentdisplay = obj.style.display ? obj.style.display : 'none';
// Evaluate new display mode
switch (displaymode)
{
case 'toggle' :
// Toggle display/visibility request (none <-> block)
switch (currentdisplay)
{
case 'none' :
// Show (as block!)
obj.style.display = 'block';
break;
case 'block' :
case 'inline' :
default :
// Hide
obj.style.display = 'none';
break;
}
break;
case 'none' :
case 'block' :
case 'inline' :
default :
// Set specified display mode
obj.style.display = displaymode;
break;
}
}
else
{
// Error - object style not accessible
// alert('[bmeDOM_StyleDisplay('+ objectid + ', ' + displaymode + ')] ERROR 2 ' + obj.style.display);
}
}
function bmeDOM_Show(objectid) { bmeDOM_StyleDisplay(objectid, 'block'); }
function bmeDOM_Hide(objectid) { bmeDOM_StyleDisplay(objectid, 'none'); }
function bmeDOM_ShowOneOf(objectid, x, n)
{
for (i = 0; i < n; i++)
{
bmeDOM_Hide(objectid + i);
}
bmeDOM_Show(objectid + x);
}
function bmeDOM_ShowOneOfRange(objectid, x, ns, ne)
{
for (i = ns; i <= ne; i++)
{
bmeDOM_Hide(objectid + i);
}
bmeDOM_Show(objectid + x);
}
//____________________________________________________________________
// BME event management
function bmeEvent_WindowOnload(
newfct // New function to be assigned to window.onload
)
{
// Check if function already assigned to window.onload
if (typeof window.onload == 'function')
{
// Get current window.onload function/assignment
var curfct = window.onload;
// Function already assigned to window.onload
// Create/assign new function to window onload
window.onload = function()
{
// Execute existing function
if (curfct)
{
curfct();
}
// Execute new function
newfct();
}
}
else
{
// No function assigned to window.onload
// Assign new function to window.onload
window.onload = newfct;
}
}
//____________________________________________________________________
// BME menu management
function bmeMenu_Activate(elemId)
{
if (document.all && document.getElementById)
{
if (document.getElementById(elemId))
{
// Get menu by id
var menuroot = document.getElementById(elemId);
// Get/iterate menu LI tags
var li_list = menuroot.getElementsByTagName("LI");
for (i = 0; i < li_list.length; i++)
{
// Iterate LI tag UL tags
if (li_list[i].getElementsByTagName("UL").length > 0)
{
// Display as block on mouse over event
li_list[i].onmouseover = function()
{
this.getElementsByTagName("UL")[0].style.display = 'block';
}
// Display deactivate on mouse out event
li_list[i].onmouseout = function()
{
this.getElementsByTagName("UL")[0].style.display = 'none';
}
}
/*
// Iterate LI tag UL tags
for (j = 0; j < li_list[i].getElementsByTagName("UL").length; j++)
{
// Display as block on mouse over event
li_list[i].onmouseover = function()
{
this.getElementsByTagName("UL")[j].style.display = 'block';
}
// Display deactivate on mouse out event
li_list[i].onmouseout = function()
{
this.getElementsByTagName("UL")[j].style.display = 'none';
}
}
*/
}
}
}
}
//____________________________________________________________________
// BME CSS
// Override/prepare inactive bme_tabcontainer0
//document.write('');
//____________________________________________________________________
// JavaScript code end