oldload=window.onload;
window.onload=function(){
	if(oldload){oldload()}
	outLinks();
	CKI.init();
	if((navigator.appVersion.indexOf("MSIE 6")!=-1)&&document.getElementById("box11")){document.getElementById("box11").style.left="24px";}
}

login_success=function(txt){
	Login.messagebox.innerHTML=txt;
	Login.ReLoad();
}

CKI={
	db:function(o){
		if(o&&document.getElementById){
			sourceObject=o.firstChild.nodeName.toLowerCase()=="img"?o.firstChild:o.parentNode.previousSibling.firstChild;
			if(sourceObject&&(sourceObject.longDesc!="")){
				document.getElementById("box1").firstChild.firstChild.src=sourceObject.longDesc;
				if(sourceObject.alt.indexOf("@")>-1){
					//aMail=sourceObject.alt.split(", ");
					aMail=sourceObject.alt.match(/\(([\w-\.]*?@.*?\..*?)\)/);

					if(!document.getElementById("box1_emaillink")){
						var p=document.createElement("P");
						var a=document.createElement("A");
						a.id="box1_emaillink";
						p.appendChild(a);
						p.className="dark";
						document.getElementById("box1").firstChild.appendChild(p);
					}
					var a_text=document.createTextNode(sourceObject.alt.replace(aMail[0],""));
					if(document.getElementById("box1_emaillink").firstChild){
						document.getElementById("box1_emaillink").replaceChild(a_text,document.getElementById("box1_emaillink").firstChild);
					}else{
						document.getElementById("box1_emaillink").appendChild(a_text);
					}
					document.getElementById("box1_emaillink").href="mailto:"+aMail[1];
					document.getElementById("box1_emaillink").title=GOS.gt("E-Mail senden an ","Email envoyer &auml;","","","Send email to ")+aMail[1];
				}
			}
		}
		return false;
	},
	gallery:function(o){
		return p(o.href,'datenblatt',675,395,'scrollbars=1');
	},
	init:function(){
		$$("#text a").each(function(e){
			if(e.rel=="dyn"){
				e.onclick=function(){
					return CKI.db(this);
				}
			}
		})
	},
	NewsFront:{
		activate:function(){
			this.cLinks=$$("div.box.liste h3.outer a");
			this.cLinks.each(function(e){
				e.onclick=CKI.NewsFront.clickHandler;
			});
		},
		clickHandler:function(){
			if(this.className.indexOf("act")<0){
				o=this;
				CKI.NewsFront.cLinks.each(function(e){
					if(e==o){
						e.addClassName("act");
						$(e).ancestors()[1].addClassName("act")
					}else{
						e.removeClassName("act");
						$(e).ancestors()[1].removeClassName("act");
					}
				});
				this.className="act";
			}
			this.blur();
			return false;
		}
	}
};