function MakeArray(n) {
                this.length = n
                for (var i = 1; i<=n; i++) {
                        this[i] = new Image()
                        }
                return this
        }

function SelectItem(num) {
		clearInterval(timeoutID);
		if (num<6) {eval("document.MENU"+num+".src=icon_on["+num+"].src");}
		eval("document.TABLO.src=tablo["+num+"].src");
}

function UnSelectItem(num, t) {
		eval("tbl.src = 'images/"+ t+ ".gif'");
		if (num<6) {eval("document.MENU"+num+".src=icon_off["+num+"].src");}
		timeoutID=setInterval('eval("document.TABLO.src=tbl.src")', timeout);
}
 
function new_win(src,w,h,st){
		if ((typeof w1=='object') && (!w1.closed)){
			w1.close();
			w1=window.open(src,'new_window','resizable=no,menubar=no,status='+st+',scrollbars=no,width='+w+',height='+h);}
		else {w1=window.open(src,'new_window','resizable=no,menubar=no,status='+st+',scrollbars=no,width='+w+',height='+h);}
}

function new_win_forPrint(src,w,h,st){
		if ((typeof w1=='object') && (!w1.closed)){
			w1.close();
			w1=window.open(src,'new_window','resizable=no,menubar=no,status='+st+',scrollbars=yes,width='+w+',height='+h);}
		else {w1=window.open(src,'new_window','resizable=no,menubar=no,status='+st+',scrollbars=yes,width='+w+',height='+h);}
}

function cls_win(){
		if ((typeof w1=='object') && (!w1.closed)){	w1.close();}
}



//FUNCTION TREE BEGINING

var curSelection = null;
 
function setStyle(src, toClass) 
{
// Format the element to the specified class.
	if (null != src) 
		src.className = toClass;
}
 
function mouseEnters() 
{  
// Be sure the element is not the current selection and that it is
// an anchor.
	if ((curSelection != event.toElement) &&
		("A" == event.toElement.tagName))
		{
			if ("real" == event.toElement.parentElement.className)
				setStyle(event.toElement,"over")
			else
				setStyle(event.toElement,"over")
		}
}

function mouseLeaves() 
{
// Again, be sure the element is not the current selection and that it
// is an anchor.
	if ((curSelection != event.fromElement) &&
		("A" == event.fromElement.tagName))
		{
			if ("real" == event.fromElement.parentElement.className)
				setStyle(event.fromElement,"")
			else
				setStyle(event.fromElement,"")
		}
}

function outliner(){
 var child = null, el = null; cur = null; elevent = null;
 /* Assumes that the DIV containing the Child
  elements immediately follows the heading anchor. */
 elevent = event.srcElement 
 cur = elevent.style.cursor
 elevent.style.cursor = "wait" 
 switch (event.srcElement.tagName) 
 {
	case "A": 
		el = event.srcElement.parentElement
        child = document.all[event.srcElement.sourceIndex+1];
    break;
    case "LI":
		el = event.srcElement 
        child = document.all[event.srcElement.sourceIndex+2];
    break;
 }
 /* Be sure the Child element exists and that it is the child LI. */
 if ((null != child) && ("UL" == child.tagName) &&
	("LI" == child.parentElement.tagName)) 
 {
	switch (child.className) 
	{
		case "":
			// Collapse the item.
			child.className = "expanded";
			switch (el.className) 
			{
				case "term":
					break;
				case "real":
					el.className = "realopen";
					break;
				default :
					el.className = "open";
					break;
			}
			break;
		case "term":
			child.className = "termexpanded";
			if ("term" == el.className)
			{}
			else 
				el.className = "open";
		    break;
		case "termexpanded":
		    child.className = "term";
		    if ("term" == el.className)
				{}
			else  
				el.className = "closed";
			break;
		case "real":
			child.className = "realexpanded";
			if ("term" == el.className)
				{}
			else  
				el.className = "realopen";
		    break;
		case "realexpanded":
		    child.className = "real";
		    if ("term" == el.className)
				{}
			else  
				el.className = "closed";
			break;
		default :
			child.className = "";
			switch (el.className) 
			{
				case "term":
					break;
				case "realopen":
					el.className = "real";
					break;
				default :
					el.className = "closed";
					break;
			}
			break;
	}

 }
 if ("A" == event.srcElement.tagName) 
 {
	if (null != curSelection)
		setStyle(curSelection, "");
    // Save and highlight new selection.
    curSelection = event.srcElement;
    setStyle(curSelection, "select");
 }
 elevent.style.cursor = cur 

}
//FUNCTION TREE END