// -------------------------------------------
// fancy dialog borders
// -------------------------------------------
// ****************************************************************************
// *                                                                          *
// *                           Copyright 2000                                 *
// *                       CHECCO COMPUTER SERVICES                           *
// *                         All Rights Reserved.                             *
// *                                                                          *
// *     This software contains proprietary and confidential information      *
// *     belonging to CHECCO COMPUTER SERVICES, and may not be decompiled,    *
// *     disassembled, disclosed, reproduced or copied without the prior      *
// *     written consent of CHECCO COMPUTER SERVICES.                         *
// *                                                                          *
// ****************************************************************************

var treeImgBase = "./default/";

function initTreeSupport(basePath,baseStyle) {
	if ( !basePath ) basePath = ".";
	if ( !baseStyle ) baseStyle = "default";
	// document.writeln("<link href=\""+basePath+"/treeSupport/treeSupport.css\" type=\"text/css\" rel=\"stylesheet\" />");
	// document.writeln("<link href=\""+basePath+"/treeSupport/"+baseStyle+"/treeStyle.css\" type=\"text/css\" rel=\"stylesheet\" />");
	treeImgBase = basePath+"/treeSupport/"+baseStyle+"/";
}

function expandDiv(id) 
	{
		var tl = document.getElementById("toggle_"+id);
		if ( tl ) 
		{
			tl.src = treeImgBase+"collapse_icon.gif";
		}
		setVisible(id);
	}

function collapseDiv(id) 
	{
		var tl = document.getElementById("toggle_"+id);
		if ( tl ) 
		{
			tl.src = treeImgBase+"expand_icon.gif";
		}
		setHidden(id);
	}

function toggleDiv(id) 
	{
		var isVisible = getVisibility(id);
		if ( isVisible == false ) 
		{
			expandDiv(id);
		}
		else if ( isVisible == true ) 
		{
			collapseDiv(id);
		}
		//else alert('[toggleTree] div['+id+'] NOT FOUND');
	}

function createToggle(id,initialView)
	{
		document.write("<a href=\"javascript: toggleDiv('"+id+"')\" border=0>"
			+ "<img id=\"toggle_"+id+"\" src=\""+treeImgBase+"collapse_icon.gif\" border=0>"
			+ "</a>&nbsp;");
		if ( initialView ) {
			window.setTimeout("expandDiv('"+id+"')",0);
		}
		else {
			window.setTimeout("collapseDiv('"+id+"')",0);
		}
	}

// -----------------------------
