
function toggle_player(id) {
	if ($('flashcontent_'+ id).hasClassName('active')) {
		alert(id + "has active");
		hide_player(id);
	} else {
		show_player(id);
	}
}


function show_player(id) {
	$$('.player').each(function(s) {
		if (s.hasClassName('active')) {
			s.removeClassName('active');
		}
	});
	$$('.flashcontent').each(function(s) {
		s.hide();
	});
	$('player_'+ id ).show();
	$('flashcontent_'+ id ).show();
	$('player_' + id ).addClassName('active');
}

function hide_player(id) {
	$('flashcontent_' + id ).hide();
	$('player_' + id).removeClassName('active');
}
if (window.attachEvent){
window.attachEvent('onload', function() {
	var m = getElementsByClassName('menu_content');
	for (var i = 0; i < m.length; i++) {
		m[i].parentNode.parentNode.onmouseover = function() {
			var el = m[i];
			return function() {
				el.style.display = 'block';
			}
		}();
		m[i].parentNode.parentNode.onmouseout = function() {
			var el = m[i];
			return function() {
				el.style.display = 'none';
			}
		}();
	}
});
}

function getElementsByClassName(class_name) {
	var all_obj,ret_obj=new Array(),j=0,teststr;

	if(document.all)all_obj=document.all;
	else if(document.getElementsByTagName && !document.all)
	all_obj=document.getElementsByTagName("*");

	for(i=0;i<all_obj.length;i++) {
		if(all_obj[i].className.indexOf(class_name)!=-1) {
			teststr=","+all_obj[i].className.split(" ").join(",")+",";
			if(teststr.indexOf(","+class_name+",")!=-1) {
				ret_obj[j]=all_obj[i];
				j++;
			}
		}
	}
	return ret_obj;
}
	
function help_text(e,text) {
//	alert(text);
	if (!e) e = window.event;
	var text_container = document.createElement("div");
    mousey = e.pageY ? e.pageY : e.clientY;// + body.scrollTop;
    mousex = e.pageX ? e.pageX : e.clientX;// + body.scrollLeft;
	text_container.style.position = "absolute";
	text_container.style.zIndex = 15;
	text_container.style.top = (mousey - 20) + "px";
	text_container.style.left= (mousex - 120) + "px";
	text_container.style.width = "200px";
	text_container.style.color = '#fff';
	text_container.style.padding = '5px';
	text_container.style.backgroundColor = '#99CC00';
	text_container.style.border = '1px solid #fff';
	text_container.id = "text_container";
	text_container.onmouseout = function() {
		document.getElementsByTagName("body")[0].removeChild(text_container);
	};
	text_container.innerHTML = text;
	document.getElementsByTagName("body")[0].appendChild(text_container);
}
