   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><span class=bodytext><B>restart</B></em>", 
                                        container: "restartbtn" }); 
        oButton.on("click", function () {
var confirmRestart = confirm("Are you sure you want to clear the calculator and start again?");
if(confirmRestart){houorg1tab(); parent.location="javascript:location.reload()"}
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><span class=bodytext><B>add vehicle</B></em>", 
                                        container: "addcar" }); 
        oButton.on("click", function () {
addvehicle()
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><span class=bodytext><B>factors</B></em>", 
                                        container: "research" }); 
        oButton.on("click", function () {
window.open("cncalcip.pdf", "paper", "width=975, height=700, left=100, top=20").focus();
        });
    } ();

   YAHOO.util.Event.onContentReady("ccmessage", function () {

        // Create a new Button instance

        var oButton = new YAHOO.widget.Button({ 
                                            id: "ok-button", 
                                            label: "advice on reducing emissions", 
                                            container: "ccmessage" });
        oButton.on("click", function () {
openbulb()  
        });

        oButton.on("appendTo", function () {

            if (YAHOO.env.ua.ie == 6) {
            
                oButton.addClass("ie6");
            
            }
    
            var oButtonAnim = new YAHOO.util.ColorAnim("ok-button", { backgroundColor: { to: "#b1ddff" } });
    
            oButtonAnim.onComplete.subscribe(function () {
    
                this.attributes.backgroundColor.to = (this.attributes.backgroundColor.to == "#b1ddff") ? "#016bbd" : "#b1ddff";
            
                this.animate();
            
            });
            
            oButtonAnim.animate();
        
        });
    
    });


   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					disabled:"true",
					label: "<em><SPAN class=bodytext color=#E0E0E0 >back</em>", 
                                        container: "backc" }); 
        oButton.on("click", function () {
back()
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><SPAN class=bodytext><B>back</B></em>", 
                                        container: "back" }); 
        oButton.on("click", function () {
back()
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					disabled:"true",
					label: "<em><SPAN class=bodytext color=#E0E0E0 >next</em>", 
                                        container: "nextc" }); 
        oButton.on("click", function () {
next()
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><SPAN class=bodytext><B>next</B></em>", 
                                        container: "next" }); 
        oButton.on("click", function () {
next()
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"pushbutton", 
					label: "<em><span class=head2><B>individuals / households</B></em><em></SPAN><SPAN class='head1'>&nbsp;</SPAN></em><SPAN style='FONT:10px'>click to continue</SPAN></span>", 
                                        container: "indspan" }); 
        oButton.on("click", function () {
household()  
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"pushbutton", 
					label: "<em><span class=head2><B>organisations</B></em><em></SPAN><SPAN class='head1'>&nbsp;</SPAN></em><SPAN style='FONT:10px'>click to continue</SPAN></span>", 
                                        container: "orgspan" }); 
        oButton.on("click", function () {
organisations()  
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick(p_sType, p_aArgs) {
            var oMenuItem = p_aArgs[1];
            setVal("scalc.iqty", oMenuItem.value); 
 	    indivtabs()           
        }
          var aCategories = [
            { text: "one person", value: "1" },
            { text: "two people", value: "2" },
            { text: "three people", value: "3" },
            { text: "four people", value: "4" },
            { text: "five people", value: "5" },
            { text: "six people", value: "6" },
            { text: "seven people", value: "7" },
            { text: "eight people", value: "8" },
            { text: "nine people", value: "9" },
            { text: "ten people", value: "10" }
        ];
         var oButton = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>calculate emissions</B></em><em></SPAN><SPAN class='head1'>from sources including energy, travel & flights</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of residents / adults</em></SPAN></span>", 
                                        menu: aCategories, 
                                        container: "indcalc" }); 
        oButton.on("appendTo", function () {
        oButton.getMenu().subscribe("click", onMenuClick);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick2(p_sType, p_aArgs) {
            var oMenuItem2 = p_aArgs[1];
            setVal("scalc.percapita", oMenuItem2.value); 
 	    perc()           
        }
          var bCategories = [
            { text: "one person (28t $560)", value: "1" },
            { text: "two people (56t $1120)", value: "2" },
            { text: "three people (84t $1680)", value: "3" },
            { text: "four people (112t $2240)", value: "4" },
            { text: "five people (140t $2800)", value: "5" },
            { text: "six people (168t $3360)", value: "6" },
            { text: "seven people (196t $3920)", value: "7" },
            { text: "eight people (224t $4480)", value: "8" },
            { text: "nine people (252t $5040)", value: "9" },
            { text: "ten people (280t $5600)", value: "10" }
        ];
         var oButton2 = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>offset average emissions </B>(28t)</em><em></SPAN><SPAN class='head1'>offset <B>average</B> emissions of Australians</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of people to offset</em></SPAN></span>", 
                                        menu: bCategories, 
                                        container: "indave" }); 
        oButton2.on("appendTo", function () {
        oButton2.getMenu().subscribe("click", onMenuClick2);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick3(p_sType, p_aArgs) {
            var oMenuItem3 = p_aArgs[1];
            setVal("scalc.pctq", oMenuItem3.value); 
 	    perc2()           
        }
          var cCategories = [
            { text: "2 tonnes ($40)", value: "2" },
            { text: "4 tonnes ($80)", value: "4" },
            { text: "6 tonnes ($120)", value: "6" },
            { text: "8 tonnes ($160)", value: "8" },
            { text: "10 tonnes ($200)", value: "10" },
            { text: "15 tonnes ($300)", value: "15" },
            { text: "20 tonnes ($400)", value: "20" },
            { text: "25 tonnes ($500)", value: "25" },
            { text: "30 tonnes ($600)", value: "30" },
            { text: "another amount", value: "1.5" }
        ];
         var oButton3 = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>know your emissions already ?</B></em><em></SPAN><SPAN class='head1'>offset for $20 per tonne of CO<sub>2</sub>e</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of tonnes to offset</em></SPAN></span>", 
                                        menu: cCategories, 
                                        container: "indoff" }); 
        oButton3.on("appendTo", function () {
        oButton3.getMenu().subscribe("click", onMenuClick3);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick4(p_sType, p_aArgs) {
            var oMenuItem4 = p_aArgs[1];
            setVal("scalc.pctr", oMenuItem4.value); 
	    document.getElementById('otdab').style.display='none'
 	    perc3()           
        }
          var dCategories = [
            { text: "10 trees ($33)", value: "10" },
            { text: "20 trees ($66)", value: "20" },
            { text: "30 trees ($99)", value: "30" },
            { text: "40 trees ($132)", value: "40" },
            { text: "50 trees ($165)", value: "50" },
            { text: "75 trees ($247.50)", value: "75" },
            { text: "100 trees ($330)", value: "100" },
            { text: "150 trees ($495)", value: "150" },
            { text: "200 trees ($660)", value: "200" },
            { text: "another amount", value: "10" }
        ];
         var oButton4 = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>trees for rehabilitation</B> ($3.30/tree)</em><em></SPAN><SPAN class='head1'>plant trees in regional Australia</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of trees</em></SPAN></span>", 
                                        menu: dCategories, 
                                        container: "indtre" }); 
        oButton4.on("appendTo", function () {
        oButton4.getMenu().subscribe("click", onMenuClick4);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick5(p_sType, p_aArgs) {
            var oMenuItem5 = p_aArgs[1];
            setVal("scalc.pcda", oMenuItem5.value); 
		document.getElementById('ottreesb').style.display='none'
		document.getElementById('otttrees').style.display='none'
  		document.getElementById('ottrees1').style.display='none'
 	    perc4()           
        }
          var eCategories = [
            { text: "$30", value: "30" },
            { text: "$50", value: "50" },
            { text: "$75", value: "75" },
            { text: "$100", value: "100" },
            { text: "$150", value: "150" },
            { text: "$200", value: "200" },
            { text: "$250", value: "250" },
            { text: "$500", value: "500" },
            { text: "$1000", value: "1000" },
            { text: "another amount", value: "30" }
        ];
         var oButton5 = new YAHOO.widget.Button({ 
                                        type: "menu",
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>make a donation now</B></em><em></SPAN><SPAN class='head1'>make a donation of your choice</SPAN></em><SPAN style='FONT:10px'><em>to begin, select your donation</em></SPAN></span>", 
                                        menu: eCategories, 
                                        container: "indda" }); 
        oButton5.on("appendTo", function () {
        oButton5.getMenu().subscribe("click", onMenuClick5);
        });
    } ();
   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"pushbutton", 
					label: "<em><span class=head2><B>calculate emissions</B></em><em></SPAN><SPAN class='head1'>from sources including energy, travel & flights</SPAN></em><SPAN style='FONT:10px'><em>to begin, click here</em></SPAN></span>", 
                                        container: "orgcalc" }); 
        oButton.on("click", function () {
orgtabs()  
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick3(p_sType, p_aArgs) {
            var oMenuItem3 = p_aArgs[1];
            setVal("scalc.pcotq", oMenuItem3.value); 
 	    perc5()           
        }
          var cCategories = [
            { text: "2 tonnes ($40)", value: "2" },
            { text: "5 tonnes ($100)", value: "5" },
            { text: "10 tonnes ($200)", value: "10" },
            { text: "15 tonnes ($300)", value: "15" },
            { text: "20 tonnes ($400)", value: "20" },
            { text: "25 tonnes ($500)", value: "25" },
            { text: "50 tonnes ($1000)", value: "50" },
            { text: "100 tonnes ($2000)", value: "100" },
            { text: "200 tonnes ($4000)", value: "200" },
            { text: "another amount", value: "1.58" }
        ];
         var oButton3 = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>know your emissions already ?</B></em><em></SPAN><SPAN class='head1'>offset for $20 per tonne of CO<sub>2</sub>e</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of tonnes to offset</em></SPAN></span>", 
                                        menu: cCategories, 
                                        container: "orgoff" }); 
        oButton3.on("appendTo", function () {
        oButton3.getMenu().subscribe("click", onMenuClick3);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick4(p_sType, p_aArgs) {
            var oMenuItem4 = p_aArgs[1];
            setVal("scalc.pcotr", oMenuItem4.value); 
	    document.getElementById('otdab').style.display='none'
 	    perc6()           
        }
          var dCategories = [
            { text: "10 trees ($33)", value: "10" },
            { text: "20 trees ($66)", value: "20" },
            { text: "50 trees ($165)", value: "50" },
            { text: "100 trees ($330)", value: "100" },
            { text: "250 trees ($825)", value: "250" },
            { text: "500 trees ($1650)", value: "500" },
            { text: "750 trees ($2475)", value: "750" },
            { text: "1000 trees ($3300)", value: "1000" },
            { text: "2000 trees ($6600)", value: "2000" },
            { text: "another amount", value: "10" }
        ];
         var oButton4 = new YAHOO.widget.Button({ 
                                        type: "menu", 
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>trees for rehabilitation</B> ($3.30/tree)</em><em></SPAN><SPAN class='head1'>plant trees in regional Australia</SPAN></em><SPAN style='FONT:10px'><em>to begin, select the number of trees</em></SPAN></span>", 
                                        menu: dCategories, 
                                        container: "orgtre" }); 
        oButton4.on("appendTo", function () {
        oButton4.getMenu().subscribe("click", onMenuClick4);
        });
    } ();
    YAHOO.example.init = function () {
         function onMenuClick5(p_sType, p_aArgs) {
            var oMenuItem5 = p_aArgs[1];
		document.getElementById('ottreesb').style.display='none'
		document.getElementById('otttrees').style.display='none'
  		document.getElementById('ottrees1').style.display='none'
            setVal("scalc.pcoda", oMenuItem5.value); 
 	    perc7()           
        }
          var eCategories = [
            { text: "$30", value: "30" },
            { text: "$50", value: "50" },
            { text: "$75", value: "75" },
            { text: "$100", value: "100" },
            { text: "$200", value: "200" },
            { text: "$500", value: "500" },
            { text: "$1000", value: "1000" },
            { text: "$2500", value: "2500" },
            { text: "$5000", value: "5000" },
            { text: "another amount", value: "30" }
        ];
         var oButton5 = new YAHOO.widget.Button({ 
                                        type: "menu",
                                        id:"categorybutton", 
                                        label: "<em><span class=head2><B>make a donation now</B></em><em></SPAN><SPAN class='head1'>make a donation of your choice</SPAN></em><SPAN style='FONT:10px'><em>to begin, select your donation</em></SPAN></span>", 
                                        menu: eCategories, 
                                        container: "orgda" }); 
        oButton5.on("appendTo", function () {
        oButton5.getMenu().subscribe("click", onMenuClick5);
        });
    } ();
//    YAHOO.util.Event.onContentReady("sendme", function () {
//document.getElementById("sendme").style.display='none'
        // Create a new Button instance

//        var oButton = new YAHOO.widget.Button({ 
//                                            id: "ok-button", 
//                                            label: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;send me a bill&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", 
//                                            container: "sendme" });
//        oButton.on("click", function () {
//sendtome()  
//      });

        /*
            Begin animating the Button instance's background color once it is 
            appended to its containing element.
        */

//        oButton.on("appendTo", function () {

            /*
                Apply a special CSS class to be able to target IE 6 
                specifically in the CSS.
            */

//            if (YAHOO.env.ua.ie == 6) {
            
 //               oButton.addClass("ie6");
            
//            }
    

            // Create a new ColorAnim instance

            
 //           oButtonAnim.animate();
        
//        });
    
//    });

    YAHOO.util.Event.onContentReady("donatenow", function () {

        // Create a new Button instance

        var oButton = new YAHOO.widget.Button({ 
                                            id: "ok-button", 
                                            label: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;donate now&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", 
                                            container: "donatenow" });
        oButton.on("click", function () {
donateNow()  
        });

        /*
            Begin animating the Button instance's background color once it is 
            appended to its containing element.
        */

        oButton.on("appendTo", function () {

            /*
                Apply a special CSS class to be able to target IE 6 
                specifically in the CSS.
            */

            if (YAHOO.env.ua.ie == 6) {
            
                oButton.addClass("ie6");
            
            }
    


        
        });
    
    });


//   YAHOO.util.Event.onContentReady("emailme", function () {

        // Create a new Button instance

 //       var oButton = new YAHOO.widget.Button({ 
 //                                           id: "ok-button", 
 //                                           label: "email me the results", 
 //                                           container: "emailme" });
 //       oButton.on("click", function () {
//emailtome()  
 //       });

        /*
  //          Begin animating the Button instance's background color once it is 
 //           appended to its containing element.
        */

  //      oButton.on("appendTo", function () {

   //         /*
  //              Apply a special CSS class to be able to target IE 6 
   //             specifically in the CSS.
   //         */

  //          if (YAHOO.env.ua.ie == 6) {
            
  //              oButton.addClass("ie6");
  //          
   //         }
    



        
 //       });
 //   
  //  });




   YAHOO.example.init = function () {
         var oButton = new YAHOO.widget.Button({ 
                                        type: "button", 
                                        id:"tab", 
					label: "<em><span class=head1><B>add flight</B></em></span>", 
                                        container: "addflight" }); 
        oButton.on("click", function () {
addflight()  
        });
    } ();
	YAHOO.widget.Chart.SWFURL = "http://yui.yahooapis.com/2.6.0/build//charts/assets/charts.swf";
	YAHOO.example.publicOpinion =
	[
		{ response: "waste", count: document.totalsform.chiwaste.value },
		{ response: "travel", count: document.totalsform.chivehicle.value },
		{ response: "energy", count: document.totalsform.chienergy.value },
		{ response: "air travel", count: document.totalsform.chiairtravel.value },
		{ response: "food", count: document.totalsform.chifood.value }
	]
	var opinionData = new YAHOO.util.DataSource( YAHOO.example.publicOpinion );
	opinionData.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
	opinionData.responseSchema = { fields: [ "response", "count" ] };
	var mychart = new YAHOO.widget.PieChart( "charti", opinionData,
	{
		dataField: "count",
		categoryField: "response",
		style:
		{
			padding: 20,
			legend:
			{
				display: "right",
				padding: 10,
				spacing: 5,
				font:
				{
					family: "Arial",
					size: 13
				}
			}
		},
		expressInstall: "assets/expressinstall.swf"
	});
function renewi(){
	YAHOO.widget.Chart.SWFURL = "http://yui.yahooapis.com/2.6.0/build//charts/assets/charts.swf";
	YAHOO.example.publicOpinion =
	[
		{ response: "waste", count: document.totalsform.chiwaste.value },
		{ response: "travel", count: document.totalsform.chivehicle.value },
		{ response: "energy", count: document.totalsform.chienergy.value },
		{ response: "air travel", count: document.totalsform.chiairtravel.value },
		{ response: "food", count: document.totalsform.chifood.value }
	]
	var opinionData = new YAHOO.util.DataSource( YAHOO.example.publicOpinion );
	opinionData.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
	opinionData.responseSchema = { fields: [ "response", "count" ] };
	var mychart = new YAHOO.widget.PieChart( "charti", opinionData,
	{
		dataField: "count",
		categoryField: "response",
		style:
		{
			padding: 20,
			legend:
			{
				display: "right",
				padding: 10,
				spacing: 5,
				font:
				{
					family: "Arial",
					size: 13
				}
			}
		},
		expressInstall: "assets/expressinstall.swf"
	});
}
	YAHOO.widget.Chart.SWFURL = "http://yui.yahooapis.com/2.6.0/build//charts/assets/charts.swf";
	YAHOO.example.publicOpinion =
	[
		{ response: "waste", count: document.ototalsform.chwaste.value },
		{ response: "fleet/vehicles", count: document.ototalsform.chvehicle.value },
		{ response: "energy", count: document.ototalsform.chenergy.value },
		{ response: "air travel", count: document.ototalsform.chairtravel.value },
		{ response: "consumables", count: document.ototalsform.chconsumables.value },
		{ response: "staff travel", count: document.ototalsform.chstravel.value }
	]
	var opinionData = new YAHOO.util.DataSource( YAHOO.example.publicOpinion );
	opinionData.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
	opinionData.responseSchema = { fields: [ "response", "count" ] };
	var mychart = new YAHOO.widget.PieChart( "chart", opinionData,
	{
		dataField: "count",
		categoryField: "response",
		style:
		{
			padding: 20,
			legend:
			{
				display: "right",
				padding: 10,
				spacing: 5,
				font:
				{
					family: "Arial",
					size: 13
				}
			}
		},
		expressInstall: "assets/expressinstall.swf"
	});
function renewo(){
	YAHOO.widget.Chart.SWFURL = "http://yui.yahooapis.com/2.6.0/build//charts/assets/charts.swf";
	YAHOO.example.publicOpinion =
	[
		{ response: "waste", count: document.ototalsform.chwaste.value },
		{ response: "fleet/vehicles", count: document.ototalsform.chvehicle.value },
		{ response: "energy", count: document.ototalsform.chenergy.value },
		{ response: "air travel", count: document.ototalsform.chairtravel.value },
		{ response: "consumables", count: document.ototalsform.chconsumables.value },
		{ response: "staff travel", count: document.ototalsform.chstravel.value }
	]
	var opinionData = new YAHOO.util.DataSource( YAHOO.example.publicOpinion );
	opinionData.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
	opinionData.responseSchema = { fields: [ "response", "count" ] };
	var mychart = new YAHOO.widget.PieChart( "chart", opinionData,
	{
		dataField: "count",
		categoryField: "response",
		style:
		{
			padding: 20,
			legend:
			{
				display: "right",
				padding: 10,
				spacing: 5,
				font:
				{
					family: "Arial",
					size: 13
				}
			}
		},
		expressInstall: "assets/expressinstall.swf"
	});
}