function doChange() {
  var myvalue = document.getElementById("typ").options[document.getElementById("typ").selectedIndex].value;
  if(parseInt(document.getElementById("typ").selectedIndex) != 0) {
    window.location = myvalue;
  }
}

function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
  if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
  } else if (elm.attachEvent){
    var r = elm.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
} 

addEvent(window,'load',init,false);

function init() {
  addEvent(document.getElementById('typ'),'change',doChange,false);
}
