



function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;

	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}










function year_onmouseover(year,parent)
{

	var obj = getElementsByClass('menu_month',null,'div');
	for(i=0;i<obj.length;i++){
		obj[i].style.display = 'none';
    }
document.getElementById(year).style.display='block';

    var clicked_obj=parent;

	var obj = getElementsByClass('menu_year_item',null,'a');
	for(i=0;i<obj.length;i++){
		obj[i].style.color='#8f0074';
 var sp = obj[i].getElementsByTagName('span');
sp[0].style.display='none';
    }
clicked_obj.style.color='#000000';
var sp = clicked_obj.getElementsByTagName('span');
sp[0].style.display='inline';


}









/***************************/
//@Author: Adrian "yEnS" Mato Gondelle
//@website: www.yensdesign.com
//@email: yensamg@gmail.com
//@license: Feel free to use it, but keep this credits please!
/***************************/

//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;

//loading popup with jQuery magic!
function loadPopup(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#login_form").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopup(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#login_form").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopup(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#login_form").height();
	var popupWidth = $("#login_form").width();
	//centering
	$("#login_form").css({
		"position": "fixed",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6

	$("#backgroundPopup").css({
		"height": windowHeight
	});

}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){

	//LOADING POPUP
	//Click the button event!
	$("#button").click(function(){
		//centering with css
		centerPopup();
		//load popup
		loadPopup();
	});

	//CLOSING POPUP
	//Click the x event!
	$("#login_formClose").click(function(){
		disablePopup();
	});
	//Click out event!
	$("#backgroundPopup").click(function(){
		disablePopup();
	});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup();
		}
	});

});
//______________________________________________________________________________________________________________

function ChangeImg (tagDOM)
{

curImg = tagDOM.src;

if ( curImg.substring(curImg.length-3,curImg.length) = '_bl'    )
{
tagDOM.src = curImg.substring(0,curImg.length-3);
}
else
{
tagDOM.src = curImg+"_bl";
}






}
