var states = new Array(0,0,0,0,0,0,0,0,0,0,0);
var gblSpeed = 300;
var subNavSpeedRatio = 100;
var slideshow = 0;
function init() {
	document.getElementById("ev_1").onmouseover = (drop_columnify_1);
	document.getElementById("ev_2").onmouseover = (drop_columnify_2);
	document.getElementById("ev_3").onmouseover = (drop_columnify_3);
	document.getElementById("ev_4").onmouseover = (drop_columnify_4);
	document.getElementById("ev_1").onmouseout = (lift_columnify_1);
	document.getElementById("ev_2").onmouseout = (lift_columnify_2);
	document.getElementById("ev_3").onmouseout = (lift_columnify_3);
	document.getElementById("ev_4").onmouseout = (lift_columnify_4);
	if (document.getElementById("SlideShow")) {
		slideshow = 1;
	}
}
function drop_columnify_1(evt) {
	dropper(evt, 1, gblSpeed, 1);
}
function drop_columnify_2(evt) {
	dropper(evt, 2, gblSpeed, 2);
	document.getElementById("ev_2_2").onmouseover = (drop_columnify_2_2);
	document.getElementById("ev_2_4").onmouseover = (drop_columnify_2_4);
	document.getElementById("ev_2_5").onmouseover = (drop_columnify_2_5);
	document.getElementById("ev_2_6").onmouseover = (drop_columnify_2_6);
	document.getElementById("ev_2_7").onmouseover = (drop_columnify_2_7);
	document.getElementById("ev_2_8").onmouseover = (drop_columnify_2_8);
	document.getElementById("ev_2_2").onmouseout = (lift_columnify_2_2);
	document.getElementById("ev_2_4").onmouseout = (lift_columnify_2_4);
	document.getElementById("ev_2_5").onmouseout = (lift_columnify_2_5);
	document.getElementById("ev_2_6").onmouseout = (lift_columnify_2_6);
	document.getElementById("ev_2_7").onmouseout = (lift_columnify_2_7);
	document.getElementById("ev_2_8").onmouseout = (lift_columnify_2_8);
	document.getElementById("ev_2_2sub").onmouseout = (lift_columnify_2_2);
	document.getElementById("ev_2_4sub").onmouseout = (lift_columnify_2_4);
	document.getElementById("ev_2_5sub").onmouseout = (lift_columnify_2_5);
	document.getElementById("ev_2_6sub").onmouseout = (lift_columnify_2_6);
	document.getElementById("ev_2_7sub").onmouseout = (lift_columnify_2_7);
	document.getElementById("ev_2_8sub").onmouseout = (lift_columnify_2_8);
	function drop_columnify_2_2(evt) {
		dropper(evt, "2_2", (gblSpeed / subNavSpeedRatio), 5);
	}
	function drop_columnify_2_4(evt) {
		dropper(evt, "2_4", (gblSpeed / subNavSpeedRatio), 6);
	}
	function drop_columnify_2_5(evt) {
		dropper(evt, "2_5", (gblSpeed / subNavSpeedRatio), 7);
	}
	function drop_columnify_2_6(evt) {
		dropper(evt, "2_6", (gblSpeed / subNavSpeedRatio), 8);
	}
	function drop_columnify_2_7(evt) {
		dropper(evt, "2_7", (gblSpeed / subNavSpeedRatio), 9);
	}
	function drop_columnify_2_8(evt) {
		dropper(evt, "2_8", (gblSpeed / subNavSpeedRatio), 10);
	}
	function lift_columnify_2_2(evt) {
		lifter(evt, "2_2", (gblSpeed / subNavSpeedRatio), 5);
	}
	function lift_columnify_2_4(evt) {
		lifter(evt, "2_4", (gblSpeed / subNavSpeedRatio), 6);
	}
	function lift_columnify_2_5(evt) {
		lifter(evt, "2_5", (gblSpeed / subNavSpeedRatio), 7);
	}
	function lift_columnify_2_6(evt) {
		lifter(evt, "2_6", (gblSpeed / subNavSpeedRatio), 8);
	}
	function lift_columnify_2_7(evt) {
		lifter(evt, "2_7", (gblSpeed / subNavSpeedRatio), 9);
	}
	function lift_columnify_2_8(evt) {
		lifter(evt, "2_8", (gblSpeed / subNavSpeedRatio), 10);
	}
}
function drop_columnify_3(evt) {
	dropper(evt, 3, gblSpeed, 3);
	document.getElementById("ev_3_3").onmouseover = (drop_columnify_3_3);
	document.getElementById("ev_3_3").onmouseout = (lift_columnify_3_3);
	document.getElementById("ev_3_3sub").onmouseout = (lift_columnify_3_3);
	function drop_columnify_3_3(evt) {
		dropper(evt, "3_3", (gblSpeed / subNavSpeedRatio), 11);
	}
	function lift_columnify_3_3(evt) {
		lifter(evt, "3_3", (gblSpeed / subNavSpeedRatio), 11);
	}
}
function drop_columnify_4(evt) {
	dropper(evt, 4, gblSpeed, 4);
}
function lift_columnify_1(evt) {
	lifter(evt, 1, gblSpeed, 1);
}
function lift_columnify_2(evt) {
	lifter(evt, 2, gblSpeed, 2);
}
function lift_columnify_3(evt) {
	lifter(evt, 3, gblSpeed, 3);
}
function lift_columnify_4(evt) {
	lifter(evt, 4, gblSpeed, 4);
}
function slideshow_appear(menu_id){
	if ((slideshow == 3) && (states[0] == 0) && (states[1] == 0) && (states[2] == 0) && (states[3] == 0)) {
		Effect.Fade("placeholder", {
			duration:0.001,
			queue: {
				position: 'end',
				scope: ('scope' + menu_id)
			},
			afterSetup: function(){
				Effect.Appear("SlideShow", {
					duration:0.001,
					queue: {
						position: 'end',
						scope: ('scope' + menu_id)
					}
				});
			}
		});
		slideshow = 1;
	}
}
function slideshow_remove(){
	if (slideshow == 1) {
		Effect.Fade("SlideShow", {
			duration:0.001,
			queue:'end'
		});
		slideshow = 3;
		Effect.Appear("placeholder", {
			duration:0.001,
			queue:'end'
		});
	}
}
function dropper(evt, col, speed, menu_id){
	evt = evt ? evt : window.event;
	var src = evt.relatedTarget ? evt.relatedTarget : evt.fromElement;
	if (src.nodeName == "A") 
		src = (src.parentNode);
	if (src.nodeName == "Ul") 
		src = (src.firstChild);
	var re = new RegExp(("ev_" + col), "g");
	var longString = src.id ? src.id : "arb";
	if (longString.match(re))
		return;
	var target_id = ("ev_" + col + "sub");
	states[menu_id] = 1;
	slideshow_remove();
	new Effect.BlindDown(target_id, {
		queue: {
			position: 'end',
			scope: ('scope' + menu_id)
		},
		fps:100,
		duration:(speed / 1000) });
}
function lifter(evt, col, speed, menu_id){
	evt = evt ? evt : window.event;
	var targ = evt.relatedTarget ? evt.relatedTarget : evt.toElement;
	if (targ.nodeName == "A") 
		targ = (targ.parentNode);
	if (targ.nodeName == "Ul") 
			targ = (targ.firstChild);
	var re = new RegExp(("ev_" + col), "g");
	var longString = targ.id ? targ.id : "arb";
	if (longString.match(re))
		return;
	var target_id = ("ev_" + col + "sub");
	new Effect.BlindUp(target_id, {
		queue: {
			position: 'end',
			scope: ('scope' + menu_id)
		},
		fps:100,
		duration:(speed / 500)
	});
	states[menu_id] = 0;
	slideshow_appear(menu_id);
}









