document.observe('dom:loaded', init);function init() {var containerElement = $('container');alignFooter(containerElement);setWindowName();stretchTeaserHeight(containerElement);initSearch();}
function alignFooter(holderElement) {var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;if ($(holderElement).offsetHeight + 195 < height) {if(navigator.appVersion.indexOf("MSIE 6")>-1){$(holderElement).style.height = (height - 343) + "px";} else {$(holderElement).style.minHeight = (height - 343) + "px";}
}
}
function setWindowName() {window.name = 'psi';}
function stretchTeaserHeight(holderElement) {holderElement.select(".teaser-cols-holder").each(function(element) {var max = 0;var boxes = element.childElements();for( var i = 0; i < boxes.length; i++) {max = Math.max(max, boxes[i].getHeight());}
for( var i = 0; i < boxes.length; i++) {boxes[i].setStyle({height: (max - 2) + 'px'
});}
});}
function initSearch() {$('browsebox').down('span.search').observe('click', function(){var element = $('browsebox').down('div.overlay');Effect.toggle(element, 'appear', { delay: 0.1 });});var search_field = $('suchbegriff');if (search_field) {search_field.observe("focus", function() {if (this.title == this.value) {this.value = "";}
});search_field.observe("blur", function() {if ("" == this.value) {this.value = this.title;}
});}
}
function set_li_href(holder, tag) {holder = $(holder);if (!holder) {return;}
tag = tag || "li";var lis = holder.getElementsByTagName(tag);alert(lis.length);for (var i = 0; i < lis.length; i++) {if ("A" == lis[i].firstChild.nodeName
&& (lis[i].firstChild.nextSibling == null || lis[i].firstChild.nextSibling.nextSibling == null)) {alert('clickwindow');Event.observe(lis[i], "click", function(e){Event.stop(e);el = Event.element(e);if ("A" != el.nodeName) {el = el.firstChild;}
if ("window" == el.className) {alert('window');window.open(el.href, "psiwindow", "width=450,height=600,scrollbars=yes");} else {alert('nixwindow');window.location.href = el.href;}
});}
}
}
function goback(){history.back(-1);}
function sClick(p) {var sDate = new Date();var live2img = document.getElementById('live2Image');if (!live2img) {live2img = document.createElement("img");live2img.id = "live2Image";live2img.width = "1";live2img.height = "1";live2img.border = "0";live2img.alt = "";var body = document.getElementsByTagName("body")[0];body.appendChild(live2img);}
live2img.src = "php/stat.php?" + p + "&_t=" + sDate.getTime();}
function select_bugfix(action) {var iev = navigator.userAgent.match(/MSIE ?([0-9\.]+)/);if (document.all && iev && iev[1] < 7) {for (var i = 0; i < document.all.tags('SELECT').length; i++) {obj = document.all.tags('SELECT')[i];if (!obj || !obj.offsetParent) continue;if (action == 'hide') {obj.style.visibility = "hidden";} else {obj.style.visibility = "visible";}
}
}
}
function show_tooltip(element, action) {if (action == 'hide') {select_bugfix('show');var holder = $("help_tooltip_holder");if (holder) {holder.style.display = "none";}
} else {select_bugfix('hide');var holder = $("help_tooltip_holder");if (!holder) {holder = document.createElement("div");holder.id = "help_tooltip_holder";document.getElementsByTagName("body")[0].appendChild(holder);}
holder.innerHTML = element.nextSibling.innerHTML;holder.style.display = "block";var pos = Element.cumulativeOffset(element);holder.style.top = 20 + pos[1] + "px";holder.style.left = -120 + pos[0] + "px";}
}
var Popup = {open: function(options)
{this.options = {url: '#',width: 380,height: 600,name:"PSIitemap",location:"no",menubar:"no",toolbar:"no",status:"yes",scrollbars:"yes",resizable:"no",left:"",top:"",normal:false
}
Object.extend(this.options, options || {});if (this.options.normal){this.options.menubar = "yes";this.options.status = "yes";this.options.toolbar = "yes";this.options.location = "yes";}
this.options.width = this.options.width < screen.availWidth?this.options.width:screen.availWidth;this.options.height = this.options.height < screen.availHeight?this.options.height:screen.availHeight;var openoptions = 'width='+this.options.width+',height='+this.options.height+',location='+this.options.location+',menubar='+this.options.menubar+',toolbar='+this.options.toolbar+',scrollbars='+this.options.scrollbars+',resizable='+this.options.resizable+',status='+this.options.status
if (this.options.top!="")openoptions+=",top="+this.options.top;if (this.options.left!="")openoptions+=",left="+this.options.left;window.open(this.options.url, this.options.name, openoptions);return false;}
}