var JSROOT="/js/";var ujar;
window.onload=function(){init();};
window.onunload=function(){destroy();}
init=function(){
$('quickjump').onchange=function(){window.location.href=$F('quickjump');}
$$('ul.tabs').each(function(tab_group){new Control.Tabs(tab_group,{hover:true});});
$('box_top1_bg').setStyle({opacity:0.5});
$('box_top1_bg').show();
$('box_top1').onclick=function(){gotoPage('/aktuelles/wetter.html');}
var mch=$('maincontent_wrapper').getHeight();
var sch=$('subcontent_wrapper').getHeight();
if (mch>sch){$('subcontent_wrapper').setStyle({height:mch+"px"});}
else{$('maincontent').setStyle({height:(sch+4)+"px"});}
if($('us_zeit_wrapper')){
$('us_zeit_wrapper').show();
$('us_zeit_dummy').onclick=function(){$('us_zeit_auswahl').show();}
}
if($('map')){
load();
if($('markerinfo')){$('markerinfo').setStyle({opacity:0.9});}
if($('markercursor')){$('markercursor').setStyle({opacity:0.9});}
}
ujar = new CookieJar({expires:(3600*24*365*10),path:'/'});
$$('noscript').each(function(n){n.hide();});//hide noscript tags from opera
}
us_choose=function(f,v){$('us_zeit').value=v;$('us_zeit_dummy').value=f.innerHTML;$('us_zeit_auswahl').hide();}
destroy=function(){if($('map')){GUnload();}}
memorise=function(){new Ajax.Request(JSROOT+'/req/memorise.php',{method:"post",parameters:{action:"set"},onSuccess:confMemoPage,onFailure:reqFailure});}
confMemoPage=function(r){if(confirm("Seite gemerkt. Möchten Sie sich Ihre Merkliste jetzt ansehen?")){gotoPage("/service/merkliste.html");}}
unmemorise=function(i){new Ajax.Request(JSROOT+'/req/memorise.php',{method:"post",parameters:{action:"unset",id:i},onSuccess:removeFromMemoPage,onFailure:reqFailure});}
removeFromMemoPage=function(r){var mp="mp"+r.responseText;if ($(mp)){$(mp).hide();}}
memorisePackageHidden=function(){new Ajax.Request(JSROOT+'/req/memorise.php',{method:"post",parameters:{action:"setpackage"},onSuccess:gotoPackageContactPage,onFailure:reqFailure});}
gotoPackageContactPage=function(r){setTimeout('gotoPage("/service/anfrage-pauschalen.html")',500);}
memorisePackage=function(){new Ajax.Request(JSROOT+'/req/memorise.php',{method:"post",parameters:{action:"setpackage"},onSuccess:confMemoPackage,onFailure:reqFailure});}
confMemoPackage=function(r){if(confirm("Pauschale gemerkt. Möchten Sie sich Ihre Merkliste jetzt ansehen?")){gotoPage("/service/merkliste.html");}}
unmemorisePackage=function(i){new Ajax.Request(JSROOT+'/req/memorise.php',{method:"post",parameters:{action:"unsetpackage",id:i},onSuccess:removePackageFromMemoPage,onFailure:reqFailure});}
removePackageFromMemoPage=function(r){var pp="pp"+r.responseText;if($(pp)){$(pp).hide();}}
reqFailure=function(r){alert("Ein unbekannter Fehler ist aufgetreten. Bitte laden Sie die Seite neu und versuchen es erneut.");}
function gotoPage(url){window.location.href=url}
boxPackage=function(id){$('box_pauschalen_content').innerHTML='LOADING...';new Ajax.Request(JSROOT+'/req/packages.php',{method:"post",parameters:{action:"show",id:id},onSuccess:showBoxPackage,onFailure:reqFailure});}
showBoxPackage=function(r){$('box_pauschalen_content').innerHTML=r.responseText;}
boxRestaurant=function(id){$('box_restaurantfuehrer_content').innerHTML='LOADING...';new Ajax.Request(JSROOT+'/req/restaurants.php',{method:"post",parameters:{action:"show",id:id},onSuccess:showBoxRestaurant,onFailure:reqFailure});}
showBoxRestaurant=function(r){$('box_restaurantfuehrer_content').innerHTML=r.responseText;}
function openGoogleMap(id){var url="/popup/map02.php?id="+id;window.open(url,"GoogleMap","width=520,height=400,top=50,left=50");}
function openGoogleMapRestaurant(id){var url="http://www.oa-aktuell.de/popup/map01.php?id="+id;window.open(url,"GoogleMap","width=620,height=500,top=50,left=50");}
function uc_set_cookie(k,v){ujar.put(k,v);}
function uc_get_cookie(k){return ujar.get(k);}