//query to pull the querystring value
  // Current Page Reference
  // copyright Stephen Chapman, 1st Jan 2005
  // you may copy this function but please keep the copyright notice with it
  function getURL(uri) {
  uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
  uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
  uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
  uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
  pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
  pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
  uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
  uri.file = uri.page;
  if (uri.ext != '') uri.file += '.' + uri.ext;
  if (uri.file == '') uri.page = 'index';
  uri.args = location.search.substr(1).split("?");
  return uri;
  }

  var uri = new Object();
  getURL(uri);

//now call the query to set a value for the queryString
 function checkPage(){
if (uri.page == 'default' || uri.page == 'index') 
{
  document.getElementById('menu1link').removeAttribute('onmouseout');
  document.getElementById('menu1link').removeAttribute('onmouseover');
  document.getElementById('menu1link').setAttribute("onmouseout",'');
  document.getElementById('menu1').src = "images/bmenu_01.gif";

} else if (uri.page == 'whatwedo') {
            document.getElementById('whatwedolink').removeAttribute('onmouseout');
            document.getElementById('whatwedolink').removeAttribute('onmouseover');
            document.getElementById('whatwedolink').setAttribute("onmouseout",'');
            document.getElementById('menu2').src = "images/bmenu_02.gif";
} else if (uri.page == 'whoweare') {
            document.getElementById('whowearelink').removeAttribute('onmouseout');
            document.getElementById('whowearelink').removeAttribute('onmouseover');
            document.getElementById('whowearelink').setAttribute("onmouseout",'');
            document.getElementById('menu3').src = "images/bmenu_03.gif";
} else if (uri.page == 'news') {
            document.getElementById('whatsnewlink').removeAttribute('onmouseout');
            document.getElementById('whatsnewlink').removeAttribute('onmouseover');
            document.getElementById('whatsnewlink').setAttribute("onmouseout",'');
            document.getElementById('menu5').src = "images/bmenu_05.gif";
} else if (uri.page == 'casestudies') {
            document.getElementById('casestudieslink').removeAttribute('onmouseout');
            document.getElementById('casestudieslink').removeAttribute('onmouseover');
            document.getElementById('casestudieslink').setAttribute("onmouseout",'');
            document.getElementById('menu6').src = "images/bmenu_06.gif";
} else if (uri.page == 'contactus') {
            document.getElementById('contactuslink').removeAttribute('onmouseout');
            document.getElementById('contactuslink').removeAttribute('onmouseover');
            document.getElementById('contactuslink').setAttribute("onmouseout",'');
            document.getElementById('menu7').src = "images/bmenu_07.gif";
}
}


 

<!-- 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}


//-->

