  // here we define global variable
var ajaxdestination="";

function getdata(what,where) { // get data from source (what)
 try {
   xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) { /* do nothing */ }

 document.getElementById(where).innerHTML ="<center><img src='loading.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination=where;
 xmlhttp.onreadystatechange = triggered; // when request finished, call the function to put result to destination DIV
 xmlhttp.open("GET", what);
 xmlhttp.send(null);
  return false;
}

function triggered() { // put data returned by requested URL to selected DIV
  if (xmlhttp.readyState == 4) if (xmlhttp.status == 200) 
    document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
}

// DON'T EDIT ABOVE !!!

var activnavpoint = "test";

function closelastused(){
$(activnavpoint).toggle({ 
        width: "300px",
        opacity: 0.4,
        fontSize: "3em", 
        borderWidth: "10px",
        display: "block"
      }, 1500 );
}

function opennext(dingsda){
if (dingsda != activnavpoint){
activnavpoint=dingsda;
      $(dingsda).toggle({ 
        width: "300px",
        opacity: 0.4,
        fontSize: "3em", 
        borderWidth: "10px",
        display: "block"
      }, 1500 );
      }
else{
  activnavpoint="test";
    }

}

  $(document).ready(function(){
    $("li").mouseover(function(){
    this.style.backgroundImage = "url(/gfx/lihover.jpg)";   
    }
    );
  
    $("li").mouseout(function(){
    this.style.backgroundImage = "url()";  
    }
    );
    
    $("li").click(function(){
    getdata('test.htm','content');
    }
    );
  
  });


  $(document).ready(function(){
    $("#msgboxrgtdropdwn").click(function(){
        $("#abovecontent").toggle({ 
        width: "300px",
        opacity: 0.4,
        fontSize: "3em", 
        borderWidth: "10px",
        display: "block"
      }, 1500 );
    }
    );
  });


$(document).ready(function(){
	for (var i=1; i<=200; i++){
		var el = document.getElementById('go'+i);
		el.index = i;
		el.onclick = function(){
			/* alert(this.id); */
			closelastused();
			opennext("#block"+this.index);
		};
	}
});
