var tree;

function onNodeClick()
{
	var node = tree.getSelectedNode();
	
	if(node.name == "pinEdit") {
	  window.open("http://pinedit.pintexx.com");
	} else if(node.name == "Text Quality Solutions") {
	  window.open("http://cw.pintexx.com");
	} else {
	  parent.document.getElementById("main").src = node.action;
	}
}

function configTree()
{
	var red = "rgb(176,8,95)";
	var highlight = "black";
	var web       = "";

	tree                 = new Tree();
	tree.target          = "frMain";
	tree.backcolor       = "#F2F2F2";
	//tree.background      = "images/background.jpg";
	tree.selectfontcolor = red; //"rgb(176,8,95)";
	tree.highlight       = true;
	tree.font            = "Verdana, Arial, Helvetica, sans-serif"
	tree.fontsize        = "11px";
	tree.folderIcon      = "images/closed.gif";
	tree.openFolderIcon  = "images/opened.gif";
	tree.isFolderOpenedWhenTextClicked = true;
	tree.setIconsBlank();
	tree.onNodeClick = "onNodeClick()";
	tree.marginTop   = "40px";

	tree.add(new Node("Home",web + "application/start.html"));
	tree.add(new Node("News",web + "application/news.html"));
	tree.add(new Node("Testimonials",web + "application/products/testimonials.html"));
	tree.add(new Node("<span style='font-weight:bold;color:orange'>Download</span>",web + "server/download/download.aspx"));

	var node1 = new Node("Products");
	node1.fontbold = true;
	node1.fontcolor = highlight;
	tree.add(node1);
	node1.expanded = true;

	var node2 = new Node("Applications");
	//node2.fontbold = true;
	node2.fontcolor = highlight;
	node1.add(node2);
	node2.expanded = true;
	node2.add(new Node("exxDoc",web + "application/applications/exxdoc/features.html"));

	var node3 = new Node("Components");
	//node3.fontbold = true;
	node3.fontcolor = highlight;
	node1.add(node3);
	node3.expanded = true;


	node3.add(new Node("pinEdit documentation",web + "pinedit/doc/docs.html"));

	var node8 = new Node("pinEdit Web");
	node3.add(node8);
	node8.add(new Node("pinEdit ASP.Net",web + "application/technologies/asp.net/features.html"));
	node8.add(new Node("pinEdit PHP",web + "application/technologies/php/features.html"));
	node8.add(new Node("pinEdit Java",web + "application/technologies/jsp/features.html"));
	node8.add(new Node("pinEdit ASP Classic",web + "application/technologies/asp/features.html"));

	var node8 = new Node("pinEdit Desktop");
	node3.add(node8);
	node8.add(new Node("pinEdit .Net",web + "application/technologies/winform/features.html"));
	node8.add(new Node("pinEdit ActiveX",web + "application/technologies/activex/features.html"));

/*
	var node8 = new Node("pinEdit Add-in");
	node3.add(node8);
	node8.add(new Node("pinEditSpell",web + "application/pinEditaddon/spell/features.html"));
	node8.add(new Node("pinEditPDF",web + "application/pinEditaddon/pdf/features.html"));
	node8.add(new Node("pinEditStyle",web + "application/pinEditaddon/style/features.html"));
*/

	var node8 = new Node("HTML2PDF converter");
	node3.add(node8);
	node8.add(new Node("pinPDF",web + "application/commoncomponents/pinPDF/features.html"));
//	node8.add(new Node("pinDocX",web + "application/commoncomponents/pinDocX/features.html"));
//	node8.add(new Node("pinStyle",web + "application/commoncomponents/pinStyle/features.html"));
//	node8.add(new Node("pinUpload",web + "application/commoncomponents/pinUpload/features.html"));

/*
	var node2 = new Node("Solutions");
	//node2.fontbold = true;
	node2.fontcolor = highlight;
	node1.add(node2);
	node2.expanded = true;
	node2.add(new Node("Text Quality Solutions"));
*/

	var node40 = new Node("<span style='font-weight:bold;'>Consulting Services</span>");
	//node40.expanded = true;
	tree.add(node40);
	node40.add(new Node("Description",web + "application/services/features.html"));
	node40.add(new Node("Customers projects",web + "application/services/projects.html"));


	var node40 = new Node("<span style='font-weight:bold;'>Purchase</span>");
	//node40.expanded = true;
	tree.add(node40);
	node40.add(new Node("Licensing table",web + "application/products/license.html"));
	node40.add(new Node("Order page",web + "application/products/order.html"));
	node40.add(new Node("Online shop","http://www.componentsource.com/Browse.asp?SC=EPINT&G=5&GroupCode=PINTEX"));
	node40.add(new Node("Updates",web + "application/products/updates.html"));
	node40.add(new Node("Licensing options",web + "application/products/licensing.html"));
//	node40.add(new Node("Reseller",web + "application/partner/reseller.html"));


	var node4 = new Node("<span style='font-weight:bold;'>Support</span>");
	//node4.expanded = true;
	tree.add(node4);
	node4.add(new Node("Support",web + "application/products/support.html"));
	node4.add(new Node("Forum/Knowledgebase",web + "application/products/forum.html"));
	node4.add(new Node("Fix/Update",web + "application/products/fix/fix.html"));
	node4.add(new Node("Services",web + "application/services/features.html"));
	node4.add(new Node("User notification",web + "server/user/userstatus.aspx"));



	var node1 = new Node("Corporate");
	node1.fontbold = true;
	node1.fontcolor = highlight;
	//node1.expanded = true;
	tree.add(node1);
	node1.add(new Node("About Pintexx",web + "application/company/about.html"));
	node1.add(new Node("Contact",web + "application/company/contact.html"));
	node1.add(new Node("Selected customers",web + "application/spotlight.html"));
	node1.add(new Node("Alliance partners",web + "application/partner/alliance.html"));

	tree.add(new Node("Impressum",web + "application/company/impressum.html"));


	tree.draw();

}