function init(){}function init_lightbox(){$(function(){$.Lightbox.construct({maxHeight:800,maxWidth:600,auto_resize:true,opacity:0.2,download_link:false,show_info:false,show_extended_info:false,text:{of:"von",close:"Beenden",image:"Bild",closeInfo:"Sie k�uml;nnen au&szlig;erhalb des Bildes klicken, um die Ansicht zu beenden."}})})}function init_detail(){$(".ct-expand").live("click",function(){var parent=$(this).closest(".ct-row");toggleNodeImg($(".ct-expand",parent));$(".li-m",parent).toggleClass("hide");$(".li-f",parent).toggleClass("show")});$("#navi_dbox").tabs();$("#container-1 > ul").tabs()}function init_edit(){jQuery(".ulsort_source > li").draggable({helper:"clone",connectToSortable:".ulsort_selection"});jQuery(".ulsort_selection").sortable();$("#listselected1").sortable({connectWith:["#listsource1"]});$("#listsource1").sortable({connectWith:["#listselected1"]});$("#listselected2").sortable({connectWith:["#listsource2"]});$("#listsource2").sortable({connectWith:["#listselected2"]});$(".srtinput_btnadd").click(function(){var itemtext=trim($(this).prev().attr("value"));if(itemtext==""){alert("Bitte geben Sie einen Text ein.");return false}else{var list=$(this.parentNode).prev().prev().prev().find("ul");list.append('<li id="new">'+itemtext+"</li>");$(this).prev().attr("value","")}})}function init_admuser(){$("#loader").hide();$(".tr-expand").click(function(){if(rootpath=="/"){var imgpath="/img/icons/"}else{var imgpath=rootpath+"/img/icons/"}var isFull=($(this).attr("src")==imgpath+"btn_close.gif")?true:false;if(isFull==false){var nodeimg=imgpath+"btn_close.gif";var nodeText="Verstecke Adressen";this.prevbgcolor=$(this.parentNode).parent().css("background-color");newbgcol=$(this.parentNode).parent().next().css("background-color");$(this.parentNode).parent().css({"background-color":newbgcol});$(this.parentNode).parent().next().show()}else{var nodeimg=imgpath+"btn_open.gif";var nodeText="Zeige Adressen";$(this.parentNode).parent().css({"background-color":this.prevbgcolor});$(this.parentNode).parent().next().hide()}$(this).attr({src:nodeimg,title:nodeText,alt:nodeText})})}function tglReiterContent(opt){var imgpath=rootpath+"/img/icons/";if(opt=="hide"){$(".li-m").show();$(".li-f").hide();$("#tglhide").hide();$("#tglshow").show();var nodeText="Zeige Adressen";var nodeimg=imgpath+"btn_open.gif"}else{$(".li-m").hide();$(".li-f").show();$("#tglhide").show();$("#tglshow").hide();var nodeText="Verstecke Adressen";var nodeimg=imgpath+"btn_close.gif"}$(".ct-expand").attr({src:nodeimg,title:nodeText,alt:nodeText})}function trim(str){str=str.replace(/^\n+/,"").replace(/\n+$/,"");str=str.replace(/^\r+/,"").replace(/\r+$/,"");str=str.replace(/^\s+/,"").replace(/\s+$/,"");return str}function toggleNodeImg(obj){var imgpath=rootpath+"img/icons";var isFull=($(obj).attr("src")==imgpath+"/btn_close.gif")?true:false;if(isFull==false){var nodeimg=imgpath+"/btn_close.gif";var nodeText="Verstecke Einträge"}else{var nodeimg=imgpath+"/btn_open.gif";var nodeText="Zeige alle Einträge"}$(obj).attr({src:nodeimg,title:nodeText,alt:nodeText})}function menuTop_on(obj){obj.style.backgroundImage="url(img/navi_dkg/right_on.gif)";obj.parentNode.style.backgroundImage="url(img/navi_dkg/left_on.gif)"}function menuTop_off(obj){obj.style.backgroundImage="url(img/navi_dkg/right.gif)";obj.parentNode.style.backgroundImage="url(img/navi_dkg/left.gif)"}function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);var exp=((expiredays==null)?"":";expires="+exdate.toGMTString());var ctext=c_name+"="+escape(value)+exp+"; path=/";document.cookie=ctext}function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function expandMatrixCol(btnid){var khid=btnid.substring(4),colminwidth=1,colmaxwidth=20;if($("#"+khid).attr("width")==colmaxwidth*3){tgtWidthKh=colminwidth*3;$("."+khid+"B").attr({width:colminwidth});$("."+khid+"BP").attr({width:colminwidth});$("."+khid+"P").attr({width:colminwidth})}else{tgtWidthKh=colmaxwidth;$("."+khid+"B").attr({width:colmaxwidth});$("."+khid+"BP").attr({width:colmaxwidth});$("."+khid+"P").attr({width:colmaxwidth})}$("#"+khid).attr({width:tgtWidthKh})}function getAddress(){var adr="";$(".gmapupdate").each(function(){adr+=$(this).text()+" "});return adr}function init_matrix(){$(document).ready(function(){$(".btn-expand").click(function(){toggleNodeImg(this);expandMatrixCol($(this).attr("id"))})})}function openWin(url,w,h,title){var wdw=window.open(url,title,"width="+w+", height="+h+", menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");if(window.focus){wdw.focus()}};
