function getBaseUrl(){
var _1=window.location.protocol;
_1=_1+"//"+window.location.host;
_1=_1+window.location.pathname.toString();
arr=_1.split("/");
arr.pop();
return arr.join("/");
};
function addHtmlAfterElementX(_2,_3){
dummydiv=document.createElement("div");
dummydiv.innerHTML=_3;
newElem=dummydiv.firstChild;
var _4=_2;
do{
_4=_4.nextSibling;
}while(_4&&_4.nodeType!=1);
if(_4!==null){
_4.insertBefore(newElem);
}else{
var _5=_2.parentNode;
_5.appendChild(newElem);
}
};
function appendHTML(_6,_7){
dummydiv=document.createElement("div");
dummydiv.innerHTML=_7;
newElem=dummydiv.firstChild;
_6.appendChild(newElem);
};
function deleteGEFeature(){
};
function toRad(_8){
var _9=_8*Math.PI/180;
return _9;
};
function toDeg(_a){
var _b=(_a*180)/Math.PI;
return _b;
};
function mathUtility(){
this.ER=6371010;
this.distCosineLaw=function(p1,p2){
var d=this.distAlternative(p1,p2);
return d;
};
this.distAlternative=function(p1,p2){
p1lat=toRad(parseFloat(p1.getLatitude()));
p1lon=toRad(parseFloat(p1.getLongitude()));
p2lat=toRad(parseFloat(p2.getLatitude()));
p2lon=toRad(parseFloat(p2.getLongitude()));
var _11=Math.pow(Math.sin((p1lat-p2lat)/2),2);
var _12=Math.cos(p1lat)*Math.cos(p2lat)*Math.pow((Math.sin((p1lon-p2lon)/2)),2);
return 2*Math.asin(Math.sqrt(_11+_12))*this.ER;
};
this.kurswinkel=function(p1,p2){
p2lon=toRad(p2.getLongitude());
p2lat=toRad(p2.getLatitude());
p1lon=toRad(p1.getLongitude());
p1lat=toRad(p1.getLatitude());
var y=Math.sin(p2lon-p1lon)*Math.cos(p2lat);
var x=Math.cos(p1lat)*Math.sin(p2lat)-Math.sin(p1lat)*Math.cos(p2lat)*Math.cos(p2lon-p1lon);
var _17=Math.atan2(y,x);
_17=(parseFloat(_17)+2*Math.PI)%(2*Math.PI);
return toDeg(_17);
};
this.toRad=function(_18){
var rad=_18*Math.PI/180;
return rad;
};
this.toDeg=function(_1a){
var deg=(_1a*180)/Math.PI;
return deg;
};
this.altHop=function(_1c,_1d){
var _1e=0;
var x=parseFloat(_1c)/parseFloat(_1d);
_1e=Math.pow(Math.sin(x*Math.PI),2)/2.375*x;
return _1e;
};
};
function GoLatLng(lat,lng){
var _22=lat;
var _23=lng;
var ER=6371010;
this.lng=function(){
return _23;
};
this.lat=function(){
return _22;
};
this.setLng=function(lng){
_23=lng;
};
this.setLat=function(lat){
_22=lat;
};
this.distanceFrom=function(_27){
thislat=_28(parseFloat(this.lat()));
thislon=_28(parseFloat(this.lng()));
otherlat=_28(parseFloat(_27.lat()));
otherlon=_28(parseFloat(_27.lng()));
var _29=Math.pow(Math.sin((thislat-otherlat)/2),2);
var _2a=Math.cos(thislat)*Math.cos(otherlat)*Math.pow((Math.sin((thislon-otherlon)/2)),2);
return 2*Math.asin(Math.sqrt(_29+_2a))*ER;
};
this.degreeFrom=function(_2b){
otherlon=_28(_2b.lng());
otherlat=_28(_2b.lat());
thislon=_28(_23);
thislat=_28(_22);
var y=Math.sin(otherlon-thislon)*Math.cos(otherlat);
var x=Math.cos(thislat)*Math.sin(otherlat)-Math.sin(thislat)*Math.cos(otherlat)*Math.cos(otherlon-thislon);
var _2e=Math.atan2(y,x);
_2e=(parseFloat(_2e)+2*Math.PI)%(2*Math.PI);
return _2f(_2e);
};
this.moveBy=function(_30,_31){
var _32=_28(_22);
var _33=_28(_23);
var _34=_28(_30);
var d=_31/ER;
var _36=Math.asin(Math.sin(_32)*Math.cos(d)+Math.cos(_32)*Math.sin(d)*Math.cos(_34));
var _37=parseFloat(_33)+Math.atan2(Math.sin(_34)*Math.sin(d)*Math.cos(_32),Math.cos(d)-Math.sin(_32)*Math.sin(_36));
_22=_2f(_36);
_23=_2f(_37%(2*Math.PI));
};
this.toString=function(){
return "[lat: "+_22+"; lng:"+_23+";]";
};
this.clone=function(){
return new GoLatLng(_22,_23);
};
var _28=function(_38){
return _38*Math.PI/180;
};
var _2f=function(_39){
return (_39*180)/Math.PI;
};
this.toKmlPm=function(){
var str="";
str+="<Placemark>";
str+="\t<name>PM</name>";
str+="\t<LookAt>";
str+="\t\t<longitude>"+_23+"</longitude>";
str+="\t\t<latitude>"+_22+"</latitude>";
str+="\t\t<altitude>12000</altitude>";
str+="\t\t<range>9778.227917167491</range>";
str+="\t\t<tilt>-9.345405934767459e-011</tilt>";
str+="\t\t<heading>#heading#</heading>";
str+="\t</LookAt>";
str+="\t<styleUrl>#msn_ylw-pushpin_copy1</styleUrl>";
str+="\t<Point>";
str+="\t\t<extrude>1</extrude>";
str+="\t\t<altitudeMode>relativeToGround</altitudeMode>";
str+="\t\t<coordinates>"+_23+","+_22+",12000</coordinates>";
str+="\t</Point>";
str+="\t<Time>10</Time>";
str+="</Placemark>";
return str;
};
};
function gotomaps(_3b){
var _3c=new GClientGeocoder();
_3c.getLocations(_3b,addToMap);
return false;
};
function addToMap(_3d){
try{
var _3e=_3d.Placemark[0];
var _3f=new GLatLng(_3e.Point.coordinates[1],_3e.Point.coordinates[0]);
var la=geApi.getLookAt();
la.setLatitude(_3e.Point.coordinates[1]);
la.setLongitude(_3e.Point.coordinates[0]);
la.setTilt(0);
la.setRange(100);
la.setHeading(0);
geApi.setLookAt(la);
}
catch(e){
alert("Not found.");
}
};
function defaultValueActAsHint(_41){
var _42=_41;
_42.defaultValue=_42.value;
dojo.attr(_42,"class","hint");
dojo.connect(_41,"onfocus",null,function(){
if(_42.defaultValue!=_42.value){
return;
}
dojo.attr(_42,"class","");
_42.value="";
});
dojo.connect(_41,"onblur",null,function(){
if(_42.value!=""){
return;
}
dojo.attr(_42,"class","hint");
_42.value=_42.defaultValue;
});
};
function addPushButtonBehavior(_43,_44){
dojo.connect(_43,"onmousedown",function(){
var btn=dojo.byId(_43.id);
yPos=dojo.style(btn,"height");
if(yPos==null){
yPos="25";
}
btn.style.backgroundPosition=getBgImageXPos(btn)+" "+yPos+"px";
_44();
return false;
});
dojo.connect(_43,"onmouseup",function(){
var btn=dojo.byId(_43.id);
btn.style.backgroundPosition=getBgImageXPos(btn)+" 0px";
});
dojo.connect(_43,"onmouseout",function(){
var btn=dojo.byId(_43.id);
btn.style.backgroundPosition=getBgImageXPos(btn)+" 0px";
});
};
function getStyle(x,_49,_4a){
if(x.currentStyle){
var y=x.currentStyle[_49];
}else{
if(window.getComputedStyle){
var y=document.defaultView.getComputedStyle(x,null).getPropertyValue(_4a);
}
}
return y;
};
function getBgImageXPos(btn){
jsPos="backgroundPositionX";
cssPos="background-position";
if(style=getStyle(btn,jsPos,cssPos)){
try{
xpos=style.substring(0,style.indexOf("px")+2);
return xpos;
}
catch(e){
return "0";
}
}else{
return "0";
}
};
function radioWert(_4d){
for(var i=0;i<_4d.length;i++){
if(_4d[i].checked){
return _4d[i].value;
}
}
return false;
};
function dateString(_4f){
var _50=new Date();
var _51=new Date();
_51.setTime(_4f);
var _52=_50.getDate()-_51.getDate();
var _53=_50.getMonth()-_51.getMonth();
var _54=_50.getYear()-_51.getYear();
if(i18n.LANGUAGE_ID==0){
return _51.getDate()+"."+(_51.getMonth()+1)+"."+_51.getFullYear();
}else{
return _51.getFullYear()+"/"+(_51.getMonth()+1)+"/"+_51.getDate();
}
};
function stripSlashes(){
return (str+"").replace(/\0/g,"0").replace(/\\([\\'"])/g,"$1");
};
function addSlashes(){
return (str+"").replace(/([\\"'])/g,"\\$1").replace(/\0/g,"\\0");
};
function selectAll(obj){
var _56=dojo.byId(obj);
_56.focus();
_56.select();
};


