/*  Copy the text below into your page

<!--Add the View all/close all link-->

  <script language="javascript" src="/main-scripts/twist-nav-viewall.js"></script>


<!--then add your links-->

<p><a id="plus1" class="plus" onclick="changeplus('plus1');showHide('mymenu1')" >Link1</a></p>
<script>document.write(menudiv[1]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>

<!--Link number 2 remember to change the 1's to 2's as shown below-->

<p><a id="plus2" class="plus" onclick="changeplus('plus2');showHide('mymenu2')" >Link2</a></p>
<script>document.write(menudiv[2]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>


<!--Link number 3 -->

<p><a id="plus3" class="plus" onclick="changeplus('plus3');showHide('mymenu3')" >Link3</a></p>
<script>document.write(menudiv[3]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>

<!--Link number 4 -->

<p><a id="plus4" class="plus" onclick="changeplus('plus4');showHide('mymenu4')" >Link4</a></p>
<script>document.write(menudiv[4]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>


<!--Link number 5 -->

<p><a id="plus5" class="plus" onclick="changeplus('plus5');showHide('mymenu5')" >Link5</a></p>
<script>document.write(menudiv[5]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>


<!--Link number 6 -->

<p><a id="plus6" class="plus" onclick="changeplus('plus6');showHide('mymenu6')" >Link6</a></p>
<script>document.write(menudiv[6]);</script>

<!--Main text goes in here-->

<script>document.write(closediv);</script>

<!--END-->
*/

// hide and unhide text underneath the links

menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'lightbluebackground-border') {
           switch_id.className = 'lightbluebackground-border';
           menu_status[theid] = 'lightbluebackground-border';		
        }else{
           switch_id.className = 'hidden';
           menu_status[theid] = 'hidden';
        }
		
    }
}

//change plus minus image


function changeplus(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'minus') {
           switch_id.className = 'minus';
           menu_status[theid] = 'minus';
        }else{
           switch_id.className = 'plus';
           menu_status[theid] = 'plus';
        }		
    }
}


//show all/hideall functions

function showall(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

           switch_id.className = 'lightbluebackground-border';
           menu_status[theid] = 'lightbluebackground-border';   
	
		 
    }
	}
	
/*function showhideall(id)
        {
            if(document.getElementById(id).className =='on')
            {
                document.getElementById(id).className = 'off';
            }
            else 
            			{ 
                document.getElementById(id).className = 'on';
            }
        }*/


	
	
	function hideall(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

                  switch_id.className = 'hidden';
           menu_status[theid] = 'hidden';       
    }
	}
	
	function changeallplus(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
        
           switch_id.className = 'plus';
           menu_status[theid] = 'plus';       
    }
}

function changeallminus(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);        
           switch_id.className = 'minus';
           menu_status[theid] = 'minus';       
    }
}
	
	
//define variables

var menudiv=new Array(); 

for( var menunumber = 1; menunumber <= 100; menunumber++ ) {	
menudiv[menunumber] =  "<div id=\"mymenu" + menunumber + "\" class=\"hidden\"> <a onclick=\"changeplus('plus" + menunumber + "'); showHide('mymenu" + menunumber + "')\" class=\"pointer\"> <img src=\"http://www.hodderplus.co.uk/images/close.gif\" width=\"14\" height=\"14\" align=\"right\" /></a>"; 


}

var closediv = "</div>";






