function progress(width)
{
var B = new String;
B = width;
if (B == 'step' || B == '')
{
B = ProgressIn.style.width;
if (B == '') B = '0%';
B = B.substr(0,B.length-1)
B = Math.round(eval(B + ' + (100 - ' + B + ')/2'));
}
ProgressIn.style.width = B + '%';
ProgressIn.innerHTML = B + '%';
if (B > 100) PrgBar.style.display = 'none';
}
function formHighlight(myState)
{
if (
(event.srcElement.tagName=='INPUT') &&
!(event.srcElement=='submit' ||
event.srcElement=='reset' ||
event.srcElement=='checkbox' )
)
{
if (myState == 0)
{
// event.srcElement.style.background = '#EEEEBB';
}
else
{
// event.srcElement.style.background = 'rgb(233, 240, 245)';
}
}
}
function focusField()
{
if (event.srcElement.tagName=='INPUT' && !event.srcElement.ReadOnly)
{
event.srcElement.focus();
}
}
var downStrokeField;
function autojump(fieldName,nextFieldName,fakeMaxLength)
{
var myForm=document.forms[document.forms.length - 1];
var myField=myForm.elements[fieldName];
myField.nextField=myForm.elements[nextFieldName];
if (myField.maxLength == null)
myField.maxLength=fakeMaxLength;
myField.onkeydown=autojump_keyDown;
myField.onkeyup=autojump_keyUp;
}
function autojump_keyDown()
{
this.beforeLength=this.value.length;
downStrokeField=this;
}
function autojump_keyUp()
{
if
(
(this == downStrokeField) &&
(this.value.length > this.beforeLength) &&
(this.value.length >= this.maxLength)
)
this.nextField.focus();
downStrokeField=null;
}
function doerror(err, etype)
{
msg = err.innerHTML;
if (etype=='Error') {
err.innerHTML = '
' + msg;
}
else {
err.innerHTML = '
' + msg;
}
}
function dowarnerr(obj, etype)
{
if(typeof(obj.innerHTML) == 'string') {
doerror(obj, etype);
}
else
{
for (var prop in obj) {
// if (obj.hasOwnProperty(prop)) {
// alert(prop); //0 1 2 length
doerror(obj[prop], etype);
// }
}
//for (i = 0; i < obj.length; i++) { //old code changed Jan 2013 JH
//doerror(obj(i), etype);
//}
}
}
function EnterButton(hover)
{
event.srcElement.hover = 1;
event.srcElement.className = event.srcElement.className.replace('button', 'btnhover');
}
function LeaveButton(hover)
{
event.srcElement.hover = 0;
if ((event.srcElement.hover + event.srcElement.focus) == 0)
event.srcElement.className = event.srcElement.className.replace('btnhover', 'button');
}
function FocusButton(hover)
{
event.srcElement.focus = 1;
event.srcElement.className = event.srcElement.className.replace('button', 'btnhover');
}
function BlurButton(hover)
{
event.srcElement.focus = 0;
if ((event.srcElement.hover + event.srcElement.focus) == 0)
event.srcElement.className = event.srcElement.className.replace('btnhover', 'button');
}
function FocusInput()
{
event.srcElement.className += ' inputhover';
}
function BlurInput()
{
event.srcElement.className = event.srcElement.className.replace(' inputhover', '');
}
function findtxtarea()
{
var Inputs = document.body.getElementsByTagName("TEXTAREA");
for (i = 0; i < Inputs.length; i++)
{
//Error
//if (null == Inputs[i].onfocus) Inputs[i].onfocus = FocusInput;
//if (null == Inputs[i].onblur) Inputs[i].onblur = BlurInput;
}
}
function findbuttons()
{
var Inputs = document.body.getElementsByTagName("INPUT");
for (i = 0; i < Inputs.length; i++)
{
if (Inputs[i].type == 'button' || Inputs[i].type == 'submit' || Inputs[i].type == 'reset')
{
Inputs[i].hover = 0;
Inputs[i].focus = 0;
Inputs[i].className = Inputs[i].className.replace(' button', '') + ' button';
Inputs[i].onmouseenter = EnterButton;
Inputs[i].onmouseleave = LeaveButton;
if (null == Inputs[i].onfocus) Inputs[i].onfocus = FocusButton;
if (null == Inputs[i].onblur) Inputs[i].onblur = BlurButton;
}
else if (Inputs[i].type == 'text' || Inputs[i].type == 'password')
{
if (null == Inputs[i].onfocus)
{
Inputs[i].focus = 0;
//Error
//Inputs[i].onfocus = FocusInput;
}
//Error
//if (null == Inputs[i].onblur) Inputs[i].onblur = BlurInput;
if (Inputs[i].readOnly) Inputs[i].className = Inputs[i].className.replace(' readonly', '') + ' readonly';
}
else if (Inputs[i].type == 'checkbox' || Inputs[i].type == 'radio')
{
//alert(Inputs[i].className);
Inputs[i].className += ' checkbox';
}
}
}
function AddIcons()
{
if (typeof(error)=='object')
{
dowarnerr(error,'Error');
}
if (typeof(warning)=='object')
{
dowarnerr(warning,'Warning');
}
}
var LastParent = document;
function showThumb(im)
{
if(im) { //ben added so undefined.jpg doesn't get called.
if(im != 'undefined'){
if (event.srcElement.parentElement.parentElement.id != 'LMenuDIV')
{
LastParent = event.srcElement;
thumb.outerHTML = '
';
thumb.style.left = event.srcElement.offsetLeft + event.srcElement.offsetWidth;
thumb.style.top = event.srcElement.offsetTop;
}
}
}
}
function unThumb()
{
// thumb.style.display = 'none';
thumb.style.visibility = 'hidden';
}
function loadedThumb()
{
if (thumb.src.substr(thumb.src.length-18,18) != '/images/logoff.gif')
{
// thumb.style.display = 'block';
thumb.width = Math.min(thumb.width, LastParent.offsetParent.clientWidth - LastParent.offsetLeft - LastParent.offsetWidth);
thumb.style.filter="blendTrans(duration=0.5)";
if(thumb.filters.blendTrans.status !='undefined' ) {
if (thumb.filters.blendTrans.status != 2)
{
thumb.filters.blendTrans.apply();
thumb.style.visibility="visible";
thumb.filters.blendTrans.play();
}
}
}
}
function addLMenuItem(Link, Descr, title, Preview)
{
document.write('