
﻿
function ei(id){return document.getElementById(id);}
function MM_openWin(title,url,w,h){var openWin=null;openWin=window.open(url,title,'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h);if(openWin.focus!==null){openWin.focus();}
return false;}
function Radio_Check(){for(var i=0;i<document.getElementsByTagName("label").length;i++){var lbl=document.getElementsByTagName("label")[i];if(lbl.htmlFor!==""){var rb=ei(lbl.htmlFor);if(rb){if(rb.type=="radio"){if(rb.checked){lbl.style.fontWeight="bold";}else{lbl.style.fontWeight="normal";}}}}}}
function Radio_AddEvent(){for(var i=0;i<document.getElementsByTagName("label").length;i++){var lbl=document.getElementsByTagName("label")[i];if(lbl.htmlFor!==""){var rb=ei(lbl.htmlFor);if(rb){if(rb.type=="radio"){if(typeof rb.onclick!='function'){rb.onclick=function(){Radio_Check();};}
if(rb.checked){lbl.style.fontWeight="bold";}else{lbl.style.fontWeight="normal";}}}}}}
function change_lbl(tb,id){var cb=ei(id);if(tb&&cb){if(!cb.checked&&tb.value!==''){cb.checked=true;Radio_OnClick(cb);}}}
function change_lbl_id(tb_id,id){var tb=ei(tb_id);change_lbl(tb,id);}
function Checkbox_OnClick(o){for(var i=0;i<document.getElementsByTagName("label").length;i++){var lbl=document.getElementsByTagName("label")[i];if(lbl.htmlFor==o.id){var cb=ei(lbl.htmlFor);if(cb){if(cb.type=="checkbox"){if(cb.checked){lbl.style.fontWeight="bold";}else{lbl.style.fontWeight="normal";}}}}}}
function Checkbox_AddEvent(){for(var i=0;i<document.getElementsByTagName("label").length;i++){var lbl=document.getElementsByTagName("label")[i];if(lbl.htmlFor!==""){var cb=ei(lbl.htmlFor);if(cb){if(cb.type=="checkbox"){if(typeof cb.onclick!='function'){cb.onclick=function(){Checkbox_OnClick(this);};}
if(cb.checked){lbl.style.fontWeight="bold";}else{lbl.style.fontWeight="normal";}}}}}}
function cv_MemoLength(s,a){a.IsValid=(a.Value.length<=2000);}
function cv_MemoLength4(s,a){a.IsValid=(a.Value.length<=4000);}
function postit(name,var0,var1,var2,var3,css){var adress=var2+'@'+var1+'.'+var0;var href=adress;if(var3){href=adress+'?subject='+var3;}
if(css){css=' class="'+css+'"';}
if(name){adress=name;}
return'<a href="mailto:'+href+'"'+css+'>'+adress+'</a>';}
function ol(text,title){return overlib(text,CAPTION,title,ABOVE);}
function getPosition(element)
{var elem=element,tagname="",x=0,y=0;if(elem){while((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined")){y+=elem.offsetTop;x+=elem.offsetLeft;tagname=elem.tagName.toUpperCase();if(tagname=="BODY"){elem=0;}
if(typeof(elem)=="object"){if(typeof(elem.offsetParent)=="object"){elem=elem.offsetParent;}}
if(!elem){break;}}}
position=new Object();position.x=x;position.y=y;return position;}
function SetVisible(o,d){if(o){if(!d){d='';}
o.style.visibility='visible';o.style.display=d;}}
function SetHidden(o){if(o){o.style.visibility='hidden';o.style.display='none';}}
function SetVisibility(o,v){if(v){SetVisible(o,'');}else{SetHidden(o);}}
function isChanged(){return true;}
function onchange_SMS(ddl){ddl=ei(ddl);if(ddl){SetVisibility(ei('ErinnerungSMSTel'),(ddl.value>0));}}
function isObj(obj){return(typeof(obj)=='object'&&obj!==null);}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
position=new Object();position.x=scrOfX;position.y=scrOfY;return position;}
function Fensterhoehe(){if(window.innerHeight){return window.innerHeight;}else if(document.body&&document.body.offsetHeight){return document.body.offsetHeight;}else if(screen.availHeigh){return screen.availHeight-(screen.availHeight*0.10);}else{return 800;}}
function showOverlay(id_ol,id_box){var ol=ei(id_ol);var box=ei(id_box);var scr=getScrollXY().y;if(box&&ol){ol.className='';ol.style.display='block';box.style.display='block';box.style.height='';box.style.top='';ol.style.top=scr+'px';if(scr>60){box.style.top=(scr+60)+'px';}
var h=Fensterhoehe();h-=(h*0.20);if(h<box.clientHeight){box.style.height=h+'px';box.style.top=(scr+60)+'px';}
if(ei('css_top')){ei('css_top').value=box.style.top;}
if(ei('css_height')){ei('css_height').value=box.style.height;}
var b=document.getElementsByTagName('body')[0];if(b){b.style.overflow='hidden';}}}
function hideOverlay(id_ol,id_box){var ol=ei(id_ol);var box=ei(id_box);if(box&&ol){ol.style.display='none';box.style.display='none';box.style.height='';}
var b=document.getElementsByTagName('body')[0];if(b){b.style.overflow='';}}
function showAbfrage(){showOverlay("tl_ol","tl_abfrage");}
function hideAbfrage(){hideOverlay("tl_ol","tl_abfrage");var ol=ei("tl_ol");if(ol){ol.onclick=null;}}
function conc(v1,v2,sep){var sRet=v1;if(v1!==''&&v2!==''){sRet+=sep;}
sRet+=v2;return sRet;}
function concatenate(v1,v2,sep){return conc(v1,v2,sep);}
function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}
catch(e1){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e2){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
function abortAjax(xmlHttp){if(xmlHttp){xmlHttp.abort();xmlHttp=null;}}
var xmlHttpCalendar;function callbackCalendar(){if(xmlHttpCalendar.readyState==4&&xmlHttpCalendar.status==200){var bProxy=false;var bMT=false;var jsondata=eval('('+xmlHttpCalendar.responseText+')');var sId;var sClass;var obj;for(var i=0;i<jsondata.results.length;i++){sId=jsondata.results[i].id;sClass=jsondata.results[i].value;obj=ei('cd'+sId);if(obj){obj.className=sClass;}
if(sClass=='calvt'){bProxy=true;}
if(sClass=='calmt'){bMT=true;}}
SetVisibility(ei('calProxy'),bProxy);SetVisibility(ei('calMT'),bMT);obj=ei('calLegende');if(!obj){obj=ei('calAX');}
if(obj){obj.className='';}}}
function axGetCalendar(p,f){xmlHttpCalendar=GetXmlHttpObject();if(xmlHttpCalendar===null){alert("Your browser does not support AJAX!");return;}
f=f?f:'calendar';var obj=ei('calLegende');if(!obj){obj=ei('calAX');}
if(obj){obj.className='ax';}
var url='ctr/ajax/'+f+'.aspx?'+p;url+='&sid='+Math.random();url=(f=='calendar')?'../'+url:url;xmlHttpCalendar.onreadystatechange=callbackCalendar;xmlHttpCalendar.open("GET",url,true);xmlHttpCalendar.send(null);}
var ASPForm_PostBack=false;var ASPForm_Wait=null;function GET_aspForm(){var frm=document.forms['aspnetForm'];if(!frm){frm=document.aspnetForm;}
return frm;}
function ChangeOnSubmit(){var aspForm=GET_aspForm();ASPForm_PostBack=false;if(aspForm){var oldfunction=aspForm.onsubmit;if(typeof oldfunction=='function'){aspForm.onsubmit=function(){if(ASPForm_PostBack){return false;}
if(oldfunction()===false){return false;}
ASPForm_PostBack=true;if(typeof ASPForm_Wait=='function'){ASPForm_Wait();}};}else{aspForm.onsubmit=function(){if(ASPForm_PostBack){return false;}
ASPForm_PostBack=true;if(typeof ASPForm_Wait=='function'){ASPForm_Wait();}};}}}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=function(){func();};}else{window.onload=function(){oldonload();func();};}}
