// You can find general instructions for this file here:// http://www.treeview.net// Intructions on how to add checkboxes to a tree are only provided in this file.USETEXTLINKS = 0  STARTALLOPEN = 0HIGHLIGHT = 0PERSERVESTATE = 0USEICONS = 0// In this case we want the whole tree to be built,// even those branches that are closed. The reason is that// otherwise some form elements might not be built at all// before the user presses "Get Values"BUILDALL = 1// This configuration file is used to demontrate how to add checkboxes to your tree.// If your site will not display checkboxes, picka a different configuration file as // the example to follow and adapt// Notes:// If you are going to set USEICONS = 1, then you will want to edit the gif files and // remove the white space on the right// Auxiliary functions for the contruction of the tree// You will mcertainly want to change these functions for your own purposes// If you want to add checkboxes to the folder you will have to create a function // similar to this one to do that and call it below in the tree construction section// These functions are directly realted with the additional JavaScript in the // page holding the tree (demoCheckbox.html), where the form handling code// residesfunction generateCheckBox(parentfolderObject, itemLabel, checkBoxDOMId) {	var newObj;	// Read the online documentation for an explanation of insDoc and gLnk,    // they are the base of the simplest Treeview trees	newObj = insDoc(parentfolderObject, gLnk("R", itemLabel, "javascript:parent.op()"))    // The trick to show checkboxes in a tree that was made to display links is to 	// use the prependHTML. There are general instructions about this member    // in the online documentation	newObj.prependHTML = "<td valign=middle><input type=checkbox name="+checkBoxDOMId+" id="+checkBoxDOMId+"></td>"}// Function similar to the above, but instead of creating checkboxes, it creates// radio buttonsfunction generateRadioB(parentfolderObject, itemLabel, checkBoxDOMId) {	var newObj;	// Read the online documentation for an explanation of insDoc and gLnk,    // they are the base of the simplest Treeview trees	newObj = insDoc(parentfolderObject, gLnk("R", "", "javascript:parent.op()"))    // The trick to show checkboxes in a tree that was made to display links is to 	// use the prependHTML. There are general instructions about this member    // in the online documentation	newObj.prependHTML = "<td valign=middle><textarea cols=28 rows=6 name="+itemLabel+"></textarea></td>"}//<input name="postcode" type="text" id="postcode" size="10">//function generateRadioB(parentfolderObject, itemLabel, checkBoxDOMId) {//	var newObj;////	// Read the online documentation for an explanation of insDoc and gLnk,//    // they are the base of the simplest Treeview trees//	newObj = insDoc(parentfolderObject, gLnk("R", itemLabel, "javascript:parent.op()"))////    // The trick to show checkboxes in a tree that was made to display links is to //	// use the prependHTML. There are general instructions about this member//    // in the online documentation//	newObj.prependHTML = "<td valign=middle><input type=radio name=hourPick id="+checkBoxDOMId+"></td>"//}// Construction of the treefoldersTree = gFld("", "")foldersTree.treeID = "checkboxTree"aux1 = insFld(foldersTree, gFld("Magazine", "javascript:parent.op()"))	generateCheckBox(aux1, "Evo", "BOX1")generateCheckBox(aux1, "Autocar", "BOX2")generateCheckBox(aux1, "Auto Express", "BOX3")generateCheckBox(aux1, "CAR", "BOX4")generateCheckBox(aux1, "Top Gear", "BOX5")generateCheckBox(aux1, "Autosport", "BOX6")generateCheckBox(aux1, "F1 Racing", "BOX7")generateCheckBox(aux1, "Circuit Driver", "BOX8")generateCheckBox(aux1, "Track and Race", "BOX9")generateCheckBox(aux1, "Totalkitcar", "BOX10")generateCheckBox(aux1, "Kit Car", "BOX11")generateCheckBox(aux1, "Which Kit Car", "BOX12")generateCheckBox(aux1, "Motorsport News", "BOX13")aux2 = insFld(foldersTree, gFld("Newspaper", "javascript:parent.op()"))generateCheckBox(aux2, "Times", "BOX1-1")generateCheckBox(aux2, "Telegraph", "BOX1-2")generateCheckBox(aux2, "Daily Mail", "BOX1-3")generateCheckBox(aux2, "Guardian", "BOX1-4")generateCheckBox(aux2, "Independent", "BOX1-5")generateCheckBox(aux2, "Other National Newspaper", "BOX1-6")generateCheckBox(aux2, "Local Newspaper", "BOX1-7")aux3 = insFld(foldersTree, gFld("TV", "javascript:parent.op()"))generateCheckBox(aux3, "Top Gear", "BOX2-1")generateCheckBox(aux3, "Fifth Gear", "BOX2-2")generateCheckBox(aux3, "Men and Motors", "BOX2-3")generateCheckBox(aux3, "News programme", "BOX2-4")aux4 = insFld(foldersTree, gFld("Online", "javascript:parent.op()"))generateCheckBox(aux4, "Google", "BOX3-1")generateCheckBox(aux4, "Other search engine", "BOX3-2")generateCheckBox(aux4, "Lotus 7 owners club site", "BOX3-3")generateCheckBox(aux4, "Pistonheads", "BOX3-4")generateCheckBox(aux4, "Autotrader", "BOX3-5")generateCheckBox(aux4, "4Car", "BOX3-6")generateCheckBox(aux4, "Banner advertisement", "BOX3-7")generateCheckBox(aux4, "Other car website", "BOX3-8")generateCheckBox(aux4, "Other", "BOX3-9")aux5 = insFld(foldersTree, gFld("Email", "javascript:parent.op()"))generateCheckBox(aux5, "From Caterham Cars", "BOX4-1")generateCheckBox(aux5, "Other email", "BOX4-2")aux6 = insFld(foldersTree, gFld("Driving Experience Day", "javascript:parent.op()"))generateCheckBox(aux6, "Caterham Motorsport Club event", "BOX5-1")generateCheckBox(aux6, "Caterham Cars Hire day", "BOX5-2")generateCheckBox(aux6, "Other car hire company", "BOX5-3")generateCheckBox(aux6, "Bedford Autodrome event", "BOX5-4")generateCheckBox(aux6, "Brands Hatch event", "BOX5-5")generateCheckBox(aux6, "Silverstone event", "BOX5-6")generateCheckBox(aux6, "Other circuit experience day", "BOX5-7")generateCheckBox(aux6, "RMA trackday", "BOX5-8")generateCheckBox(aux6, "Bookatrack trackday", "BOX5-9")generateCheckBox(aux6, "Easytrack trackday", "BOX5-10")generateCheckBox(aux6, "Other trackday company", "BOX5-11")aux7 = insFld(foldersTree, gFld("Show/Event", "javascript:parent.op()"))generateCheckBox(aux7, "Caterham race series", "BOX6-1")generateCheckBox(aux7, "Owners club event", "BOX6-2")generateCheckBox(aux7, "Other race or event", "BOX6-3")generateCheckBox(aux7, "London Motorshow", "BOX6-4")generateCheckBox(aux7, "Autosport International", "BOX6-5")generateCheckBox(aux7, "Goodwood Festival of Speed", "BOX6-6")generateCheckBox(aux7, "Stoneleigh Kit Car show", "BOX6-7")generateCheckBox(aux7, "Totalkitcar LIVE", "BOX6-8")generateCheckBox(aux7, "Other show", "BOX6-9")aux8 = insFld(foldersTree, gFld("Other", "javascript:parent.op()"))generateRadioB(aux8, "other", "RD1")//generateRadioB(aux2, "2PM", "RD2")//generateRadioB(aux2, "6PM", "RD3")
