<!--
if (self.parent.frames.length != 0) {
		self.parent.location = document.location;
}

var contentID = 6;
var themeID = 0;
var isCSS, isW3C, isIE4;
var menuTimeout = window.setTimeout("hideMenu()",10000);

function getObject (object) {
	var obj;
	if (typeof object == "string") {
		if (isW3C) {
			obj = document.getElementById(object);
		} else if (isIE4) {
			obj = document.all(object);
		} 
	} else {
		obj = object;
	}
	return obj;
}

function initImages(imageArray, sourceArray, width, height) {
	for (var i=0; i<imageArray.length; i++) {
		imageArray[i]= new Image(width,height);		
	}
	imageArray[0].src = sourceArray[0];
	imageArray[1].src = sourceArray[1];
}

function init () {	
	if(document.images) {
		isCSS = (document.body && document.body.style) ? true : false;
		isW3C = (isCSS && document.getElementById) ? true : false;
		isIE4 = (isCSS && document.all) ? true : false;		
	}
	for (var i=0; i<layoutImg.length; i++) {
		layoutImg[i] = new Image();
		layoutImg[i].src = layoutSrc[i];
	}
	initImages(themeImg, themeSrc, 74, 138);
	initImages(galleryImg, gallerySrc, 250, 168);
	initImages(calligrafyImg, calligrafySrc, 160, 333);		
}

function mail(Betreff) {
	location = "mailto:info@zen.or.at?subject=" + Betreff;
}

function showMenu() {
	getObject("div_TITLE").style.visibility = "hidden";
	getObject("div_MENU_1").style.visibility = "visible";	
	menuTimeout = window.setTimeout("hideMenu()",10000);	
}		

function hideMenu() {
	window.clearTimeout(menuTimeout);
	getObject("div_MENU_1").style.visibility = "hidden";
	getObject("div_TITLE").style.visibility = "visible";
}

function filterInnerHTML(object,inhalt){	
	if(isIE4 && getObject(object).filters) {
		getObject(object).filters.revealTrans.Apply();
		getObject(object).innerHTML = inhalt;
		getObject(object).filters.revealTrans.Play();
	} else {
		getObject(object).innerHTML = inhalt;
	}
}

function showPointer(cellName, pointerName, pointerSource, onMouseOver, onMouseOut, onClick) {
	if(getObject(cellName).innerHTML == "&nbsp;" || navigator.appName == "Opera" || navigator.vendor == "Apple Computer, Inc.") {
		filterInnerHTML(cellName,'<br><br><br><img name="' + pointerName + '" src="' + pointerSource +'" width="40" height="40" style="cursor:pointer" onMouseOver="' + onMouseOver + '" onMouseOut="' + onMouseOut + '" onClick="' + onClick + '">');
	}
	else return;
}

function hidePointer(cellName) {
	if(getObject(cellName).innerHTML != "&nbsp;" || navigator.appName == "Opera" || navigator.platform == "MacPPC") {
		filterInnerHTML(cellName,'&nbsp;');
	}
	else return;
}

function setPointers(_contentID) {
	if(htmlContent[_contentID].previous != null) {
		showPointer('td_LEFT','LPointer','images/layout/PointLeftOnOver.gif','this.src = layoutSrc[10]','this.src = layoutSrc[11]','pointLeft();');
	}
	else {
		hidePointer('td_LEFT');
		}
	if(htmlContent[_contentID].next != null) {
		showPointer('td_RIGHT','RPointer','images/layout/PointRightOnOver.gif','this.src = layoutSrc[12]','this.src = layoutSrc[9]','pointRight();');		
	}
	else {
		hidePointer('td_RIGHT');
	}	
}

function setTheme(_themeID) {
	if (themeID != _themeID) {
		document.Theme.src = themeSrc[_themeID];
		themeID = _themeID;
	}
	else return;
}

function loadImages(_contentID, imageArray) {
	if(imageArray[2].src == null){
		var sourceArray = htmlContent[_contentID].src;
		for (var i=2; i<sourceArray.length; i++) {
			imageArray[i].src = sourceArray[i];
		}
	}	
}

function setContent(_contentID) {
	var contentObject = htmlContent[_contentID];
	if(contentObject.img != null) {
		loadImages(_contentID, contentObject.img);
	}
	var themeID = contentObject.theme;
	if(themeImg[themeID].src == null) {
		themeImg[themeID].src = themeSrc[themeID];
	}	
	hideMenu();
	if(contentObject.html.search(/img.+/) != -1) {
		filterInnerHTML('td_TEXT','&nbsp;');
	}
	filterInnerHTML('td_TEXT',contentObject.html);
	if (contentObject.chapter != htmlContent[contentID].chapter) {	
		filterInnerHTML('td_INFO',contentObject.chapter);
	}	
	setTheme(themeID);
	setPointers(_contentID);	
	contentID = _contentID;	
	if(contentID != 6) {
		getObject("div_MENU_2").style.visibility = "visible";
	} else {
		getObject("div_MENU_2").style.visibility = "hidden";
	}
}

function pointRight() {
	setContent(htmlContent[contentID].next);
}

function pointLeft() {
	setContent(htmlContent[contentID].previous);
}

//-->