(function($) { $.fn.replaceSnippet = function(url,languagelocal){ var lang = (languagelocal == undefined) ? "de" : languagelocal; if (languagelocal == undefined && language) { lang = language; } var element = this; url = url.split('%3F').join('&'); element_width = $(element).width(); $(element).html('

<\/a>';
}
else {
document.getElementById('content-link-' + element).innerHTML = '
<\/a>';
}
$("#bs-content-" + element).slideToggle("fast");
}
function toggleNavi(element, name) {
if (document.getElementById("left-subnavi-" + element).style.display == 'block' || document.getElementById("left-subnavi-" + element).style.display == '') {
document.getElementById('link-' + element).innerHTML = '' + name + ' <\/a> ';
}
else {
document.getElementById('left-navi-' + element).innerHTML = '' + name + ' <\/a> ';
}
$(".subnav").slideUp("fast");
$(".sub0").removeClass("activehover");
$("#left-subnavi-" + element).slideDown("fast");
$("#left-navi-" + element).addClass("activehover");
}
/* Default Size of Columns */
var def_col_links = 0;
var def_col_rechts = 0;
function resetPadding() {
$('#column-1').css('padding-bottom','0px');
$('#column-2').css('padding-bottom','0px');
}
function formatItem(row) {
return '';
}
function formatResult(row) {
return row[0].replace(/(<.+?>)/gi, '');
}
function ac_jump(url) {
window.location.href = url;
}
$(document).ready(function() {
$("#keyword2").attr('autocomplete','off');
$("#keyword2").autocomplete("/api/schnellsuche.html", {
width: 182,
minChars: 3,
multiple: true,
matchContains: true,
cacheLength: 0,
autoFill: false,
scroll: true,
scrollHeight: 300,
formatItem: formatItem,
formatResult: formatResult
});
});
function updateSearch(value) {
search = $("#keyword2").val();
if (search.length >= 3 && search != value) {
// Zeitverzögert prüfen, sodass nicht mehrere Abfragen gleichzeitig gestartet werden, 0.7sec
window.setTimeout('updateSearch("'+search+'")', 100);
}
else if (search.length >= 3) {
$("#searchresult").show();
// $("#searchresult").html('loading ...');
$.ajax({
type: "GET",
async: false,
url: "/informationen/services/schnellsuche.html",
data: "textsearch="+search,
success: function(msg){
if (msg.length > 2) {
$("#searchresult").html(msg);
}
}
});
}
else {
$("#searchresult").html("");
$("#searchresult").hide();
}
}
function toggleTopicnavi(type,update) {
if (type == 0) {
$(".close-topic").hide();
$("#tshow").show();
$("#thide").hide();
$("#topiclinks").css("height","42px");
if (update == 1) { $("#debug").load("/rd/" + language + "/saveview/?topnavi=0");}
}
else {
$(".close-topic").show();
$("#tshow").hide();
$("#thide").show();
$("#topiclinks").css("height","116px");
if (update == 1) { $("#debug").load("/rd/" + language + "/saveview/?topnavi=1");}
}
}
function closeEmo(element) {
$("#" + element).hide();
$("#debug").load("/api/emobanner.html?banner=" + element)
}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
function displayOverlay() {
var arrayPageSize = getPageSize();
document.getElementById('dialogoverlay').className = 'pageoverlay';
document.getElementById('dialogoverlay').style.display = 'block';
document.getElementById('dialogoverlay').style.height = arrayPageSize[1] + 'px';
}
function closeOverlay() {
document.getElementById('dialogoverlay').className = '';
document.getElementById('dialogoverlay').style.display = 'none';
}
function displayImage(imgname, width) {
var arrayPageSize = getPageSize();
document.getElementById('dialogoverlay').className = 'pageoverlay';
document.getElementById('dialogoverlay').style.display = 'block';
document.getElementById('dialogoverlay').style.height = arrayPageSize[1] + 'px';
document.getElementById('displayImage').innerHTML = '