

//(c)2008 ing.-buero bechler d-halle  www.ebechler.de  SimpleAjaxSystem  all rights reserved//
var imgP='img/';var CgiURL='a.php';var ReqType='POST';var SpwnPrf='ajax';var newChatTag='td';var cmsg='msg';var dfSp='|';var pingwav=imgP+'ping.wav';var telwav=imgP+'telephon.wav';var telimg=imgP+'telephon.png';var infoimg=imgP+'info.png';var infoimgm=imgP+'infom.png';var closeimg=imgP+'close.png';var closeimgm=imgP+'closem.png';var Focused=false;var AXUSRLst=null;var PRTW=null;var CgiPrm=new Array();var fMailto='&#109;&#97;&#105;&#108;&#116;&#111;&#58;';var fAt='&#64;';function trim(_s){if(_s)return _s.replace(/(^\s*)|(\s*$)/,'');}function isOnline(){return framework.system.network.online;}function getCookieVal(_name){var _cval='';var _a='';var _n=0;try{if(_name&&(_a=document.cookie)){_a='+'+_a;_n=_a.search(_name+'=');if(_n>0){_a=_a.substring(_n+_name.length+1,_a.length);_cval=_a.substring(0,_a.search(';'));if(!_cval)_cval=_a;}}}catch(_e){}return _cval;}function getURLParam(_Param){var _ret='';if(_Param){var _Href=window.location.href;if(_Href.indexOf('?')>-1){var _Query=_Href.substr(_Href.indexOf('?')).toLowerCase();var _aQuery=_Query.split('&');for(var _I=0;_I<_aQuery.length;_I++){if(_aQuery[_I].indexOf(_Param+'=')>-1){var _aParam=_aQuery[_I].split('=');_ret=_aParam[1];break;}}}}return _ret;}function getURL(){var _ret='';var _Href=(window.location.href).toLowerCase();if((_I=_Href.indexOf('?'))>-1)_ret=_Href.substr(0,_I);else _ret=_Href;if((_I=_Href.lastIndexOf('/'))>-1)_ret=_Href.substr(0,_I);else _ret=_Href;var _a=_ret.split('.');if(_a.length>1)_ret=_a[_a.length-2]+'.'+_a[_a.length-1];else _ret=_a[0];return _ret;}function EMlink(_EM,_Host){if(_EM&&_Host){var _S='';var _H='';var _I=0;var _N=_Host.indexOf('?');for(_I=0;_I<_EM.length;_I++)_S+='&#'+_EM.charCodeAt(_I)+';';_S+=fAt;for(_I=0;_I<_Host.length;_I++){_S+='&#'+_Host.charCodeAt(_I)+';';if(!_N||(_I<_N))_H+='&#'+_Host.charCodeAt(_I)+';';}document.write('<a href="'+fMailto+_S+'">'+_EM+fAt+_H+'</a>');}}function getDtaType(_DtaURL){if(_DtaURL){var _t=new Array();var _f='';_t=_DtaURL.split('.');if(_t&&_t.length-1){_f=_t[_t.length-2];_f=_f.toLowerCase();_f=_f.split('chat');_f=(_f.length-1?'r':'');_t=_t[_t.length-1];_t=_t.toLowerCase();switch(_t){case "jpg": return 'i';break;case "jpeg": return 'i';break;case "htm": return 'h';break;case "html": return 'h';break;case "sql": return 's';break;case "txt": return _f+'t';break;default: return _f+'t';break;}}}}function getValidNme(_nme){var _S='';var _I=0;var _C=' ';for(_I=0;_I<_nme.length;_I++)if((_C=_nme.charAt(_I))&&((_I&&(_C>='0')&&(_C<='9'))||((_C>='A')&&(_C<='Z'))||((_C>='a')&&(_C<='z'))||(_C=='_')))_S+=_C;return _S;}function getNmeInUsrLst(_nme){var _aS=AXUSRLst.split(dfSp);for(var _I=0;_I<_aS.length;_I++)if(_aS[_I]==_nme)return true;}function get_Time(){var _jtzt=new Date();return _jtzt.getTime();}function isInt(_s){if(_s){var _c=' ';for(var _i=0;_i<_s.length;_i++){_c=_s.charAt(_i);if((_c<'0')||(_c>'9'))return false;}return true;}};function extrctPath(_uri){if(_uri){var _lstSl=_uri.lastIndexOf("/");if(_lstSl&&(_uri=_uri.substring(0,_lstSl)))_uri+='/';}return _uri;}function extrct(_t,_tag){var _tt=new Array();_tt=_t.split('<'+_tag+'>');if(_tt.length-1){_tt=_tt[1].split('</'+_tag+'>');return _tt[0];}}var outtest=true;function testout(_m){if(outtest)if(document.getElementById('test')){if(_m)document.getElementById('test').innerHTML=_m;}else outtest=false;}var tubeCnt=0;function youtube(_ytObject,_width,_height){var _A=new Array();var _S='';var _opaie=0;var _opanie=_opaie/100.0;var _bigh=0.373;var _smallh=0.15;var _smallw=0.405;if(!_width){_A=_ytObject.split('width="');if(_A.length-1){_S=_A[1];_A=_S.split('"');_width=_A[0];}}if(!_height){_A=_ytObject.split('height="');if(_A.length-1){_S=_A[1];_A=_S.split('"');_height=_A[0];}}document.write('<div id="id'+tubeCnt+'" style="'+'position:relative;float:left;width:'+(_width)+'px;'+'height:'+(_height)+'px;'+'">'+'<div id="yto0">'+_ytObject+'</div>'+'<div id="yto1">'+'</div>'+'<div id="yto2">'+'</div>'+'<div id="yto3">'+'</div>'+'<div id="yto4">'+'</div>'+'<style>'+'div#id'+tubeCnt+' div#yto0{'+'position:absolute;'+'left:'+(0)+'px;'+'top:'+(0)+'px;'+'width:'+(_width)+'px;'+'height:'+(_height)+'px;'+'}'+'div#id'+tubeCnt+' div#yto1{'+'position:absolute;'+'left:'+(0)+'px;'+'top:'+(0)+'px;'+'width:'+(_width)+'px;'+'height:'+(_bigh*_height)+'px;'+'background-color:#def;'+'filter:alpha(opacity='+_opaie+');'+'opacity:'+_opanie+';'+'}'+'div#id'+tubeCnt+' div#yto2{'+'position:absolute;'+'left:'+(0)+'px;'+'top:'+((_smallh+_bigh)*_height)+'px;'+'width:'+(_width)+'px;'+'height:'+(1+_bigh*_height)+'px;'+'background-color:#def;'+'filter:alpha(opacity='+_opaie+');'+'opacity:'+_opanie+';'+'}'+'div#id'+tubeCnt+' div#yto3{'+'position:absolute;'+'left:'+(0)+'px;'+'top:'+(_bigh*_height)+'px;'+'width:'+(_smallw*_width)+'px;'+'height:'+(1+_smallh*_height)+'px;'+'background-color:#edf;'+'filter:alpha(opacity='+_opaie+');'+'opacity:'+_opanie+';'+'}'+'div#id'+tubeCnt+' div#yto4{'+'position:absolute;'+'left:'+((1-_smallw)*_width)+'px;'+'top:'+(_bigh*_height)+'px;'+'width:'+(_smallw*_width)+'px;'+'height:'+(1+_smallh*_height)+'px;'+'background-color:#edf;'+'filter:alpha(opacity='+_opaie+');'+'opacity:'+_opanie+';'+'}'+'</style>'+'</div>');tubeCnt++;}function printid(_pg,_id){var _attribWithoutAll="width=655,height=440,location=no,menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,dependent=no";if(PRTW&&!PRTW.closed)PRTW.close();PRTW=window.open('print.php?'+'pg='+_pg+'&id='+_id,'print',_attribWithoutAll);}function ChatInfo(){var _d='-    ';alert(' \nSimpleAjaxSystem  -  SimpleContentSystem    (c)2008 Ing.-Büro Bechler D-Halle    www.ebechler.de  \n\n'+'Erläuterung zum Chatobjekt:\n'+_d+'Einträge, die mit   "http://"   oder   "www."   beginnen werden als Link dargestellt.    \n'+_d+'Dateinamen mit Leerzeichen müssen in   "  "   eingeschlossen sein.\n'+_d+'jpg/gif(Bild)-Dateien werden angezeigt und mit einem Link versehen.\n'+_d+':-)    !-)    :-(    :-x    :-?    :-|    :-/    :-;    werden als Icon dargestellt.\n'+_d+'In   '+"'"+' | '+"'"+'   eingefasste Textteile werden als Zitat/Quelle formatiert.\n'+_d+'In   '+"'"+' _ '+"'"+'   eingefasste Textteile werden hervorgehoben.\n\n'+'Das erste Chatobjekt ist immer und für alle Teilnehmer sichtbar.  \nWenn Sie einen Aliasnamen eingeben, können Sie sich mit einzelnen Teilnehmern in neuen Chatobjekten verbinden.  ');}function createAjaxHandle(){var _e=null;var _ao=null;try{_ao=new ActiveXObject('Msxml2.XMLHTTP');}catch(_e){try{_ao=new ActiveXObject('Microsoft.XMLHTTP');}catch(_e){_ao=null;}}if(!_ao&&(typeof XMLHttpRequest!='undefined')){_ao=new XMLHttpRequest();_ao.overrideMimeType('text/xml');}if(!_ao)window.status="can not create ajax-obj-handle";return _ao;}CgiPrm=['dta','iie','fag','typ','dtp','usr','flg'];var tAX=function(_ParentID,_Interval,_DtaURL,_DtaWidth,_DtaHeight,_SndBut,_Spawned){var StdInterval=8000;var MinInterval=1000;var ChtDefIntv=4000;var MaxSzDnErrCnt=7;var DtaMinLenFac=0.8;var nobase64=false;var PraeLen=50;var PostLen=14;var DtaMinLen=1024;var c_usr='nme';var DtaParams='';var USR='';var USRNme='';var USRLst='';var SelfN='';var SS='';var Sender=false;var IgnoreAge=false;var IgnoreSize=false;var BellyRang=false;var Reloader=null;var HTMR=null;var WATCHDOG=null;var BUFF=null;var tmp=null;var _e=null;var Spawned=_Spawned;var SpawnPartner='';if(!isInt(_Interval)&&(_Interval>'')){Sender=true;if(_ParentID&&(tmp=document.getElementById(_ParentID))){tmp.onkeypress=sndShortKey;tmp.onfocus=focMe;tmp.onblur=bluMe;if(_DtaURL)tmp.focus();}if(_DtaWidth){if(tmp=document.getElementById(_DtaWidth)){if(!Spawned)tmp.onkeypress=sndShortKey;tmp.onfocus=focMe;tmp.onblur=bluMe;}USR=_DtaWidth;}if(_DtaHeight){Reloader=_DtaHeight;_DtaHeight='';}var DtaURL=(_Interval?_Interval:'');}else var DtaURL=(_DtaURL?_DtaURL:'');if(USRNme=getValidNme(getURLParam(c_usr)))if(!Spawned&&USR&&(tmp=document.getElementById(USR)))tmp.value=USRNme;if(!USRNme){USRNme=getCookieVal(c_usr);if(!Spawned&&USRNme&&USR&&(tmp=document.getElementById(USR)))tmp.value=USRNme;}var DefInterval=(_Interval>=MinInterval?_Interval:StdInterval);var ParentID=_ParentID;var DtaID=_ParentID+'ao';var DtaType=getDtaType(DtaURL);var DtaWidth='';var DtaHeight='';if(!Sender){if((_DtaWidth)<0){if(_DtaWidth<-1)_DtaWidth=-1*_DtaWidth;else _DtaWidth='';IgnoreAge=true;}if((_DtaHeight)<0){if(_DtaHeight<-1)_DtaHeight=-1*_DtaHeight;else _DtaHeight='';IgnoreSize=true;}else if((_DtaHeight>'')&&(!isInt(_DtaHeight))){SelfN=_DtaHeight;_DtaHeight='';}if(_DtaWidth)if(DtaType=='rt')USR=_DtaWidth;else DtaWidth=(!Sender&&_DtaWidth?_DtaWidth:'');DtaHeight=((_DtaHeight)?_DtaHeight:'');}var DtaFixDim=DtaWidth&&DtaHeight;var DtaWidthOrg=DtaWidth;var DtaHeightOrg=DtaHeight;var IMG=document.getElementById(DtaID);var is_ie=(navigator.appName.indexOf('Explorer')!=-1);if(DtaType=='i')try{BUFF=new Image;BUFF.onload=ie_dsplimg;}catch(_e){BUFF=null;}if(getURL()=='magdundknecht.de')nobase64=true;if(Sender){if(_SndBut&&(tmp=document.getElementById(_SndBut))){SS=tmp.innerHTML;tmp.innerHTML=(SS?SS:'send')+'&nbsp;'+'[enter]';}}else if(_SndBut)nobase64=true;var CgiFlags=(IgnoreAge?1:0)+(IgnoreSize?2:0);var wait=0;var CNT=0;var StrtTm=0;var ErrCnt=0;var DtaAge=0;var DtaLastLen=0;var ABusy=false;var invalid=false;var NxtInterval=DefInterval;var IntervalLast=DefInterval;var WatchDogInterval=DefInterval+40000;var shwinfo=true;var test=true;var testmin=true;var N0=0;var N1=0;var N2=0;function a_call(_url,_url_args){var _data=null;var _ao=null;var _i=0;if(ReqType=='GET'){for(_i=0;_i<_url_args.length-1;_i++)_url=_url+(_i==0?'&':'')+escape(_url_args[_i]);_data=null;}else{_data='';for(_i=0;_i<_url_args.length-1;_i++)_data=_data+(_data>''?'&':'')+_url_args[_i];}try{_ao=createAjaxHandle();_ao.open(ReqType,_url,true);_ao.setRequestHeader('Method',ReqType+' '+_url+' HTTP/1.1');_ao.setRequestHeader('Content-Type','application/x-www-form-urlencoded');_ao.setRequestHeader('Cache-Control','no-cache');_ao.onreadystatechange=function(){try{if(_ao&&(_ao.readyState==4))if(_ao.status&&(_ao.status==200)){_url_args[_url_args.length-1](_ao);}}catch(_e){}}_ao.send(_data);delete _ao;return 1;}catch(_e){testout(_e+':'+_url);}}function p_call(){if(!ABusy&&!invalid)try{return a_call(CgiURL,p_call.arguments);}catch(_e){}}function ie_dsplimg(){if(IMG&&BUFF&&BUFF.complete&&IMG.complete&&!invalid)IMG.src=BUFF.src;}function a_resp(_a){var _t='';var _s='';N1++;var tmp=null;if(Sender){try{if(_a){_t=_a.responseText;if(_t.length>PraeLen+PostLen){_t=_t.substr(PraeLen,_t.length-PraeLen-PostLen);_t=extrct(_t,'data');}}}catch(_e){}debug('send: '+_t);if(!Spawned&&Reloader)Reloader.SetUsrNme(USRNme);if(_t){if(Reloader)Reloader.show();CNT++;}return;}if(ABusy||invalid)NxtInterval=MinInterval;else{NxtInterval=DefInterval;try{ABusy=true;try{if(_a){_t=_a.responseText;if(_t.length>PraeLen+PostLen){var _age=0;var _size=0;var _data='';var _tag='';var _width=DtaWidth;var _height=DtaHeight;_t=_t.substr(PraeLen,_t.length-PraeLen-PostLen);_tag='data';_tt=_t.split('<'+_tag+'>');if(_tt.length-1){_ttt=_tt[1].split('</'+_tag+'>');_data=_ttt[0];}_t=_tt[0];_age=extrct(_t,'age');_size=extrct(_t,'size');if(!DtaFixDim){_width=extrct(_t,'width');_height=extrct(_t,'height');}if(DtaType!='i'){debug(DtaAge+'&lt;'+_age);_s=extrct(_t,'usrlst');if((USRLst!=_s)||!USRLst){if(tmp=document.getElementById(ParentID+'list'))tmp.innerHTML=buildUsrlst(_s);if(tmp=document.getElementById(ParentID+'ringlist'))tmp.innerHTML=buildRnglst(_s);if(!Spawned)AXUSRLst=_s;USRLst=_s;}_s=extrct(_t,'usrrng');myBell(_s);if(DtaAge<_age){document.getElementById(ParentID).innerHTML=_data;if(!_s&&!Focused&&DtaAge&&_data)myBelly();CNT++;ErrCnt=0;DtaAge=_age;DtaLastLen=_size;}else ErrCnt++;}else if(((_size<DtaMinLen)&&!IgnoreSize)||(!IgnoreAge&&(DtaAge>=_age))||(!is_ie&&!nobase64&&(_data.length<DtaMinLen))||((ErrCnt<MaxSzDnErrCnt)&&(!is_ie&&!nobase64&&!IgnoreSize&&(_size!=_data.length))||((_size<(DtaMinLenFac*DtaLastLen))&&!IgnoreSize))){debug();ErrCnt++;if(ErrCnt>2*MaxSzDnErrCnt)NxtInterval=DefInterval;else NxtInterval=MinInterval;}else{if((!IMG&&(tmp=document.getElementById(ParentID)))|| (!DtaFixDim&&((_width&&(_width!=DtaWidth))||(_height&&(_height!=DtaHeight))))){debug();tmp.innerHTML='<img'+' id="'+DtaID+'" alt=""'+(_width&&_height?' style="width: '+_width+'px; height: '+_height+'px;"':'')+' src="'+DtaURL+'" />';IMG=document.getElementById(DtaID);if(!DtaWidthOrg||!DtaHeightOrg){DtaWidthOrg=_width;DtaHeightOrg=_height;}DtaWidth=_width;DtaHeight=_height;}else if(IMG){if(CNT&&(!BUFF.complete||!IMG.complete))NxtInterval=MinInterval;else{CNT++;if(is_ie||nobase64)BUFF.src=DtaURL+"?i"+get_Time();else BUFF.src="data:image/jpeg;base64,"+_data;DtaLastLen=_size;DtaAge=_age;info();debug();}}if(DtaLastLen<DtaMinLen)DtaLastLen=DtaMinLen;if(ErrCnt&&(ErrCnt<2*MaxSzDnErrCnt))NxtInterval=MinInterval;ErrCnt=0;}}}}catch(_e){ABusy=false;NxtInterval=MinInterval;StartCall(true);}ABusy=false;StartCall(true);}catch(_e){ABusy=false;NxtInterval=MinInterval;StartCall(true);}ABusy=false;StartCall(true);}}function buildUsrlst(_l){var _a=new Array();var _r='';var _i=0;var _offLcl='#a99';var _offLcls='offLcl';_a=_l.split(dfSp);_r='<ul>';_r+='<li>'+'online:'+'</li>';if((_a.length==1)&&Spawned&&_a[0]&&(SpawnPartner!=_a[0])&&!((AXUSRLst+dfSp).search(_a[0]+'\\'+dfSp)+1))_r+='<li style="color:'+_offLcl+';"><span class="'+_offLcls+'">'+'['+_a[0]+']'+'</span></li>';else{if(!_a.length)_r+='<li>'+'&nbsp;'+'</li>';else{for(_i=0;_i<_a.length;_i++)if(_a[_i])if(!Spawned&&USRNme&&(USRNme!=_a[_i]))_r+='<li>'+'<a href="javascript:'+SelfN+'.spawn('+"'chat'"+', '+"'"+ParentID+"'"+', '+"'"+_a[_i]+"'"+')">'+_a[_i]+'</a>'+'</li>';else _r+='<li>'+_a[_i]+'</li>';}if(Spawned&&SpawnPartner&&!((_l+dfSp).search(SpawnPartner+'\\'+dfSp)+1))_r+='<li style="color:'+_offLcl+';"><span class="'+_offLcls+'">'+'['+SpawnPartner+']'+'</span></li>';}_r+='</ul>';return _r;}function buildRnglst(_l){var _a=new Array();var _r='';var _i=0;_a=_l.split(dfSp);if((_a.length-1)&&USRNme){_r+='<select id="'+ParentID+'ringlistselect'+'">';for(_i=0;_i<_a.length;_i++)if(_a[_i]&&(USRNme!=_a[_i]))_r+='<option>'+_a[_i]+'</option>';_r+='</select>';}else if(!USRNme)_r+='&nbsp;'+'alias!';else _r+='&nbsp;'+'nobody&nbsp;out&nbsp;there';return _r;}function StartCall(_Interval){if(HTMR){window.clearTimeout(HTMR);HTMR=null;}if(NxtInterval<MinInterval)NxtInterval=MinInterval;if(IntervalLast==MinInterval)NxtInterval=DefInterval;IntervalLast=NxtInterval;if(!invalid)HTMR=window.setTimeout(function(){ShowDta();},NxtInterval);}function StopCall(){if(HTMR){window.clearTimeout(HTMR);HTMR=null;}}function StartWatchDog(){if(WATCHDOG){window.clearTimeout(WATCHDOG);WATCHDOG=null;}if(!invalid)WATCHDOG=window.setTimeout(function(){ReStartByWatchDog();},WatchDogInterval);}function StopWatchDog(){if(WATCHDOG){window.clearTimeout(WATCHDOG);WATCHDOG=null;}}function ReStartByWatchDog(){if(!invalid){N2++;ABusy=false;ShowDta();}}function ShowDta(){try{if(CgiPrm[0]&&!invalid){N0++;StopCall();StopWatchDog();p_call(CgiPrm[0]+'='+DtaURL,CgiPrm[1]+'='+(is_ie||nobase64?'1':'0'),CgiPrm[2]+'='+(DtaAge?DtaAge:'0'),CgiPrm[3]+'='+(DtaType?DtaType:'f'),CgiPrm[4]+'='+(DtaParams?DtaParams:''),CgiPrm[5]+'='+(USRNme?USRNme:''),CgiPrm[6]+'='+(CgiFlags?CgiFlags:'0'),a_resp);StartWatchDog();}}catch(_e){}}function SendDta(_DtaParams,_Type){var tmp=null;if(!invalid&&(tmp=document.getElementById(ParentID))){if(_DtaParams)DtaParams=_DtaParams;else DtaParams=tmp.value;DtaParams=trim(DtaParams);var _USRNme='';tmp=null;if(USR&&(tmp=document.getElementById(USR))){_USRNme=getValidNme(tmp.value);if(_USRNme&&((_USRNme!=USRNme)||!USRNme)){if(getNmeInUsrLst(_USRNme)){if(!Spawned){tmp.value=USRNme;alert('\nAlias "'+_USRNme+'" used.'+(USRNme?'  Keep "'+USRNme+'".':''));}_USRNme=USRNme;}else if(USRNme!=_USRNme){USRNme=_USRNme;_USRNme='';tmp.value=USRNme;}}}if(!USRNme)if((USRNme=getValidNme(getURLParam(c_usr)))&&USR&&tmp)tmp.value=USRNme;if(DtaParams||(USRNme&&(USRNme!=_USRNme))){if(p_call(CgiPrm[0]+'='+DtaURL,CgiPrm[1]+'='+(is_ie||nobase64?'1':'0'),CgiPrm[2]+'='+(DtaAge?DtaAge:'0'),CgiPrm[3]+'='+(_Type?_Type:'apptxt'),CgiPrm[4]+'='+(DtaParams?DtaParams:''),CgiPrm[5]+'='+(USRNme?USRNme:''),a_resp)){document.getElementById(ParentID).value='';if(Reloader&&Reloader.GetBellyRang())Reloader.clearBell();}try{document.cookie=c_usr+'='+USRNme+';';}catch(_e){}}document.getElementById(ParentID).focus();}}function sndShortKey(_evnt){if(!_evnt)_evnt=window.event;if(_evnt.which)_key=_evnt.which;else _key=_evnt.keyCode;if(_evnt){var _sh=_evnt.ctrlKey||_evnt.altKey||_evnt.shiftKey;if((!_sh&&(_key==13))||(_evnt.ctrlKey&&((_key==77)||(_key==109)))){try{_evnt.preventDefault(true);}catch(_e){try{_evnt.keyCode=0;}catch(_e){}}SendDta();}}}function getInfoTag(){return ''+'<span id="'+SelfN+'info">'+'<a href="javascript:'+'ChatInfo()'+'"'+'>'+'<img src="'+infoimg+'" alt="info" border="0" '+'onmouseover="javascript:this.src='+"'"+infoimgm+"'"+'" onmouseout="javascript:this.src='+"'"+infoimg+"'"+'"'+' />'+'</a>'+'</span>';}function myBell(_l){var tmp=null;if(!invalid&&(tmp=document.getElementById(ParentID+'bell'))){if(!_l||((_l)<0)){if(CNT==0)if(!Spawned)tmp.innerHTML=getInfoTag();}else{tmp.innerHTML=(!Spawned?'<a href="javascript:'+SelfN+'.spawn('+"'chat'"+', '+"'"+ParentID+"'"+', '+"'"+_l+"'"+')">':'<a href="javascript:'+SpwnPrf+SelfN+'.clearBell()">')+'<img src="'+telimg+'" alt="telephone, ringing, '+_l+' '+'calling'+'" border="0" />'+_l+' '+'calling'+'</a>'+'<embed src="'+telwav+'" height="0" width="0" border="0" type="application/x-mplayer2" autostart="true" loop="false"></embed>';BellyRang=false;}}}function myBelly(){var tmp=null;if(!invalid&&(tmp=document.getElementById(ParentID+'bell'))){tmp.innerHTML='<a href="'+'javascript:'+(Spawned?SpwnPrf:'')+SelfN+'.clearBell()'+'"><img src="'+telimg+'" alt="telephone, ringing" border="0" /></a>'+'<embed src="'+pingwav+'" height="0" width="0" border="0" type="application/x-mplayer2" autostart="true" loop="false"></embed>';BellyRang=true;}}function clrBel(){var tmp=null;if(!invalid&&(tmp=document.getElementById(ParentID+'bell'))){tmp.innerHTML=(Spawned?'<a href="'+'javascript:'+SpwnPrf+SelfN+'.destroy()'+'">'+'<img src="'+closeimg+'" alt="close" border="0" /></a>':getInfoTag());BellyRang=false;}if(tmp=document.getElementById(SelfN+cmsg))tmp.focus();}function spawnChat(_object,_data){var tmp=null;var _S='';if(_data>USRNme)_S=_data+'_'+USRNme;else _S=USRNme+'_'+_data;clrBel();if(!invalid&&!document.getElementById(_S+newChatTag)){var _head=document.getElementsByTagName('head').item(0);var _parent=document.getElementById(_object).parentNode.parentNode;if(!_parent)_parent=document.getElementById(_object).parentNode;if(_head&&_parent){var _path=extrctPath(DtaURL);var _new=document.createElement(newChatTag);var _scrpt=document.createElement('script');_new.id=_S+newChatTag;_new.innerHTML='<div id="'+_S+'bell"'+' '+'style="height:28px;'+'"'+'>'+'<a href="'+'javascript:'+SpwnPrf+_S+'.destroy()'+'">'+'<img src="'+closeimg+'" alt="close" border="0" onmouseover="javascript:this.src='+"'"+closeimgm+"'"+'" onmouseout="javascript:this.src='+"'"+closeimg+"'"+'" />'+'</a>'+'</div>'+'<div id="'+_S+'list"'+' '+'style="height:16px;"'+'>'+'</div>'+'<textarea id="'+_S+cmsg+'"></textarea><br />'+'<nobr>'+'<button id="'+_S+cmsg+'but" onclick="javascript:'+SpwnPrf+_S+cmsg+'.send()">senden</button>'+'<button id="'+_S+cmsg+'ring" onclick="javascript:'+(Reloader?Reloader.GetSelfN():(SelfN?SelfN:SpwnPrf+_S))+'.ring('+"'"+_data+"'"+')">klingeln</button>'+'</nobr>'+'<div id="'+_S+'"></div>';_scrpt.type="text/javascript";_scrpt.id=_S+'src';_scrpt.text=SpwnPrf+_S+"=new tAX('"+_S+"', "+ChtDefIntv+", '"+_path+"chat"+_S+".txt', '"+USR+"', '"+_S+"', null, true);"+SpwnPrf+_S+cmsg+"=new tAX('"+_S+cmsg+"', '"+_path+"chat"+_S+".txt', true, '"+USR+"', "+SpwnPrf+_S+", '"+_S+cmsg+"but', true);"+SpwnPrf+_S+".SetSpawnPartner('"+_data+"');"+SpwnPrf+_S+cmsg+".SetSpawnPartner('"+_data+"');"+SpwnPrf+_S+".show();"+(USRNme?SpwnPrf+_S+".send();":"");_parent.appendChild(_new);_head.appendChild(_scrpt);}}if(_S&&(tmp=document.getElementById(_S+cmsg)))tmp.focus();}function destruct(){var tmp=null;if(tmp=document.getElementById(SelfN+newChatTag)){var _head=document.getElementsByTagName('head').item(0);var _parent=document.getElementById(ParentID).parentNode.parentNode;if(!_parent)_parent=document.getElementById(ParentID).parentNode;if(_parent)_parent.removeChild(tmp);if(_head)_head.removeChild(document.getElementById(SelfN+'src'));}}function freeme(){invalid=true;if(HTMR){window.clearTimeout(HTMR);HTMR=null;}if(WATCHDOG){window.clearTimeout(WATCHDOG);WATCHDOG=null;if(Sender)if(ParentID&&(tmp=document.getElementById(ParentID))){tmp.onkeypress=null;tmp.onfocus=null;tmp.onblur=null;}if(!Spawned&&Reloader)Reloader.free();tmp=null;IMG=null;BUFF=null;}}function focMe(){Focused=true;testout('FOC');}function bluMe(){Focused=false;testout('BLU');}function _ToggleSize(_width,_height){var tmp=null;if(IMG&&_width&&_height&&(tmp=document.getElementById(ParentID))){if((DtaWidth!=DtaWidthOrg)||(DtaHeight!=DtaHeightOrg)){tmp.innerHTML='<img'+' id="'+DtaID+'" alt=""'+(DtaWidthOrg&&DtaHeightOrg?' style="width: '+DtaWidthOrg+'px; height: '+DtaHeightOrg+'px;"':'')+' src="'+DtaURL+'" />';DtaWidth=DtaWidthOrg;DtaHeight=DtaHeightOrg;}else{tmp.innerHTML='<img'+' id="'+DtaID+'" alt=""'+(_width&&_height?' style="width: '+_width+'px; height: '+_height+'px;"':'')+' src="'+DtaURL+'" />';DtaWidth=_width;DtaHeight=_height;}IMG=document.getElementById(DtaID);}}function debug(_m){if(test){var tmp=null;if(tmp=document.getElementById(ParentID+'test')){var _msperimg=0;var _msg='';if(CNT>2)if(!StrtTm)StrtTm=get_Time();else if(CNT>3)_msperimg=(get_Time()-StrtTm)/(1000*(CNT-3));tmp.innerHTML=(testmin?(Sender?'&lt;':'&gt;')+ParentID+' #'+CNT+' '+DtaType+' '+(is_ie?'ie':'nie')+' '+DtaURL+' '+'err'+(ErrCnt?ErrCnt:'0')+' '+N2+'r '+_msperimg.toPrecision(4)+'s '+DtaLastLen+'b'+(_m&&(Sender)?' '+_m:'')+(_msg?' &gt;'+_msg+'&lt;':''):(_m?_m+'<br>':'')+'DtaAge: '+DtaAge+'<br>'+(is_ie||nobase64?'is ie':'not ie')+' #'+CNT+', '+N2+'r '+N0+' '+N1+' '+_msperimg.toPrecision(4)+'s<br>'+'DtaURL: '+DtaURL+'<br>'+'CgiURL: '+CgiURL+'<br>'+'ParentID: '+ParentID);}else test=false;}}function info(){if(shwinfo){var tmp=null;if(tmp=document.getElementById(ParentID+'info')){var _msperimg=0;if(CNT>2)if(!StrtTm)StrtTm=get_Time();else if(CNT>3)_msperimg=(get_Time()-StrtTm)/(1000*(CNT-3));tmp.innerHTML=CNT+(_msperimg?'/'+_msperimg.toPrecision(2):'');}else shwinfo=false;}}this.GetParentID=function(){return ParentID;}this.GetSelfN=function(){return SelfN;}this.foc=function(){focMe();}this.blu=function(){bluMe();}this.GetBellyRang=function(){return BellyRang;}this.ToggleImgSize=function(_width,_height){_ToggleSize(_width,_height);}this.ToggleSize=function(_width,_height){_ToggleSize(_width,_height);}this.SetUsrNme=function(_UsrNme){_UsrNme=getValidNme(_UsrNme);if(_UsrNme&&(USRNme!=_UsrNme))USRNme=_UsrNme;}this.SetSpawnPartner=function(_SP){SpawnPartner=_SP;}this.GetSpawnPartner=function(){return SpawnPartner;}this.rawRequest=function(_URL,_Method,_Params,_ResponseFUNC){if(!ABusy&&_URL)try{if(_Method)ReqType=_Method.toUpperCase();DtaURL=_URL;CgiURL=_URL;return p_call(_URL,_Params,_ResponseFUNC);}catch(_e){}}this.ring=function(){var _usr=arguments[0];if(!_usr&&Reloader&&(_usr=document.getElementById(Reloader.GetParentID()+'ringlistselect')))if(_usr.options[_usr.options.selectedIndex].value)_usr=_usr.options[_usr.options.selectedIndex].value;else _usr=_usr.options[_usr.options.selectedIndex].text;if(_usr){SendDta(_usr,'ring');spawnChat(ParentID,_usr);}}this.spawn=function(_type,_object,_data){if(_object&&document.getElementById(_object))switch(_type){case "chat": spawnChat(_object,_data);break;default: spawnChat(_object,_data);break;}}this.clearBell=function(){clrBel();}this.destroy=function(){destruct();freeme();}this.free=function(){freeme();}this.sndShKy=function(_evt){sndShortKey(_evt);}this.send=function(){SendDta();}this.show=function(_focus){ShowDta();}}var tIMG=function(_ParentID,_Interval,_DtaURL,_DtaWidth,_DtaHeight){var ParentID=_ParentID;var Interval=_Interval;var DtaURL=_DtaURL;var DtaWidth=_DtaWidth;var DtaHeight=_DtaHeight;var DtaWidthOrg=DtaWidth;var DtaHeightOrg=DtaHeight;var NxtInterval=Interval;var MinInterval=1000;var DtaID=_ParentID+'ao';var IMG=document.getElementById(DtaID);var HTMR=null;var BUFF=null;var StrtTm=0;var CNT=0;var invalid=false;var TEST=true;var N0=0;function ie_dsplimg(){if(IMG&&BUFF&&!invalid)if(BUFF.complete){IMG.src=BUFF.src;CNT++;debug();}}function showMe(){var tmp=null;if(HTMR){window.clearTimeout(HTMR);HTMR=null;}if(!IMG){IMG=document.getElementById(DtaID);if(!IMG){if(tmp=document.getElementById(ParentID))tmp.innerHTML='<img'+' '+'id="'+DtaID+'" '+'alt=""'+(DtaWidth&&DtaHeight?' style="width:'+DtaWidth+'px; height:'+DtaHeight+'px;"':'')+' src="'+DtaURL+'"'+' '+'/>';IMG=document.getElementById(DtaID);}}if(!BUFF){BUFF=new Image;BUFF.onload=ie_dsplimg;}if(IMG&&BUFF){if(CNT&&(!BUFF.complete||!IMG.complete)){if(NxtInterval!=MinInterval)NxtInterval=MinInterval;}else{BUFF.src=DtaURL+"?i"+get_Time();if(!BUFF.complete&&(NxtInterval!=MinInterval)){if(CNT)N0++;NxtInterval=MinInterval;}else NxtInterval=Interval;}if(!invalid)HTMR=window.setTimeout(function(){showMe();},NxtInterval);}}function _ToggleSize(_width,_height){var tmp=null;if(IMG&&_width&&_height&&(tmp=document.getElementById(ParentID))){if((DtaWidth!=DtaWidthOrg)||(DtaHeight!=DtaHeightOrg)){tmp.innerHTML='<img'+' id="'+DtaID+'" alt=""'+(DtaWidthOrg&&DtaHeightOrg?' style="width:'+DtaWidthOrg+'px; height:'+DtaHeightOrg+'px;"':'')+' src="'+DtaURL+'" />';DtaWidth=DtaWidthOrg;DtaHeight=DtaHeightOrg;}else{tmp.innerHTML='<img'+' id="'+DtaID+'" alt=""'+(_width&&_height?' style="width:'+_width+'px; height:'+_height+'px;"':'')+' src="'+DtaURL+'" />';DtaWidth=_width;DtaHeight=_height;}IMG=document.getElementById(DtaID);}}function debug(_m){var tmp=null;if(TEST)if(!(tmp=document.getElementById(ParentID+'test')))TEST=false;else{var _msperimg=0;if(CNT)if(CNT==1)StrtTm=get_Time();else _msperimg=(get_Time()-StrtTm)/(1000*(CNT-1));tmp.innerHTML='&gt;'+ParentID+' #'+CNT+' '+DtaURL+' e'+N0+' '+_msperimg.toPrecision(4)+'s'+(_m?' '+_m:'')+(NxtInterval==MinInterval?' *':'');}}this.ToggleImgSize=function(_width,_height){_ToggleSize(_width,_height);}this.ToggleSize=function(_width,_height){_ToggleSize(_width,_height);}this.free=function(){invalid=true;IMG=null;BUFF=null;if(HTMR){window.clearTimeout(HTMR);HTMR=null;}}this.show=function(){showMe();}}var tGAL=function(){var GALParent=document.getElementById(arguments[0]);var GALParentID=arguments[0];var GALfloat=arguments[2];var GALpadding=arguments[3];var GALpath=arguments[4];var GALobject=arguments[1];var GALargcnt=5;var GALshwcnt=3;var GALidx=0;var GALfac=1.0;var GALminidiv=8;var GALmaxRetry=16;var GALcreated=false;var GALfull=false;var GALimgs=null;var HTMR=null;var _N=0;var _e=null;init(arguments);function init(_args){if(_args&&(_args.length>GALargcnt)){GALimgs=new Array();var _maxI=GALshwcnt;var _S='<nobr>';var _I=0;var _B=0;for(_I=0;_I<_maxI;_I++)_S+='<img id="img'+GALParentID+_I+'" src="" alt="" '+(GALpadding?'style="margin-'+(GALfloat?'bottom':'right')+':'+GALpadding+'px; cursor:pointer; display:none;" ':'')+(!_I?'onclick="javascript:'+GALobject+'.showprior();" ':(_I==_maxI-1?'onclick="javascript:'+GALobject+'.shownext();" ':'onclick="javascript:'+GALobject+'.showfull();" '))+'/>';_S+='</nobr>';GALParent.innerHTML=_S;_I=_args.length-1;initGal(_args.length-GALargcnt-1,_args[_I]);for(_I=GALargcnt;_I<_args.length-1;_I++)if(_args[_I]){initGal(_B,_args[_I]);_B++;}GALidx=GALimgs.length-1;}}function initGal(_B,_src){if(_src){GALimgs[_B]=new Image();if(_src.substring(0,6).toLowerCase()=='http:/')GALimgs[_B].src=_src;else GALimgs[_B].src=GALpath+_src;return true;}}function mouseover0(){try{this.width=1.1*GALimgs[GALidx].width/GALminidiv;this.height=1.1*GALimgs[GALidx].height/GALminidiv;}catch(_e){}}function mouseout0(){try{this.width=GALimgs[GALidx].width/GALminidiv;this.height=GALimgs[GALidx].height/GALminidiv;}catch(_e){}}function mouseover2(){_N=valIdx(GALidx+GALshwcnt-1);try{this.width=1.1*GALimgs[_N].width/GALminidiv;this.height=1.1*GALimgs[_N].height/GALminidiv;}catch(_e){}}function mouseout2(){_N=valIdx(GALidx+GALshwcnt-1);try{this.width=GALimgs[_N].width/GALminidiv;this.height=GALimgs[_N].height/GALminidiv;}catch(_e){};}function valIdx(_N){if(_N<0)return GALimgs.length-1;else if(_N>=GALimgs.length)return 0;else return _N;}function showGal(){if(HTMR){window.clearTimeout(HTMR);HTMR=null;}if(GALParent&&GALimgs){var _img=null;var _ioc=0;var _I=0;var _N=0;var _maxI=(GALshwcnt<GALimgs.length?GALshwcnt:GALimgs.length);if(GALmaxRetry)GALfull=false;else if(arguments.length)GALfull=arguments[0];GALminidiv=(GALfull?4:8);_N=GALidx;for(_I=0;_I<_maxI;_I++)if(_img=document.getElementById('img'+GALParentID+(_I))){if(!_I){_img.onmouseover=mouseover0;_img.onmouseout=mouseout0;}else if(_I==_maxI-1){_img.onmouseover=mouseover2;_img.onmouseout=mouseout2;}_N=valIdx(_N);if(GALimgs[_N].width){if(!_I||(_I==_maxI-1)){_img.width=GALimgs[_N].width/GALminidiv;_img.height=GALimgs[_N].height/GALminidiv;}else{_img.width=GALimgs[_N].width/(GALfull?1:2);_img.height=GALimgs[_N].height/(GALfull?1:2);}try{_img.src=GALimgs[_N].src;if(_img.complete){_ioc++;_img.style['display']=(GALfloat?'block':'inline');}}catch(_e){}}_N++;}if(_ioc!=_maxI)start();else GALmaxRetry=0;}}function start(){if(GALmaxRetry>0){HTMR=window.setTimeout(showGal,1000);GALmaxRetry--;}}this.showprior=function(){GALidx--;if(GALidx<0)GALidx=GALimgs.length-1;showGal();}this.shownext=function(){GALidx++;if(GALidx>=GALimgs.length)GALidx=0;showGal();}this.showfull=function(){showGal(!GALfull);}this.show=function(){start();}}
