    var startTop, startLeft, expanded_div;
	var effectDone = new Object();
                effectDone["l1"] = false;
                effectDone["l2"] = false;
                effectDone["l3"] = false;       
                effectDone["l4"] = false;       
                effectDone["l5"] = false;       
                effectDone["l6"] = false;       
    /*
    var lessonTitles = new Object();
                lessonTitles["l1"] = "Lesson 1: Web Access";
                lessonTitles["l2"] = "Lesson 2: Working With Files";
                lessonTitles["l3"] = "Lesson 3: Using WebDAV"; */


    function wellDone(thisLesson) { 
            effectDone[thisLesson] = true;
          }


	function toggleEffect(thisLesson) { //basic function of the menu, decides whether sliding left or right
           
             //get the expanded <div> element
             expanded_div = document.getElementById('expanded_' + thisLesson);
             
                 
		      if ( !effectDone[thisLesson] ) {
                 
                 //change classname to display, but change to 0 opacity right away
                 expanded_div.className = "show absoluted";
                 new Rico.Effect.FadeTo(expanded_div, 0, 1, 1);
                 
                 startEffect(thisLesson);
                 effectDone[thisLesson] = true;
		      }
		      else {
                 resetEffect(thisLesson);
                 effectDone[thisLesson] = false;
		      }
		   }

    function initialize(thisLesson) { //initialization function of menu, to create appearance of static menu
                                       //when going between different pages
           
            //get the expanded <div> element
            expanded_div = document.getElementById('expanded_' + thisLesson);
    
            startTop   = $('toggleAffectMe').offsetTop;
            startLeft  = $('toggleAffectMe').offsetLeft;
            
                 
            //change classname to display, and make 1 opacity right away
            expanded_div.className = "show absoluted";
            new Rico.Effect.FadeTo(expanded_div, 1, 1, 1 );
            
            new Rico.Effect.FadeTo('main_' + thisLesson, 0, 1, 10 );
            new Rico.Effect.Position( 'toggleAffectMe', -200, null, 1, 1 );
            
            wellDone(thisLesson);
    }

	function startEffect(thisLesson) {
             
        startTop   = $('toggleAffectMe').offsetTop;
        startLeft  = $('toggleAffectMe').offsetLeft;
            
        new Rico.Effect.FadeTo(expanded_div, 1, 300, 10 );
        new Rico.Effect.FadeTo('main_' + thisLesson, 0, 300, 10 );
        new Rico.Effect.Position( 'toggleAffectMe', -200, null, 300, 10 );
    }


	function resetEffect(thisLesson) {
           
        new Rico.Effect.FadeTo(expanded_div, 0, 300, 10, {complete:function(){expanded_div.className="hide absoluted"}} );
        new Rico.Effect.FadeTo('main_' + thisLesson, 1, 300, 10 );
        new Rico.Effect.Position( 'toggleAffectMe', startLeft, null, 300, 10 );

         }

    /****************************************************
         Author: Eric King
         Url: http://redrival.com/eak/index.shtml
         This script is free to use as long as this info is left in
         Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
    ****************************************************/
    var win=null;
    function NewWindow(mypage,myname,w,h,scroll,pos){
    if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
    if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
    else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes';
    win=window.open(mypage,myname,settings);}
