function loader() {
	fixOperaBodyHeight();
	assignTitleAnimation("content-title", "/media/ui/flash/content-title.swf", 740, 60);
	if(window.location.pathname.indexOf("/home.php") != -1) {
		assignHomeTitleAnimation("/media/ui/flash/content-title.swf", 183, 60);
	}
	assignFlashThumbnails("/media/ui/flash/thumbnails.swf", 'thumbnail-flash', 100, 100, true);
	assignFlashThumbnails("/media/ui/flash/thumbnails.swf", 'thumbnail-home-flash', 181, 181, true);
	assignPopUps("popUpImg", popUpWidth, popUpHeight, popUpScrl);
	diaShow();
	if(typeof(tickerItems) == "object") {
		ticker= new newsTicker("ticker", 5000);
		ticker.add();
		ticker.setAutoValues(tickerItems);
		ticker.auto();
	}
}

var popUpWidth = 800;
var popUpHeight = 600;
var popUpScrl = "no";
var diaShowTimeout = 6500;
var diaShowNexURL = "";
var contentTitleDefaultTopic = 0;
var contentTitleTopics = new Array();
contentTitleTopics[0] = new Array();
contentTitleTopics[0]["pattern"] = "/";
contentTitleTopics[0]["topic"] = "common";
contentTitleTopics[0]["movie"] = "/media/ui/flash/auge.swf";
contentTitleTopics[0]["title"] = "";//"";
contentTitleTopics[1] = new Array();
contentTitleTopics[1]["pattern"] = "/photography/";
contentTitleTopics[1]["topic"] = "photography";
contentTitleTopics[1]["movie"] = "/media/ui/flash/blende.swf";
contentTitleTopics[1]["title"] = "";//"das bild in der foto";
contentTitleTopics[2] = new Array();
contentTitleTopics[2]["pattern"] = "/events_/";
contentTitleTopics[2]["topic"] = "events";
contentTitleTopics[2]["movie"] = "/media/ui/flash/bild.swf";
contentTitleTopics[2]["title"] = "";//"der event am anlass";
contentTitleTopics[3] = new Array();
contentTitleTopics[3]["pattern"] = "/movies/";
contentTitleTopics[3]["topic"] = "common";
contentTitleTopics[3]["movie"] = "/media/ui/flash/projektor.swf";
contentTitleTopics[3]["title"] = "";//"das kino im keller";
contentTitleTopics[4] = new Array();
contentTitleTopics[4]["pattern"] = "/e-card";
contentTitleTopics[4]["topic"] = "common";
contentTitleTopics[4]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[4]["title"] = "";//"";
contentTitleTopics[5] = new Array();
contentTitleTopics[5]["pattern"] = "/contact.php";
contentTitleTopics[5]["topic"] = "common";
contentTitleTopics[5]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[5]["title"] = "";//"";
contentTitleTopics[6] = new Array();
contentTitleTopics[6]["pattern"] = "/newsletter.php";
contentTitleTopics[6]["topic"] = "common";
contentTitleTopics[6]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[6]["title"] = "";//"";
contentTitleTopics[7] = new Array();
contentTitleTopics[7]["pattern"] = "/links.html";
contentTitleTopics[7]["topic"] = "common";
contentTitleTopics[7]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[7]["title"] = "";//"";
contentTitleTopics[8] = new Array();
contentTitleTopics[8]["pattern"] = "/e-cards/";
contentTitleTopics[8]["topic"] = "common";
contentTitleTopics[8]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[8]["title"] = "";//"";
contentTitleTopics[9] = new Array();
contentTitleTopics[9]["pattern"] = "/sitemap.php";
contentTitleTopics[9]["topic"] = "common";
contentTitleTopics[9]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[9]["title"] = "";//"";
contentTitleTopics[10] = new Array();
contentTitleTopics[10]["pattern"] = "/portrait.php";
contentTitleTopics[10]["topic"] = "common";
contentTitleTopics[10]["movie"] = "/media/ui/flash/auge.swf";
contentTitleTopics[10]["title"] = "";//"";
contentTitleTopics[11] = new Array();
contentTitleTopics[11]["pattern"] = "/newsletter/photography/";
contentTitleTopics[11]["topic"] = "common";
contentTitleTopics[11]["movie"] = "/media/ui/flash/blende.swf";
contentTitleTopics[11]["title"] = "";//"das bild in der foto";
contentTitleTopics[12] = new Array();
contentTitleTopics[12]["pattern"] = "/newsletter/events/";
contentTitleTopics[12]["topic"] = "common";
contentTitleTopics[12]["movie"] = "/media/ui/flash/lautsprecher.swf";
contentTitleTopics[12]["title"] = "";//"der event am anlass";
contentTitleTopics[13] = new Array();
contentTitleTopics[13]["pattern"] = "/newsletter/movies/";
contentTitleTopics[13]["topic"] = "common";
contentTitleTopics[13]["movie"] = "/media/ui/flash/projektor.swf";
contentTitleTopics[13]["title"] = "";//"das kino im keller";
contentTitleTopics[14] = new Array();
contentTitleTopics[14]["pattern"] = "/newsletter/common/";
contentTitleTopics[14]["topic"] = "common";
contentTitleTopics[14]["movie"] = "/media/ui/flash/blende.swf";
contentTitleTopics[14]["title"] = "";//"";
contentTitleTopics[15] = new Array();
contentTitleTopics[15]["pattern"] = "/fine-arts/";
contentTitleTopics[15]["topic"] = "events";
contentTitleTopics[15]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[15]["title"] = "";//;
contentTitleTopics[16] = new Array();
contentTitleTopics[16]["pattern"] = "/fine-arts-f/";
contentTitleTopics[16]["topic"] = "events";
contentTitleTopics[16]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[16]["title"] = "";//;
contentTitleTopics[17] = new Array();
contentTitleTopics[17]["pattern"] = "/home.php";
contentTitleTopics[17]["topic"] = "movies";
contentTitleTopics[17]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[17]["title"] = "";//;
contentTitleTopics[18] = new Array();
contentTitleTopics[18]["pattern"] = "/home.php";
contentTitleTopics[18]["topic"] = "news";
contentTitleTopics[18]["movie"] = "/media/ui/flash/lautsprecher.swf";
contentTitleTopics[18]["title"] = "";//;
contentTitleTopics[19] = new Array();
contentTitleTopics[19]["pattern"] = "/quicktour/";
contentTitleTopics[19]["topic"] = "movies";
contentTitleTopics[19]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[19]["title"] = "";//;
contentTitleTopics[20] = new Array();
contentTitleTopics[20]["pattern"] = "/image-quicktour.php";
contentTitleTopics[20]["topic"] = "movies";
contentTitleTopics[20]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[20]["title"] = "";//;
contentTitleTopics[21] = new Array();
contentTitleTopics[21]["pattern"] = "/b/";
contentTitleTopics[21]["topic"] = "photography";
contentTitleTopics[21]["movie"] = "/media/ui/flash/blende.swf";
contentTitleTopics[21]["title"] = "";//;
contentTitleTopics[22] = new Array();
contentTitleTopics[22]["pattern"] = "/c/";
contentTitleTopics[22]["topic"] = "events";
contentTitleTopics[22]["movie"] = "/media/ui/flash/bild.swf";
contentTitleTopics[22]["title"] = "";//;
contentTitleTopics[23] = new Array();
contentTitleTopics[23]["pattern"] = "/d/";
contentTitleTopics[23]["topic"] = "movies";
contentTitleTopics[23]["movie"] = "/media/ui/flash/quicktour-2.swf";
contentTitleTopics[23]["title"] = "";//;
contentTitleTopics[24] = new Array();
contentTitleTopics[24]["pattern"] = "/expo/";
contentTitleTopics[24]["topic"] = "common";
contentTitleTopics[24]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[24]["title"] = "";//;
contentTitleTopics[25] = new Array();
contentTitleTopics[25]["pattern"] = "/fine-arts2/";
contentTitleTopics[25]["topic"] = "common";
contentTitleTopics[25]["movie"] = "/media/ui/flash/bild-2.swf";
contentTitleTopics[25]["title"] = "";//;
contentTitleTopics[26] = new Array();
contentTitleTopics[26]["pattern"] = "/credo.php";
contentTitleTopics[26]["topic"] = "common";
contentTitleTopics[26]["movie"] = "/media/ui/flash/blende.swf";
contentTitleTopics[26]["title"] = "";//;

window.onload = loader;

function newsTicker(In, speed) {
	this.In = In;
	this.s = speed;
	this.txt = null;
	this.n = 1;
	this.v = null;
	this.timeOut = null;
	this._fpos = 0;
	this._stps = ((this.s * 0.125) / 50);
	this._stpsV = 100 / this._stps;
	this._fs = 50;
	this._ff = (navigator.userAgent.indexOf("Firefox") != -1) ? true: false;
	this.add = function() {
		if(document.getElementById) {
			var h = document.getElementById("aktuelles");
			if(h != null) {
				h.style.height = "100px";
				h.style.overflow = "hidden";
				h.innerHTML = ' <div id="'+In+'NTText"></div>';
				this.txt = document.getElementById(In+'NTText');
				h.style.display = "block";
				this._fade(0);
			}
		}
	}
	
	this.display = function(t) {
		if(this.txt != null) {
			this.txt.innerHTML = t;
		}
	}
	
	this.setAutoValues = function(v) {
		this.v = v;
	}
	
	this.auto = function() {
		if((this.txt != null) && (this.v.length > 0)) {
			window.clearTimeout(this.timeOut);
			if(this.n >= (this.v.length)) {
				this.n = 1;
			}
			this.display(this.v[this.n]["text"]);
			this.n++;
			this._fade(0);
			this._fpos = 0;
			this.timeOut = setTimeout(this.In + ".fadeIn()", this._fs);
		}
	}
	
	this.fadeIn = function() {
		window.clearTimeout(this._t);
		if(this._fpos <= this._stps) {
			this._fade((this._fpos * this._stpsV) + 0);
			this._fpos++;
			this._t = setTimeout(this.In + ".fadeIn()", this._fs);
		} else {
			this.timeOut = setTimeout(this.In + ".fadeOut()", (this.s * 0.5));
		}
	}
	
	this.fadeOut = function() {
		window.clearTimeout(this._t);
		if(this._fpos >= 0) {
			this._fade((this._fpos * this._stpsV) + 0);
			this._fpos--;
			this._t = setTimeout(this.In + ".fadeOut()", this._fs);
		} else {
			this.auto();
		}
	}
	
	this._fade = function(op) {
		if(this.txt != null) {
			op = (op < 0) ? 0: op;
			op = (op > 100) ? 100: op;
			op = ((op == 100) && (this._ff)) ? 99.999: op;
			this.txt.style.filter = "alpha(opacity=" + op + ")";
			this.txt.style.KhtmlOpacity = (op/100);
			this.txt.style.MozOpacity = (op/100);
			this.txt.style.opacity = (op/100);
		}
	}
}

function menuFlashOver(topic) {
	var n, na;
	if(document.getElementById) {
		n = document.getElementById("menu-" + topic);
		if(n != null) { 
			na = n.getElementsByTagName("a")[0];
			if(na != null) {
				na.style.backgroundPosition = "-185px 66px";
			}
		}
	}
}

function menuFlashOut(topic) {
	var n, na;
	if(document.getElementById) {
		n = document.getElementById("menu-" + topic);
		if(n != null) {
			na = n.getElementsByTagName("a")[0];
			if(na != null) {
				na.style.backgroundPosition = "0px 66px";
			}
		}
	}
}


function assignHomeTitleAnimation(fUrl, width, height) {
	var cn, hn, hnN, nC, replace, url, topic, replaceNodes, replaceNodesN, i, y, m, mN;
	if((document.getElementById) && (hasFlash)) {
		cn = document.getElementById("content");
		if(cn != null) {
			hn = cn.getElementsByTagName("h1");
			hnN = hn.length;
			replaceNodes = new Array();
			for(i = 0; i < hnN; i++) {
				replace = false;
				nC = hn[i].getAttribute("class");
				if((nC == null) && (hn[i].attributes["class"] != null)) {
					nC = hn[i].attributes["class"].nodeValue;
				}
				// Topic
				topic = contentTitleDefaultTopic;
				for(y = 0; y < contentTitleTopics.length; y++) {
					if(nC.indexOf(contentTitleTopics[y]["topic"]) > -1) {
						topic = y;
						replace = true;
					}
				}
				if(replace) {
					var a = hn[i].getElementsByTagName("a")[0];
					var l = replaceNodes.length;
					replaceNodes[l] = new Array();
					replaceNodes[l]["node"] = hn[i];
					replaceNodes[l]["topic"] = contentTitleTopics[topic]["topic"];
					replaceNodes[l]["url"] = (fUrl.indexOf("?") == -1) ? fUrl + "?": fUrl + "&amp;";
					if(a != null) {
						if(a.className.indexOf("popUp") > -1) {
							replaceNodes[l]["url"] = replaceNodes[l]["url"] + "isBtn=1&amp;btnURL=" + escape("javascript:openPopUpWithFlash('" + a.href + "', 'quicktourWin', 800, 600, 'no');") + "&amp;";
						} else {
							replaceNodes[l]["url"] = replaceNodes[l]["url"] + "isBtn=1&amp;btnURL=" + escape(a.href) + "&amp;";
						}
					}
					replaceNodes[l]["url"] = replaceNodes[l]["url"] + "anim=" + contentTitleTopics[topic]["movie"] + '&amp;txt=&amp;topic=' + escape(contentTitleTopics[topic]["topic"]) + "&amp;topictext="  + escape(contentTitleTopics[topic]["title"].toLowerCase());
				}
			}
			replaceNodesN = replaceNodes.length;
			for(i = 0; i < replaceNodesN; i++) {
				tagFlashReplace(replaceNodes[i]["node"], replaceNodes[i]["url"], "false", "false", "high", "noscale", "TL", "#FFFFFF", width, height, replaceNodes[i]["topic"] + "FlashMovie");
			}
			m = document.getElementById("menu").getElementsByTagName("a");
			mN = m.length;
			for(i = 0; i < mN; i++) {
				m[i].onmouseover = function() {
					var fn, ua;
					menuFlashOver(this.title.toLowerCase());
					ua = navigator.userAgent;
					if((ua.indexOf("MSIE") != -1) && (ua.indexOf("Windows") != -1)) {
						fn = window.document[this.title.toLowerCase() + "FlashMovie"];
						fn.GotoFrame(2);
					}
				}
				
				m[i].onmouseout = function() {
					var fn, ua;
					menuFlashOut(this.title.toLowerCase());
					ua = navigator.userAgent;
					if((ua.indexOf("MSIE") != -1) && (ua.indexOf("Windows") != -1)) {
						fn = window.document[this.title.toLowerCase() + "FlashMovie"];
						fn.GotoFrame(3);
					}
				}
			}
		}
	}
}

function assignTitleAnimation(id, fUrl, width, height) {
	var n, cn, cnN, i, txt, topic;
	if((document.getElementById) && (hasFlash)) {
		n = document.getElementById(id);
		if(n != null) {
			cn = n.childNodes;
			cnN = cn.length;
			// Titel
			for(i = 0; i < cnN; i++) {
				if(cn[i].data != "") {
					txt = cn[i].data;
					break;
				}
			}
			// Topic
			cnN = contentTitleTopics.length;
			docHref = window.location.pathname;
			topic = contentTitleDefaultTopic;
			for(i = 0; i < cnN; i++) {
				if(docHref.indexOf(contentTitleTopics[i]["pattern"]) > -1) {
					topic = i;
				}
			}
			fUrl = (fUrl.indexOf("?") == -1) ? fUrl + "?": fUrl + "&amp;";
			fUrl = fUrl + "anim=" + contentTitleTopics[topic]["movie"] + "&amp;txt=" + escape(txt.toLowerCase()) + '&amp;topic=' + escape(contentTitleTopics[topic]["topic"]) + "&amp;topictext="  + escape(contentTitleTopics[topic]["title"].toLowerCase());
			tagFlashReplace(n, fUrl, "false", "false", "high", "noscale", "TL", "#FFFFFF", width, height);
		}
	
	}
}

function assignPopUps(cl, w, h, scrl) {
	var n, nN, i, nC;
	if(document.getElementById) {
		n = document.getElementsByTagName("a");
		nN = n.length;
		if(nN > 0) {
			for(i = 0; i < nN; i++) {
				nC = n[i].getAttribute("class");
				if((nC == null) && (n[i].attributes["class"] != null)) {
					nC = n[i].attributes["class"].nodeValue;
				}
				if(nC == cl) {
					n[i].onclick = function() {
						return openPopUp(this.href, cl + "Win", w, h, scrl);
					}
				}
			}
		}
	}
}

function assignFlashThumbnails(fUrl, c, w, h, brdr) {
	var t, n, nN, i, nC, imgN, rn, rnN;
	if((document.getElementById) && (hasFlash)) {
		n = document.getElementsByTagName("div");
		nN = n.length;
		if(nN > 0) {
			rn = new Array();
			// save the nodes in rn, otherwise the div's of the replace function will be used
			for(i = 0; i < nN; i++) {
				nC = n[i].getAttribute("class");
				if((nC == null) && (n[i].attributes["class"] != null)) {
					nC = n[i].attributes["class"].nodeValue;
				}
				if(nC == c) {
					rn[rn.length] = n[i];
				}
			}
			rnN = rn.length;
			for(i = 0; i < rnN; i++) {
				imgN = rn[i].getElementsByTagName("img")[0];
				if(imgN != null) {
					imageFlashReplace(imgN, fUrl + "?img2=" + imgN.src.replace("/thumbnails/", "/flash-zoomout/"), "false", "false", "high", "noscale", "TL", "transparent", "#FFFFFF", w, h, brdr);
				}
			}
		}
	}
}

function openPopUp(url, name, w, h, scrl) {
	if(window.location.href.indexOf('/home.php') > 0) {
		window.location.href = url;
		return false;
	}
	var lP, tP;
	lP = (screen.width - w) / 2;
	tP = (screen.height - h) / 2;
	popUp = window.open(url, name, 'height=' + h + ',width=' + w + ',locationbar=no,menubar=no,toolbar=no,scrollbars=' + scrl + ',resizable=yes,top=' + tP + ',left=' + lP + ',status=yes');
	popUp.moveTo(lP, tP);
	popUp.resizeTo(w, h);
	popUp.focus();
	return false;
}

function openPopUpWithFlash(url, name, w, h, scrl) {
	var lP, tP;
	lP = (screen.width - w) / 2;
	tP = (screen.height - h) / 2;
	popUp = window.open(url, name, 'height=' + h + ',width=' + w + ',locationbar=no,menubar=no,toolbar=no,scrollbars=' + scrl + ',resizable=yes,top=' + tP + ',left=' + lP + ',status=yes');
	popUp.moveTo(lP, tP);
	popUp.resizeTo(w, h);
	popUp.focus();
}

function flashOpenPopUp(url, name, w, h, scrl) {
	openPopUp(url, name, w, h, scrl);
}

function resizeImagePopUp(id, pCl) {
	var n;
	if(document.getElementById) {
		n = document.getElementById(id);
		if(n != null) {
			initWinSize(n.width + 60, n.height + 90);
			document.getElementById(pCl).style.textAlign = "center";
		}
	}
}

function initWinSize(w, h) {
	var newWidth, newHeight;
	newWidth = w + 20;
	newHeight = h + 100;
	if(newWidth < popUpWidth) {
		newWidth = popUpWidth;
	}
	if(newHeight < popUpHeight) {
		newHeight = popUpHeight;
	}
	if (((screen.height / 2) - h) > screen.height) {
		window.moveTo(10,10);
	} else {
		window.moveTo((screen.width-newWidth)/2,(screen.height-newHeight)/2);
	}
	window.resizeTo(newWidth,newHeight);
}

function imageFlashReplace(node, movie, loop, menu, quality, scale, salign, wmode, bgcolor, width, height, brdr) {
	var a, p, divAttr, div, url, ua;
	ua = navigator.userAgent;
	isMacIE = ((ua.indexOf("MSIE") > -1) && (ua.indexOf("Mac") > -1)) ? true: false;
	if((node != null) && (!isMacIE)) {
		a = node.parentNode;
		p = a.parentNode;
		node.style.visibility = "hidden";
		divAttr = new Array(); divAttr[0] = new Array();
		div = document.createElement("div");
		if(brdr) div.style.border = "1px #BBB solid";
		div.style.width = width + "px";
		div.style.height = height + "px";
		url = (movie.indexOf("?") == -1) ? movie + "?": movie + "&amp;";
		url = url + 'img1=' + node.src + "&amp;href=" + escape("javascript:flashOpenPopUp('" + a.href + "', 'popUpImgWin', " + popUpWidth + ", " + popUpHeight + ", '" + popUpScrl + "');");
		div.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '" align="left">' +
			'<param name="movie" value="' + url + '" />' +
			'<param name="loop" value="' + loop + '" />' +
			'<param name="menu" value="' + menu + '" />' +
			'<param name="quality" value="' + quality + '" />' +
			'<param name="scale" value="' + scale + '" />' +
			'<param name="salign" value="' + salign + '" />' +
			'<param name="wmode" value="' + wmode + '" />' +
			'<param name="bgcolor" value="' + bgcolor + '" />' +
			'<embed src="' + url + '" loop="' + loop + '" menu="' + menu + '" quality="' + quality + '" scale="' + scale + '" salign="' + salign + '" wmode="' + wmode + '" bgcolor="' + bgcolor + '" width="' + width + '" height="' + height + '" align="left" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
			'</object>';
		 p.replaceChild(div, a);
	 }
}

function tagFlashReplace(node, movie, loop, menu, quality, scale, salign, bgcolor, width, height, id) {
	var a, p, divAttr, div, url, ua, isMacIE;
	ua = navigator.userAgent;
	isMacIE = ((ua.indexOf("MSIE") > -1) && (ua.indexOf("Mac") > -1)) ? true: false;
	if((node != null) && (!isMacIE)) {
		p = node.parentNode;
		node.style.visibility = "hidden";
		divAttr = new Array(); divAttr[0] = new Array();
		div = document.createElement("div");
		div.style.padding = "0px";
		div.style.margin = "0px 0px 30px 0px";
		div.style.width = width + "px";
		div.style.height = height + "px";
		div.innerHTML = '<object id="' + id + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '" align="left">' +
			'<param name="movie" value="' + movie + '" />' +
			'<param name="loop" value="' + loop + '" />' +
			'<param name="menu" value="' + menu + '" />' +
			'<param name="quality" value="' + quality + '" />' +
			'<param name="scale" value="' + scale + '" />' +
			'<param name="salign" value="' + salign + '" />' +
			'<param name="bgcolor" value="' + bgcolor + '" />' +
			'<embed name="' + id + '" src="' + movie + '" loop="' + loop + '" menu="' + menu + '" quality="' + quality + '" scale="' + scale + '" salign="' + salign + '" bgcolor="' + bgcolor + '" width="' + width + '" height="' + height + '" align="left" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
			'</object>';
		 p.replaceChild(div, node);
	 }
}

function createNodeWithAttributes(n, a) {
	var n, aN, i;
	n = document.createElement(n);
	aN = a.length;
	for(i = 0; i < aN; i++) {
		n.setAttribute(a[i]["name"], a[i]["value"]);
	}
	return n;
}

function diaShow() {
	if(diaShowNexURL != "") {
		window.setTimeout("diaShowGoNext('" + diaShowNexURL + "')", diaShowTimeout);
	}
}

function diaShowGoNext(URL) {
	window.location.href = URL;
}

function homeDiaShow(imgsArray, sec, imgName, In) {
	this.images = imgsArray;
	this.imgObj = (document.getElementById) ? document.getElementById(imgName): null;
	this.refreshRate = sec;
	this.actImg = 0;
	this.In = In;
	this.newImage;

	this.start = function() {
		this.loadNextImage();
	}

	this.loadNextImage = function() {
		if(this.imgObj != null) {
			this.newImage = new Image();
			this.newImage.src = this.images[this.getNexImageNum()];
			window.setTimeout(this.In + ".replaceImage()", (this.refreshRate * 1000));
		}
	}
	
	this.replaceImage = function() {
		if(this.imgObj != null) {
			this.imgObj.src = this.newImage.src;
			this.loadNextImage();
		}
	}
	
	this.getNexImageNum = function() {
		this.actImg++
		if(this.actImg >= this.images.length) {
			this.actImg = 0;
		}
		return this.actImg;
	}
}

function fixOperaBodyHeight() {
	var tbg;
	if((document.getElementById) && (window.innerHeight != "undefined")) {
		tbg = (document.getElementById("popUpContainer") != null) ? document.getElementById("popUpContainer"): document.getElementById("top-bg");
		if(tbg != null) {
			if(document.all) {
				tbgH = tbg.offsetHeight;
			} else if(document.defaultView) {
				tbgH = document.defaultView.getComputedStyle(tbg, "").getPropertyValue("height");
				tbgH = parseInt(String(tbgH).replace("px", ""));
			}
			if(tbgH < window.innerHeight) {
				tbg.style.height = (window.innerHeight) + "px";
			}
		}
	}
}

var hasFlash = function(){
	var nRequiredVersion, flashDescription, flashVersion;
	nRequiredVersion = 6;	
	if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1){
		document.write('<script language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('hasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + nRequiredVersion + '))) \n');  
		document.write('<'+'/script\> \n');
		if(window.hasFlash != null){
			return window.hasFlash;
		};
	};
	if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
		flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
		flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
		return flashVersion >= nRequiredVersion;
	};
	return false;
}();