// Java Document
function parseTumbnails(object){
	for(i=0; i<object.getElementsByTagName("a").length; i++){
		object.getElementsByTagName("a")[i].onclick = function(){
			showImg(this.href);
			return false;
		}
	}
	document.getElementById('mainimg').style.filter = 'blendTrans(duration=1)';
}
function showImg(src){
	if(document.getElementById('mainimg').filters){
		document.getElementById('mainimg').filters[0].apply();
	}
	document.getElementById('mainimg').src=src;
	if(document.getElementById('mainimg').filters){		
		document.getElementById('mainimg').filters[0].play();
	}
}
function startSlideShow(object, path, size){
	object.picsize = size;
	object.aktpic = 0;
	object.path = path;
	setTimeout('runSlideShow("' + object.id + '")', 4000);
}
function runSlideShow(objectid){
	object = document.getElementById(objectid);
	if (document.all){
		object.style.filter='blendTrans(duration='+'2'+')';
		object.filters.blendTrans.Apply();   
	}
	object.aktpic++;
	if(object.aktpic>=object.picsize){
		object.aktpic=0;
	}
	object.src = object.path + object.aktpic + ".jpg";
	if (document.all){
		object.filters.blendTrans.Play();
	}
	setTimeout('runSlideShow("' + objectid + '")', 4000);
}

/*******    popup(linkobjekt, breite, höhe)    ********/
	function popup(obj,w,h) {
		var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
		if (!url) return true;
		if(w && h){
			var args = 'width='+w+',height='+h+',resizable=yes';
		}
		else{
			var args = 'resizable=yes,hotkeys=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes';
		}
		pop = window.open(url,'',args);
		return (pop) ? false : true;
	}	
	
/*******    durchsucht alle links mit target="_blank" oder rel="external"    ********/
function parseLinks(){
	for(i=0; i<document.getElementsByTagName("a").length; i++){
		zwobj = document.getElementsByTagName("a")[i];
		if((zwobj.getAttribute) ? zwobj.getAttribute('target') : zwobj.target == "_blank"){
			zwobj.onclick = function(){
				return popup(this);
			}
			zwobj.target="";
		}
		else if((zwobj.getAttribute) ? zwobj.getAttribute('rel') : zwobj.rel == "external"){
			zwobj.onclick = function(){
				return popup(this);	
			}
		}
	}
}
