function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
	
//	uaLow = ua.toLowerString();
	if(ua.indexOf("Mac") >= 0) {
		window.location = "macie.shtml";	
	}
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

var a = null;
var b = null;
var c = null;
var d = null;
var e = null;
var slider1 = null;
var slider2 = null;
var slider3 = null;
var slider4 = null;
var slider5 = null;

function init(newsNum) {
	slider1 = document.getElementById("m1");
	slider2 = document.getElementById("m2");
	slider3 = document.getElementById("m3");
	slider4 = document.getElementById("m4");
	slider5 = document.getElementById("m5");
}

//ANIMATION FUNCTIONS
///////////////////////////////////////////////////////

// SubMenu 1
function slideDownM1() {
	if (a != null) {
		a.stop();
		a = null;
	}

	a = new Accelimation(slider1.style, "height", 26, 300, .8, "px");
	a.onend = onM1End;
	a.onframe = slideM1;
	a.start();
}

function slideUpM1() {
	if (a != null) {
		a.stop();
		a = null;
	}

	a = new Accelimation(slider1.style, "height", 180, 400, .8, "px");
	a.onend = onM1End;
	a.onframe = slideM1;
	a.start();
}

function onM1End() {
	a.stop();
	a = null;
}

function slideM1(y) {
	slider1.style.height = y + "px"; 
}

// SubMenu 2
function slideDownM2() {
	if (b != null) {
		b.stop();
		b = null;
	}

	b = new Accelimation(slider2.style, "height", 26, 300, .8, "px");
	b.onend = onM2End;
	b.onframe = slideM2;
	b.start();
}

function slideUpM2() {
	if (b != null) {
		b.stop();
		b = null;
	}

	b = new Accelimation(slider2.style, "height", 194, 400, .8, "px");
	b.onend = onM2End;
	b.onframe = slideM2;
	b.start();
}

function onM2End() {
	b.stop();
	b = null;
}

function slideM2(y) {
	slider2.style.height = y + "px"; 
}

// SubMenu 3
function slideDownM3() {
	if (c != null) {
		c.stop();
		c = null;
	}

	c = new Accelimation(slider3.style, "height", 26, 300, .8, "px");
	c.onend = onM3End;
	c.onframe = slideM3;
	c.start();
}

function slideUpM3() {
	if (c != null) {
		c.stop();
		c = null;
	}

	c = new Accelimation(slider3.style, "height", 102, 400, .8, "px");
	c.onend = onM3End;
	c.onframe = slideM3;
	c.start();
}

function onM3End() {
	c.stop();
	c = null;
}

function slideM3(y) {
	slider3.style.height = y + "px"; 
}

// SubMenu 4
function slideDownM4() {
	if (d != null) {
		d.stop();
		d = null;
	}

	d = new Accelimation(slider4.style, "height", 26, 300, .8, "px");
	d.onend = onM4End;
	d.onframe = slideM4;
	d.start();
}

function slideUpM4() {
	if (d != null) {
		d.stop();
		d = null;
	}

	d = new Accelimation(slider4.style, "height", 154, 400, .8, "px");
	d.onend = onM4End;
	d.onframe = slideM4;
	d.start();
}

function onM4End() {
	d.stop();
	d = null;
}

function slideM4(y) {
	slider4.style.height = y + "px"; 
}

// SubMenu 5
function slideDownM5() {
	if (e != null) {
		e.stop();
		e = null;
	}

	e = new Accelimation(slider5.style, "height", 26, 300, .8, "px");
	e.onend = onM5End;
	e.onframe = slideM5;
	e.start();
}


function slideUpM5() {
	if (e != null) {
		e.stop();
		e = null;
	}

	e = new Accelimation(slider5.style, "height", 128, 400, .8, "px");
	e.onend = onM5End;
	e.onframe = slideM5;
	e.start();
}

function onM5End() {
	e.stop();
	e = null;
}

function slideM5(y) {
	slider5.style.height = y + "px"; 
}