//var infos = location.href.substring(location.href.indexOf("?")+1, location.href.length)+"&"
// Create variable is_input to see if there is a ? in the url
var is_input = location.href.indexOf('?');

// Check the position of the ? in the url
if (is_input != -1){ 
	if (location.href.indexOf('&') != -1){ //check other parameters
	    nPos = location.href.substring(is_input+1, location.href.indexOf('&'));}
	else {
	    nPos = location.href.substring(is_input+1, location.href.length);
	}
  }
else{  //no parameters
  nPos=0;}


document.write('<DIV id=header>');
document.write('  <UL>');


for (i=0; i<menu1.length; i++){

  if (nPos==i){
    document.write('<LI id=current>');}
  else{
    document.write('<LI>');}
  document.write('<A href="'+menu2[i]+'">'+menu1[i]+'</A></LI>');

}

document.write('  </UL>');
document.write('</DIV>');


