window.offscreenBuffering = true;
var cssp = (document.getElementById || document.layers || document.all);
function csspObj(id) { 
 if(document.getElementById) {
  var obj = document.getElementById(id);
  }
  else if(document.all) {
  var obj =  eval('document.all.' + id);
  }
  else if(document.layers) {
  var obj = getLayer(id, document);
  obj.style = obj;
  }
if(obj && document.layers) obj.style = obj;
if(!obj) return 0;   
obj.getProperty = CSSP_getProperty;
obj.setProperty = CSSP_setProperty;
obj.resizeTo = (obj.resizeTo) ? obj.resizeTo : CSSP_resizeTo;
obj.resizeBy = (obj.resizeBy) ? obj.resizeBy : CSSP_resizeBy;
obj.moveTo = (obj.moveTo) ? obj.moveTo : CSSP_moveTo;
obj.moveBy = (obj.moveBy) ? obj.moveBy : CSSP_moveBy;
obj.getClipValue = CSSP_getClipValue;
obj.clipTo = CSSP_clipTo;
obj.clipBy = CSSP_clipBy;
obj.scrollBy = CSSP_scrollBy;
  //if(obj.captureEvents) {
  //obj.captureEvents(Event.MOUSEDOWN);
  //obj.onmousedown = eventRoute;
  //}
return eval(obj);
}
function eventRoute(e){this.routeEvent(e)}
function CSSP_resizeTo(w,h) {
this.style.width = w;
this.style.height = h;
}
function CSSP_resizeBy(w,h) {
this.style.width = parseInt(this.style.width) + w;
this.style.height =  parseInt(this.style.height) + h;
}
function CSSP_moveBy(dx,dy) {
this.style.left = parseInt(this.style.left) + dx;
this.style.top =  parseInt(this.style.top) + dy;
}
function CSSP_moveTo(x,y) {
this.style.left = parseInt(x);
this.style.top =  parseInt(y);
}
function CSSP_getClipValue(which) {
  if(this.clip) {
  return eval('this.clip.' + which)
  }
  else {
  var clip =  this.style.clip.split('(')[1].split(')')[0].split(' ');
  if(which == 'top') return parseInt(clip[0]);
  if(which == 'right') return parseInt(clip[1]);
  if(which == 'bottom') return parseInt(clip[2]);
  if(which == 'left') return parseInt(clip[3]);
  }
}
function CSSP_clipTo(t,r,b,l) {
if(this.clip) { this.clip.top = t; this.clip.right = r; this.clip.bottom = b; this.clip.left = l; }
else this.style.clip = 'rect(' +t+ ' ' +r+ ' ' +b+ ' ' +l+ ')';
}
function CSSP_clipBy(t,r,b,l) {
var ct = (this.currenStyle) ? parseInt(this.currentStyle.clipTop) : this.getClipValue('top');
var cr = (this.currenStyle) ? parseInt(this.currentStyle.clipRight) : this.getClipValue('right');
var cb = (this.currenStyle) ? parseInt(this.currentStyle.clipBottom) : this.getClipValue('bottom');
var cl = (this.currenStyle) ? parseInt(this.currentStyle.clipLeft) : this.getClipValue('left');  
this.clipTo((ct + t),(cr + r),(cb + b),(cl + l)); 
}
function CSSP_scrollBy(dx,dy) {
this.moveBy(-dx,-dy);
this.clipBy(dy,dx,dy,dx);
}
function CSSP_getProperty(property) {
if(property == 'top') var top = parseInt(this.style.top);
if(property == 'left') var left = parseInt(this.style.left);
if(property == 'width') var width = (this.style.width) ? parseInt(this.style.width)  : parseInt(this.style.clip.width);
if(property == 'height') var height = (this.style.height) ? parseInt(this.style.height)  : parseInt(this.style.clip.height);
if(property == 'offsetWidth') var offsetWidth = (this.offsetWidth) ? this.offsetWidth  : parseInt(this.style.clip.width);
if(property == 'offsetHeight') var offsetHeight = (this.offsetHeight) ?  this.offsetHeight  : this.document.height;
if(property == 'zIndex') var zIndex = this.style.zIndex;
if(property == 'visibility') var visibility = (this.style.visibility == 'show' || this.style.visibility == 'visible') ? 'visible' : 'hidden'; 
if(property == 'bgColor') var bgColor = (this.bgColor) ? rgbToHex(this.bgColor) : (this.style.backgroundColor.indexOf('rgb') != -1) ? rgbToHex(this.style.backgroundColor.split('rgb(')[1].split(')')[0]) : this.style.backgroundColor.toUpperCase(); 
if(property == 'bgImage') var bgImage = (typeof(this.style.background) == 'object') ? this.style.background.src : (this.style.backgroundImage) ? this.style.backgroundImage.split('url(')[1].split(')')[0] : 'undefined';
return eval(property);
}
function CSSP_setProperty(property,value) {
 if(property == 'bgImage') {
 if(document.layers) return this.style.background.src = value;
 else return this.style.backgroundImage =  'url(' +value+ ')';
 }
 if(property == 'bgColor') {
 property =  (document.layers) ? 'document.bgColor' : 'backgroundColor';
 if(value == 'transparent' && document.layers) return this.document.bgColor = null;
 value = (value.indexOf('rgb(') != -1) ? rgbToHex(value.split('rgb(')[1].split(')')[0]) : value;
 }
 if(property == 'innerHTML') {
   if(this.innerHTML != null) {
   this.innerHTML = '';
   return this.innerHTML = value;
   }
   else {
   this.document.open();
   this.document.write(value);
   this.document.close();
   return true; 
   } 
 }
return eval('this.style.' + property + '= value');
}
function getLayer(name,doc) {
var i, layer;
if(!doc) doc = document;
  for(var i=0;i < doc.layers.length;i++) {
  layer = doc.layers[i];
  if(layer.name == name) return layer;
    if(layer.document.layers.length > 0) {
    layer = getLayer(name, layer.document);
    if(layer.name == name) return layer;
    }
  }
return 0;
}
function rgbToHex() {
var hexChar = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
var hexVal = '';
var rgb = (arguments.length > 1) ? arguments : arguments[0].toString().split(',');
  for(var i = 0; i < rgb.length; i++) {
  var decVal = parseInt(rgb[i],10);
  var Hex1 = Math.floor(decVal / 16);
  var Hex2 = Math.floor(decVal - (Hex1 * 16));
    if(Hex1 >= 16) return hexVal = rgbToHex(Hex1) + hexChar[Hex2]; 
    else {
    var h1 = (rgb.length == 1 && Hex1 <= 9) ? (hexChar[0] + hexChar[Hex1]) : hexChar[Hex1];
    hexVal += h1 + hexChar[Hex2]; 
    }
  }
return '#' + hexVal;
}
function SHLayer(layername,state) {
 	csspObj(layername).setProperty('visibility',state);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var speed = 50 //decrease value to increase speed (must be positive) 
var pause = 2000 //increase value to increase pause
var timerID = null 
var bannerRunning = false
var ar = new Array()
ar[0] = ""
ar[1] = ""
ar[2] = ""
ar[3] = ""
var currentMessage = 0
var offset = 0
function stopBanner() {
	if (bannerRunning)
		clearTimeout(timerID)
		bannerRunning = false
		}
function startBanner() {
		stopBanner()
		showBanner()
}
function showBanner() { 
		var text = ar[currentMessage]
		if (offset < text.length) {
			if (text.charAt(offset) == " ")
			offset++ 
			var partialMessage = text.substring(0, offset + 1)
			window.status = partialMessage
			offset++ 
			timerID = setTimeout("showBanner()", speed)
			bannerRunning = true
				} else {
			offset = 0
			currentMessage++
				if (currentMessage == ar.length)
					currentMessage = 0
					timerID = setTimeout("showBanner()", pause)
					bannerRunning = true
					}
							}
							
function SHLayer(layername,state) {
 	csspObj(layername).setProperty('visibility',state);
}
							
