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

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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//MM_reloadPage(true);

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_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];}
}


// dhtml library by rod.o2theory.com | soloplay@msn.com
// keep these two lines and you're free to use this code

// last updated: 05.12.2003

// lib namespace
var lib = {
	// browser check (needed for hacks and bug fixes for specific browsers)
	browsercheck: function()
	{
		this.ua = navigator.userAgent.toLowerCase();
		this.dom = document.getElementById ? 1 : 0;
		this.op7 = (this.dom && this.ua.indexOf('opera 7') > -1 || this.ua.indexOf('opera/7') > -1) ? 1 : 0;
		this.ie5 = (this.dom && this.ua.indexOf('msie 5') > -1) ? 1 : 0;
		this.ie6 = (this.dom && this.ua.indexOf('msie 6') > -1) ? 1 : 0;
		this.moz = (this.dom && this.ua.indexOf('mozilla') > -1 && this.ua.indexOf('gecko') > -1) ? 1 : 0;
	},

	// adds a unit pixel to dimensions or movements
	px: function(n) { return isNaN(n) ? n : n + 'px'; },

	// global reference to the dhtml object
	registry: new Array(),
	
	// dhtml object constructor
	dhtmlobject: function(id)
	{
		this.el = document.getElementById ? document.getElementById(id) : null;
		this.css = this.el.style;
		this.i = lib.registry.length; lib.registry[this.i] = this;		
		this.w = this.el.offsetWidth ? this.el.offsetWidth : 0;
		this.h = this.el.offsetHeight ? this.el.offsetHeight : 0;
		this.x = this.el.offsetLeft ? this.el.offsetLeft : 0;
		this.y = this.el.offsetTop ? this.el.offsetTop : 0;
		this.o = 100;
		this.fadetimer = this.slidetimer = 0;
		this.fading = this.sliding = false;
	}
}

// lib.dhtmlobject dhtml methods
lib.dhtmlobject.prototype = {
	// update object values
	update: function()
	{
		this.w = this.el.offsetWidth ? this.el.offsetWidth : parseInt(this.css.width) ? parseInt(this.css.width) : 0;
		this.h = this.el.offsetHeight ? this.el.offsetHeight : parseInt(this.css.height) ? parseInt(this.css.height) : 0;
		this.x = this.el.offsetLeft ? this.el.offsetLeft : parseInt(this.css.left) ? parseInt(this.css.left) : 0;
		this.y = this.el.offsetTop ? this.el.offsetTop : parseInt(this.css.top) ? parseInt(this.css.top) : 0;
	},

	// move layer to
	moveto: function(x, y)
	{
		if (x != null)
		{
			this.x = x;
			this.css.left = lib.px(x);
		}
		if (y != null)
		{
			this.y = y;
			this.css.top = lib.px(y);
		}
	},

	// move layer by
	moveby: function(x, y) { this.moveto(this.x + x, this.y + y); },

	// visibility methods
	show: function() { this.css.visibility = 'visible'; },
	hide: function() { this.css.visibility = 'hidden'; },

	// set layer width
	setwidth: function(w)
	{
		if (w != null)
		{
			this.w = w;
			this.css.width = lib.px(w);
		}
	},

	// set layer height
	setheight: function(h)
	{
		if (h != null)
		{
			this.h = h;
			this.css.height = lib.px(h);
		}
	},

	// clip layer to
	clipto: function(t, r, b, l, s)
	{
		this.css.clip = 'rect(' + lib.px(t) + ', ' + lib.px(r) + ', ' + lib.px(b) + ', ' + lib.px(l) + ')';
		if (s != null) { this.setwidth(r); this.setheight(b); }
	},

	// write content to object
	write: function(text)
	{
		if (typeof this.el.innerHTML != 'undefined')
		{
			this.el.innerHTML = text;
			this.update();
		}
	},

	// set layer opacity
	setopacity: function(o)
	{
		if (typeof this.css.MozOpacity != 'undefined') this.css.MozOpacity = (o / 100);
		else if (this.el.filters) this.css.filter = 'alpha(opacity = ' + o + ')';
		this.o = o;
	},

	// fade animation
	fadeto: function(target, time, fn)
	{
		clearTimeout(this.fadetimer);
		if (!fn) fn = 0;
		var starttime = new Date().valueOf();
		var endtime = starttime + time;
		this.fade(target, this.o, starttime, endtime, fn);
	},

	fade: function(target, startopacity, starttime, endtime, fn)
	{
		var currenttime = new Date().valueOf();
		if (currenttime >= endtime)
		{
			this.fading = false;
			clearTimeout(this.fadetimer);
			this.setopacity(target);
			if (fn) eval(fn);
		}
		else
		{
			this.fading = true;
			var percent = (currenttime - starttime) / (endtime - starttime);
			var o = (percent * (target - startopacity)) + startopacity;
			this.setopacity(o);
			this.fadetimer = setTimeout('lib.registry[' + this.i + '].fade(' + target + ', ' + startopacity + ', ' + starttime + ', ' + endtime + ', "' + fn + '")', 10);
		}
	},

	// slide animation
	slideto: function(endx, endy, time, fn)
	{
		clearTimeout(this.slidetimer);
		if (!fn) fn = 0;
		var starttime = new Date().valueOf();
		var endtime = starttime + time;
		this.slide(this.x, this.y, endx, endy, starttime, endtime, fn);
	},

	slide: function(startx, starty, endx, endy, starttime, endtime, fn)
	{
		var currenttime = new Date().valueOf();
		if (currenttime >= endtime)
		{
			this.sliding = false;
			clearTimeout(this.slidetimer);
			this.moveto(endx, endy);
			if (fn) eval(fn);
		}
		else
		{
			this.sliding = true;
			var percent = (currenttime - starttime) / (endtime - starttime);
			this.moveto((percent * (endx - startx)) + startx, (percent * (endy - starty)) + starty);
			this.slidetimer = setTimeout('lib.registry[' + this.i + '].slide(' + startx + ', ' + starty + ', ' + endx + ', ' + endy + ', ' + starttime + ', ' + endtime + ', "' + fn + '");', 10);
		}
	}
}
// end of lib.dhtmlobject dhtml methods


// event object
lib.event = {
	init: function(e)
	{
		lib.document.getcanvas();
		e = window.event ? window.event : e;
		this.mousex = typeof e.clientX != 'undefined' ? e.clientX + lib.document.scrollx : 0;
		this.mousey = typeof e.clientY != 'undefined' ? e.clientY + lib.document.scrolly : 0;
		this.layerx = typeof e.offsetX != 'undefined' ? e.offsetX : typeof e.layerX != 'undefined' ? e.layerX : 0;
		this.layery = typeof e.offsetY != 'undefined' ? e.offsetY : typeof e.layerY != 'undefined' ? e.layerY : 0;
		this.type = e.type;
		this.target = e.srcElement || e.target;
		if (this.target.nodeType == 3 || this.target.tagName.toLowerCase() == 'img') this.target = this.target.parentNode;
	},

	// prevents event default action
	preventdefault: function(e)
	{
		if (window.event) window.event.returnValue = false;
		else if (e.preventDefault) e.preventDefault();
	},

	// cancels event bubbling to parent elements
	cancelbubble: function(e)
	{
		if (window.event) window.event.cancelBubble = true;
		else if (e.stopPropagation) e.stopPropagation();
	}
}

// document object
lib.document = {
	getcanvas: function()
	{
		if (document.documentElement && document.documentElement.scrollLeft) this.scrollx = document.documentElement.scrollLeft;
		else if (document.body && document.body.scrollLeft) this.scrollx = document.body.scrollLeft;
		else if (window.scrollX) this.scrollx = window.scrollX;
		else this.scrollx = 0;

		if (document.documentElement && document.documentElement.scrollTop) this.scrolly = document.documentElement.scrollTop;
		else if (document.body && document.body.scrollTop) this.scrolly = document.body.scrollTop;
		else if (window.scrollY) this.scrolly = window.scrollY;
		else this.scrolly = 0;
		
		if (document.documentElement && document.documentElement.clientWidth) this.width = document.documentElement.clientWidth;
		else if (document.body && document.body.clientWidth) this.width = document.body.clientWidth;
		else if (window.innerWidth) this.width = window.innerWidth;
		else this.width = 0;

		if (document.documentElement && document.documentElement.clientHeight) this.height = document.documentElement.clientHeight;
		else if (document.body && document.body.clientHeight) this.height = document.body.clientHeight;
		else if (window.innerHeight) this.height = window.innerHeight;
		else this.height = 0;
		
		this.w = this.width + this.scrollx;
		this.h = this.height + this.scrolly;
	}
}


// event listener
var listener = {
	// attach event to an element
	add: function(obj, et, fn, capture)
	{
		if (obj.addEventListener) { obj.addEventListener(et, fn, capture); return true; }
		else if (obj.attachEvent) { var ae = obj.attachEvent('on' + et, fn); return ae; }
	},
	// detach event from an element
	remove: function(obj, et, fn, capture)
	{
		if (obj.removeEventListener) { obj.removeEventListener(et, fn, capture); return true; }
		else if (obj.detachEvent) { var re = obj.detachEvent('on' + et, fn); return re; }
	}
}


// browser check variable
var bw = new lib.browsercheck();