function toogleClassName(el){
	//alert(el);
	closeAllByClassName('show');
	if($(el)) $(el).className=( ($(el).className=='show') ? 'hidden':'show' );
	return false;
}

function toogleRef(event){
	Event.stop(event);
	tel = Event.element(event).parentNode.id;
	toogleClassName('div'+tel);
}
function observeRef(){
	var as,i;
	as=document.getElementsByTagName('a');
 	for(i in as){
  		if(as[i].className && as[i].className=="ref"){
  			Event.observe(as[i].id,'mouseover',toogleRef,0.5);
  		//	Event.observe(as[i].id,'mouseout',toogleRef,0.5);
  		}
 	}
}

function closeAllByClassName(cname){
	
	if ( document.all) {
		tempColl = document.all.tags( "div");
		for (i=0; i<tempColl.length; i++) {
			whichEl = tempColl(i);
			if (whichEl.className == cname){
				whichEl.className="hidden";
			}
		}
	} else {
		tempColl = document.getElementsByTagName( "div");
		for (i=0; i<tempColl.length; i++) {
			whichEl = tempColl[i];
			if (whichEl.className == cname) {
				whichEl.className="hidden";
			}
		}
	}
	
	return true;
}

Event.observe(window,'load',observeRef,false);
