	function initButtons() {
		if (!document.getElementsByTagName) { return; }
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];
			if ( anchor.className == "button") {
				anchor.onmouseover	= function () { this.className= "buttonHover"; }
				anchor.onmouseup	= function () { this.className= "buttonHover"; }
				anchor.onmousedown	= function () { this.className= "buttonActive"; }
				anchor.onmouseout	= function () { this.className= "button"; }
			} else if ( anchor.className == "buttonR") {
				anchor.onmouseover	= function () { this.className= "buttonRHover"; }
				anchor.onmouseup	= function () { this.className= "buttonRHover"; }
				anchor.onmousedown	= function () { this.className= "buttonRActive"; }
				anchor.onmouseout	= function () { this.className= "buttonR"; }
			}
		}
	}

	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
		    	window.onload = func;
		} else {
			window.onload = function() {
			oldonload();
			func();
			}
		}
	}

	function startFlash() {
		var urlArray	= document.URL.split("/");
		var pageName	= urlArray[urlArray.length-1]
		pageName	= pageName.replace(".php","");

		if ( pageName=='nature' || pageName=='burning_sun_download' || pageName=='dark_forest_download' || pageName=='tree_of_xaya_download' || pageName=='virtual_earth_download' ) {
			var swfPath = "flash/videoholder_nature.swf";
		} else {
			var swfPath = "flash/videoholder.swf";
		}

		if ( pageName!='info' && pageName!='webmasters' && pageName!='link_exchange' && pageName!='download' ) {
			var so = new SWFObject(swfPath, "flashPlayer", "423", "242", "8", "#ffffff");
			so.addParam("wmode", "transparent");
			so.addVariable("pageName", pageName);
			so.addVariable("test1", "test1");
			so.write("flashHolder");
		}

	}

	addLoadEvent(initButtons);
	addLoadEvent(startFlash);
