//codes for browser
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 
//change icon image  
function onmouse(a,b)
{s
	var domElement = document.getElementById(a)
	domElement.src = b;
}
//Ajax redirect: 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='images/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;
}
//hide function
$(document).ready(function(){
    $(".hisnav").hide();
	$(".culnav").hide();
	$(".econav").hide();
	$(".natnav").hide();
	$(".comnav").hide();

  $(".buttonb").hover(function(){
    $(".buttonb").fadeTo(200,1);
    },function(){
     $(".buttonb").stop(true, false).fadeTo(200,0.6);
  });

  $(".buttonb2").hover(function(){
    $(".buttonb2").fadeTo(200,1);
    },function(){
     $(".buttonb2").stop(true, false).fadeTo(200,0.6);
  });

  $(".buttonb3").hover(function(){
    $(".buttonb3").fadeTo(200,1);
    },function(){
     $(".buttonb3").stop(true, false).fadeTo(200,0.6);
  });

  $(".buttonb4").hover(function(){
    $(".buttonb4").fadeTo(200,1);
    },function(){
     $(".buttonb4").stop(true, false).fadeTo(200,0.6);
  });

  $(".buttonb5").hover(function(){
    $(".buttonb5").fadeTo(200,1);
    },function(){
     $(".buttonb5").stop(true, false).fadeTo(200,0.6);
  });
  
    $(".buttonb6").hover(function(){
    $(".buttonb6").fadeTo(200,1);
    },function(){
     $(".buttonb6").stop(true, false).fadeTo(200,0.6);
  });


//toolbars

  $(".a").hover(function(){
    $(".hisnav").delay(200).slideDown(500);
    },function(){
     $(".hisnav").stop(true, true).fadeOut(100);
  });
  
    $(".b").hover(function(){
    $(".econav").delay(200).slideDown(500);
    },function(){
     $(".econav").stop(true, true).fadeOut(100);;
  });
  
    $(".c").hover(function(){
    $(".culnav").delay(200).slideDown(500);
    },function(){
     $(".culnav").stop(true, true).fadeOut(100);
  });
  
    $(".d").hover(function(){
    $(".natnav").delay(200).slideDown(500);
    },function(){
     $(".natnav").stop(true, true).fadeOut(100);
  });
  
      $(".e").hover(function(){
    $(".comnav").delay(200).slideDown(500);
    },function(){
     $(".comnav").stop(true, true).fadeOut(100);
  });

});
