
function createLightbox(url,myWidth,myHeight,pageid){if(myHeight==''||myHeight<1){myHeight=500;}
if(myWidth==''||myWidth<1){myWidth=800;}
var Ergebnis=url.search(/travel.+/);if(Ergebnis!=-1){var myobj=new AjaxClass();myobj.init({url:'/Ajax/getText.asp',data:'pageid='+pageid,success:function(msg){var objLightbox=new lightbox();objLightbox.init({html:'<div style="padding:10px;width:'+myWidth+'px;height:'+myHeight+'px;overflow:auto">'+msg+'</div>',height:(myHeight+20),width:(myWidth+20)});},ErrorDeBugging:true,onError:function(fnErro){alert('Fehler: Die URL konnte nicht geöffnet werden.('+fnErro+')');}});}else{if(isBuero){var objLightbox=new lightbox();objLightbox.init({html:'<iframe src="'+url+'" name="mybox" frameborder="0" scrolling="auto" align="center" scrollbarvisable="no" style="background-color:transparent;padding-top:0;width:'+myWidth+'px;height:'+myHeight+'px"><p>Ihr Browser kann leider keine eingebetteten Frames anzeigen!</p></iframe>',height:(myHeight+20),width:(myWidth+20)});}else{location.href=url;}}}
function lightbox(){var clThis=this;var clDoc=document;var clBody=clDoc.body;var clOverlay=clDoc.getElementById('LBOverlay');var clWrapper=clDoc.getElementById('LBWrapper');var clContent=clDoc.getElementById('LBContent');this.defaults={html:'',height:0,width:0,beforeCreate:function(){},success:function(){}}
this.init=function(options){var optionsArray=new Array('html','height','width','beforeCreate','success');var max=optionsArray.length;for(var h=0;h<max;h++){var name=optionsArray[h];this[name]=(options!==undefined&&options[name]!==undefined)?options[name]:clThis.defaults[name];}
clThis.beforeCreate();createOverlay();createBox();createClose();clThis.success();}
createOverlay=function(){var div='';if(clOverlay){closeLB();}
div=clDoc.createElement('div');div.id='LBOverlay';clBody.appendChild(div);clOverlay=getEle('LBOverlay');}
createBox=function(){var fnDiv,fnSubDiv,fnWrapper,fnText,fnContentWidth,fnContentHeight,fnContentDiv,fnMainDiv;var fnIdArray=new Array('LBTopL','LBTopC','LBTopR','LBMiddleL','LBMiddleC','LBMiddleR','LBBottomL','LBBottomC','LBBottomR');var fnIdArrayL=fnIdArray.length;if(clOverlay){fnDiv=clDoc.createElement('div');fnDiv.id='LBWrapper';clOverlay.appendChild(fnDiv);clWrapper=getEle('LBWrapper');for(var fnI=0;fnI<fnIdArrayL;fnI++){if((fnI%3)==0){fnMainDiv=clDoc.createElement('div');fnMainDiv.style.clear='left';clWrapper.appendChild(fnMainDiv);}
fnSubDiv=clDoc.createElement('div');fnSubDiv.id=fnIdArray[fnI];fnMainDiv.appendChild(fnSubDiv);if(fnI==4){fnContentDiv=clDoc.createElement('div');fnContentDiv.id='LBContent';if(clThis.height>0){var fnWinHeight=winHeight();if(clThis.height>fnWinHeight){fnContentDiv.style.height=(fnWinHeight-60)+'px';}else{fnContentDiv.style.height=clThis.height+'px';}}
if(clThis.width>0){var fnWinWidth=winWidth();fnContentDiv.style.width=clThis.width+'px';}
fnSubDiv.appendChild(fnContentDiv);fnContentDiv.innerHTML=clThis.html;}}
clContent=getEle('LBContent');fnContentWidth=outerWidth(getEle('LBContent'));getEle(fnIdArray[1]).style.width=fnContentWidth+'px';getEle(fnIdArray[4]).style.width=fnContentWidth+'px';getEle(fnIdArray[7]).style.width=fnContentWidth+'px';fnContentHeight=outerHeight(getEle('LBContent'));getEle(fnIdArray[3]).style.height=fnContentHeight+'px';getEle(fnIdArray[4]).style.height=fnContentHeight+'px';getEle(fnIdArray[5]).style.height=fnContentHeight+'px';clWrapper.style.marginTop='-'+(outerHeight(getEle('LBContent'))/2)+'px';clWrapper.style.marginLeft='-'+(outerWidth(getEle('LBContent'))/2)+'px';}}
createClose=function(){var fnDiv,fnBr;fnDiv=clDoc.createElement('div');fnDiv.id='LBClose';fnDiv.onclick=function(){closeLB();};clWrapper.appendChild(fnDiv);fnBr=clDoc.createElement('br');fnDiv.appendChild(fnBr);}
outerWidth=function(extEle){return extEle==window||extEle==document?extEle.style.width:extEle.style.display!='none'?extEle.offsetWidth:extEle.style.width+(parseInt(extEle.style.borderLeftWidth)||0)+(parseInt(extEle.style.borderRightWidth)||0)+(parseInt(extEle.style.paddingLeft)||0)+(parseInt(extEle.style.paddingRight)||0);}
outerHeight=function(extEle){return extEle==window||extEle==document?extEle.style.height:extEle.style.display!='none'?extEle.offsetHeight:extEle.style.height+(parseInt(extEle.style.borderTopWidth)||0)+(parseInt(extEle.style.borderBottomWidth)||0)
+(parseInt(extEle.style.paddingTop)||0)+(parseInt(extEle.style.paddingBottom)||0);}
getEle=function(el){var e=typeof el==="string"?clDoc.getElementById(el):el;return e;}
closeLB=function(){clOverlay.parentNode.removeChild(clOverlay);}
winHeight=function(){var fnWinH='';if(parseInt(navigator.appVersion)>3){if(navigator.appName=="Netscape"){fnWinH=window.innerHeight;}
if(navigator.appName.indexOf("Microsoft")!=-1){fnWinH=document.body.offsetHeight;}}
return fnWinH;}
winWidth=function(){var fnWinW='';if(parseInt(navigator.appVersion)>3){if(navigator.appName=="Netscape"){fnWinW=window.innerHeight;}
if(navigator.appName.indexOf("Microsoft")!=-1){fnWinW=document.body.offsetHeight;}}
return fnWinW;}}