// JavaScript Document

activeClass = 'activepage'

function activepage(){
	var allcontent = document.getElementById('allcontent');
	var links = allcontent.getElementsByTagName('a');
	
	var currentpage = location(window.location.href);
	
	function location(str){
		str = str.substring(str.lastIndexOf('/')+1,str.length);
		return str;
		}
		
	for(i=0; i<links.length; i++){
		if(location(links[i].href) == currentpage){
			links[i].className = activeClass;
		}	
	}
}


function submitenter(myfield,e,href) {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
  else return true;

  if (keycode == 13) {
    window.location.href=href;
    return false;
  }
  else return true;
}

//window.onload = activepage;