// JavaScript Document

var arLeft = new Image;
arLeft.src = "../_images/list/ic_folder_open.gif";

var arDown = new Image;
arDown.src = "../_images/list/ic_pages_open.gif";

var arAnim = new Image;
arAnim.src = "../_images/list/ic_folder_open.gif";

function clearList(num_) {
	if( document.getElementById ) {
		var theList = eval('displayList' + num_);
		for( var i =0; i < theList.length; ++i ) {
			document.images["dl_img_" + num_ + '_' + (i+1)].src = arLeft.src;			
		}
	}
}

function showListElement(num_,id_) {
	if( document.getElementById ) {
		//clearList(num_);
		var theList = eval('displayList' + num_);
		var myDis = document.getElementById(theList[ id_-1 ]).style.display;
		if(myDis == 'none') {
			document.getElementById( theList[ id_-1 ] ).style.display = 'block';
			document.images['dl_img_' + num_ + '_' + (id_)].src = arDown.src;
		}
		else {
			document.getElementById(theList[ id_-1 ]).style.display = 'none'
			document.images['dl_img_' + num_ + '_' + (id_)].src = arLeft.src;
		}
	}
}

function showList(num_) {
	if( document.getElementById ) {
		var theList = eval('displayList' + num_);
		for( var i =0; i < theList.length; ++i ) {
			document.images["dl_img_" + num_ + '_' + (i+1)].src = arDown.src;
			document.getElementById( theList[ i ] ).style.display = 'block';
		}
	}
}

function hideList(num_) {
	if( document.getElementById ) {
		var theList = eval('displayList' + num_);
		for( var i =0; i < theList.length; ++i ) {
			document.images["dl_img_" + num_ + '_' + (i+1)].src = arLeft.src;
			document.getElementById( theList[ i ] ).style.display = 'none';
		}
		document.images['dl_img_' + num_ + '_1'].src = arAnim.src;
	}
}

function listOver(num_,id_) {
	if( document.getElementById ) {
		var theList = eval('displayList' + num_);
		var myDis = document.getElementById(theList[ id_-1 ]).style.display;
		if(myDis == 'none') {
			document.images['dl_img_' + num_ + '_' + (id_)].src = arDown.src;
		}
		else {
			document.images['dl_img_' + num_ + '_' + (id_)].src = arLeft.src;
		}
	}
}

function listOut(num_,id_) {
	if( document.getElementById ) {
		var theList = eval('displayList' + num_);
		var myDis = document.getElementById(theList[ id_-1 ]).style.display;
		if(myDis == 'none') {
			document.images['dl_img_' + num_ + '_' + (id_)].src = arLeft.src;
		}
		else {
			document.images['dl_img_' + num_ + '_' + (id_)].src = arDown.src;
		}
	}
}