$(document).ready(function(){$("#open").click(function(){$("div#panel").slideDown("slow");});$("#close").click(function(){$("div#panel").slideUp("slow");});$("#toggle a").click(function(){$("#toggle a").toggle();});});;function parseinput(ort){var sign=["ö","ü","ä","ß"," ",",","/",":","·","é","è","ê","Ö","Ü","Ä"];var replace=["oe","ue","ae","ss","-","-","-","-","-","e","e","e","Oe","Ue","Ae"];for(var i=0;i<sign.length;i++){while(ort.search(sign[i])!=-1){ort=ort.replace(sign[i],replace[i]);}}
while(ort.search(/\./)!=-1){ort=ort.replace(/\./,"-");}
while(ort.search("--")!=-1){ort=ort.replace("--","-");}
if(ort.substr(ort.length-1,ort.length)=="-")ort=ort.substr(0,ort.length-1);if(ort.substr(0,1)=="-")ort=ort.substr(1,ort.length);return ort;}
function countroute(){var gpStart=parseinput(document.getElementById("start").value);var gpEnd=parseinput(document.getElementById("end").value);if(gpStart&&gpEnd){self.location.href="http://www.luftlinie.org/"+gpStart+"_"+gpEnd;}
if(gpStart==""){document.getElementById("start").focus();}
if(gpEnd==""){document.getElementById("end").focus();}}
