function openRules(rulesDoc){
	window.open(rulesDoc,'','width=600,height=650,resizable=yes');
}

var node1Code0 = "<img src='email.jpg' width='16' height='11' border='0' style='margin-right:3px'><a class='treeNode1 commonLink' href='mailto:";
var node1Code1 = "@mailhec.net?subject=MBAT Sport'>"
var node1Code1staff = "@hec.fr?subject=MBAT Sport'>"
var node1Code2 = "</a>";
var node2Code0 = "<img src='word.jpg' width='16' height='14'  border='0' style='margin-right:3px'><a class='treeNode1 commonLink' href='javascript:openExternal(\"rulesDocs/";
var node2Code1 = "\")'>Rules</a>";
var node3Code0 = "<img src='excel.jpg' width='16' height='14' border='0' style='margin-right:3px'><a class='treeNode1 commonLink' href='javascript:openExternal(\"schedules/";
var node3Code1 = "\")'>Schedule</a>";


// Part 1 - Tree nodes definition
var TREE2_NODES = [
    ['Swimming',null, null,
		[node1Code0+'angeline.griesgraber-johnson'+node1Code1+'Angeline Griesgraber-Johnson'+node1Code2, null, null],
    	[node2Code0+'swimming.doc'+node2Code1, null, null],
		[node3Code0+'swimming.xls'+node3Code1, null, null]
	],
	['Sailing',null, null,
		[node1Code0+'benjamin.smith'+node1Code1+'Benjamin Smith'+node1Code2, null, null],
    	[node2Code0+'sailing.doc'+node2Code1, null, null],
		[node3Code0+'sailing.xls'+node3Code1, null, null]
	],
	['Squash',null, null,
		[node1Code0+'patrick.raimondi'+node1Code1+'Patrick Raimondi'+node1Code2, null, null],
    	[node2Code0+'squash.doc'+node2Code1, null, null],
		[node3Code0+'squash.xls'+node3Code1, null, null]
	],
	['Mountain Biking',null, null,
		[node1Code0+'alexander.aitken'+node1Code1+'Alexander Aitken'+node1Code2, null, null],
    	[node2Code0+'mountainBiking.doc'+node2Code1, null, null],
		[node3Code0+'mountainBiking.xls'+node3Code1, null, null]
	],
	['Climbing',null, null,
		[node1Code0+'saad.khan'+node1Code1+'Saad Khan'+node1Code2, null, null],
    	[node2Code0+'climbing.doc'+node2Code1, null, null],
		[node3Code0+'climbing.xls'+node3Code1, null, null]
	],
	['Rowing',null, null,
		[node1Code0+'yoann.leonard'+node1Code1+'Yoann Leonard'+node1Code2, null, null],
    	[node2Code0+'rowing.doc'+node2Code1, null, null],
		[node3Code0+'rowing.xls'+node3Code1, null, null]
	],
	['Petanque',null, null,
		[node1Code0+'guillaume.trepo'+node1Code1+'Guillaume Trepo'+node1Code2, null, null],
    	[node2Code0+'petanque.doc'+node2Code1, null, null],
		[node3Code0+'petanque.xls'+node3Code1, null, null]
	],
	['Handball',null, null,
		[node1Code0+'broussin'+node1Code1staff+'Melissa Broussin'+node1Code2, null, null],
    	[node2Code0+'handball.doc'+node2Code1, null, null],
		[node3Code0+'handball.xls'+node3Code1, null, null]
	],
	['Tug-of-War',null, null,
		[node1Code0+'guido.lang'+node1Code1+'Guido Lang'+node1Code2, null, null],
    	[node2Code0+'tugOfWar.doc'+node2Code1, null, null],
		[node3Code0+'tugOfWar.xls'+node3Code1, null, null]
	],
	['Chess',null, null,
		[node1Code0+'georg.adelberger'+node1Code1+'Georg Adelberger'+node1Code2, null, null],
    	[node2Code0+'chess.doc'+node2Code1, null, null],
		["<img src='word.jpg' width='16' height='14' border='0' style='margin-right:3px'><a class='treeNode1 commonLink' href='javascript:openExternal(\"schedules/"+'chess.doc'+node3Code1, null, null]
	],
	['Rollerblading',null, null,
		[node1Code0+'nicolas.abadjian'+node1Code1+'Nicolas Abadjian'+node1Code2, null, null],
    	[node2Code0+'rollerblading.doc'+node2Code1, null, null],
		[node3Code0+'rollerblading.xls'+node3Code1, null, null]
	],
	['Cricket',null, null,
		[node1Code0+'victor.ochaney'+node1Code1+'Victor Ochaney'+node1Code2, null, null],
    	[node2Code0+'cricket.doc'+node2Code1, null, null],
		[node3Code0+'cricket.xls'+node3Code1, null, null]
	],
	['Babyfoot',null, null,
		[node1Code0+'parminder.athwal'+node1Code1+'Parminder Athwal'+node1Code2, null, null],
    	[node2Code0+'babyFoot.doc'+node2Code1, null, null],
		[node3Code0+'babyfoot.xls'+node3Code1, null, null]
	],
];

// Part 2 - Tree format
var TREE2_FORMAT = [
    10,                        //  0. x coordinate
    10,                        //  1. y coordinate
    false,                      //  2. button images flag
    [                          //  3. button images:
        "/mbat/2006/_system/graphics/tree/fc.gif",           //     collapsed,
        "/mbat/2006/_system/graphics/tree/fe.gif",           //     expanded,
        "/mbat/2006/_system/graphics/tree/fd.gif"            //     blank
    ],
    [ 16, 16, 0],              //  4. button images size:
                               //     width, height, and
                               //     indentation for
                               //     childless nodes
    true,                      //  5. folder images flag
    [                          //  6. folder images:
        "/mbat/2006/_system/graphics/tree/iconClosed.gif",          //     closed,
        "/mbat/2006/_system/graphics/tree/iconOpen.gif",          //     opened,
       	"/mbat/2006/_system/graphics/tree/b.gif"            //     document
    ],
    [ 14, 14],                 //  7. folder images size:
                               //     width, height
    [ 0, 1, 32 ],             //  8. indentation for each
                               //     level
    "white",                   //  9. background color for
                               //     the whole tree
    "treeNode",                 // 10. default CSS class for
                               //     nodes
    [ "treeNode", "treeNode" ],          // 11. CSS classes for each
                               //     level
    false,                     // 12. single branch mode flag
    [ 0, 1 ],                  // 13. item padding and
                               //     spacing
// ---- additional formatting options ----
    false,                      // 14. explorer-like mode flag
    [                          // 15. images for
                               //     explorer-like mode:
        "img/folder.gif",      // folder,
        "img/folderopen.gif",  // opened folder,
        "img/page.gif",        // page,
        "img/minus.gif",       // button in opened state,
        "img/minusbottom.gif", // same without bottom line,
        "img/plus.gif",        // button in closed state,
        "img/plusbottom.gif",  // same without bottom line,
        "img/line.gif",        // vertical line,
        "img/join.gif",        // three-way join,
        "img/joinbottom.gif"   // two-way join
    ],
    [ 19, 16 ],                // 16. images' size for
                               //     explorer-like mode
    false,                     // 17. state saving feature
                               //     flag
    true,                      // 18. relative positioning
                               //     flag
    [ 0, 0 ],              // 19. initial width and
                               //     height for relative
                               //     positioning mode - NO EFFECT IF NEXT OPTION IS TRUE
    true,                     // 20. resizable background
                               //     for relative
                               //     positioning mode
    false,                      // 21. selected node
                               //     highlighting mode flag
    [                          // 22. attributes for selected
                               //     node:
        "white",               //     background color for
                               //     unselected nodes,
        "white",             //     same for selected node,
        "treeNode",         //     CSS class(es) for
                               //     selected node(es),
        "treeNodeExpanded"          //     optional CSS class(es)
                               //     for expanded node(es)
    ],
    0,                       // 23. text wrapping margin
                               //     ("0" means "do not
                               //     wrap")
    "top"                      // 24. vertical alignment for
                               //     buttons and icons
                               //     (applies to trees with
                               //     non-zero text wrapping
                               //     and explorer-like mode
                               //     set to false
];
