<!--
	
	var Effects = {
		
		init: function()
		{
			for(var k in this)
			{
				var obj = eval("this." + k);
				
				if(obj.init)
				{
					obj.init();
				}
			}
			
			GlobalVars.addVariable("effectstimeout", null);
		},
		
		sound: {
			
			init: function()
			{
				this.off();
			},
			
			on: function()
			{
				document.getElementById('flashmovie').SetVariable('_root.soundstatus', 'on');
			},
			
			off: function()
			{
				document.getElementById('flashmovie').SetVariable('_root.soundstatus', 'off');
			}
			
		},
		
		displayer: {
			
			init: function()
			{
				
			},
			
			toggle: function(blockid)
			{
				var block = document.getElementById(blockid);
				
				if(BrowserDetect.browser == "Explorer")
				{
					var attr = block.currentStyle.display;
				}
				else
				{
					var attr = document.defaultView.getComputedStyle(block, null).getPropertyValue('display');
				}
				
				if(attr == "block")
				{
					block.style.display = 'none';
				}
				else
				{
					block.style.display = 'block';
				}
			},
			
			toggleExclusive: function(blockprefix, blockid)
			{
				var blockgroup = GlobalVars.searchByPrefix(blockprefix);
				
				var blockid = document.getElementById(blockid);
				for(var i=0;i<blockgroup.length;i++)
				{
					var block = document.getElementById(blockgroup[i]);
					
					if(block != blockid)
					{
						block.style.display = 'none';
					}
					else
					{
						block.style.display = 'block';
					}
				}
			},
			
			hideall: function(blockprefix)
			{
				var blockgroup = GlobalVars.searchByPrefix(blockprefix);
				
				for(var i=0;i<blockgroup.length;i++)
				{
					document.getElementById(blockgroup[i]).style.display = 'none';
				}
			}
			
		},
		
		fader: {
			
			fadeamount: new Number(10),
			fadedelay: new Number(10),
			fadespan: new Number(7500),
			autoplay: true,
			timeouter: null,
			
			init: function()
			{
				
			},
			
			borderfadein: function(obj)
			{
				obj.style.borderColor = '#606060';
			},
			
			borderfadeout: function(obj)
			{
				obj.style.borderColor = '#afafaf';
			},
			
			fadein: function(blockname, fadeoutblock)
			{
				var block = document.getElementById(blockname);
				var currentalpha = block.getAttribute("currentalpha");
				
				block.style.display = 'inline';
				
				if(currentalpha == null)
				{
					currentalpha = 0;
				}
				else
				{
					currentalpha = parseInt(currentalpha);
				}
				
				if(currentalpha < 100)
				{
					block.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + (currentalpha + this.fadeamount) + ")";
					block.style.MozOpacity = ((currentalpha + this.fadeamount) / 100) + "%";
					block.style.opacity = (currentalpha + this.fadeamount) / 100;
					
					block.setAttribute("currentalpha", currentalpha + this.fadeamount);
					
					if(fadeoutblock)
					{
						clearTimeout(this.timeouter);
						
						this.timeouter = setTimeout("Effects.fader.fadein('" + block.getAttribute("id") + "', '" + fadeoutblock + "')", this.fadedelay);
					}
					else
					{
						clearTimeout(this.timeouter);
						
						this.timeouter = setTimeout("Effects.fader.fadein('" + block.getAttribute("id") + "')", this.fadedelay);
					}
				}
				else
				{
					block.style.filter = "";
					
					if(fadeoutblock)
					{
						this.fadeout(fadeoutblock, null);
					}
					
					if(block.parentNode.getAttribute("autoplay") == "true")
					{
						clearTimeout(this.timeouter);
						
						this.timeouter = setTimeout("Effects.fader.fadetonext(" + block.parentNode.getAttribute("id").substr(10, 1) + ")", this.fadespan);
					}
				}
			},
			
			fadeout: function(blockname, fadeinblock)
			{
				var block = document.getElementById(blockname);
				var currentalpha = block.getAttribute("currentalpha");
				
				if(currentalpha == null)
				{
					currentalpha = 100;
				}
				else
				{
					currentalpha = parseInt(currentalpha);
				}
				
				if(currentalpha > 0)
				{
					block.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + (currentalpha - this.fadeamount) + ");";
					block.style.MozOpacity = ((currentalpha - this.fadeamount) / 100) + "%";
					block.style.opacity = (currentalpha - this.fadeamount) / 100;
					
					block.setAttribute("currentalpha", currentalpha - this.fadeamount);
					
					if(fadeinblock)
					{
						clearTimeout(this.timeouter);
						
						this.timeouter = setTimeout("Effects.fader.fadeout('" + block.getAttribute("id") + "', '" + fadeinblock + "')", this.fadedelay);
					}
					else
					{
						clearTimeout(this.timeouter);
						
						this.timeouter = setTimeout("Effects.fader.fadeout('" + block.getAttribute("id") + "')", this.fadedelay);
					}
				}
				else
				{
					block.style.display = 'none';
					
//					alert(fadeinblock);
					if(fadeinblock)
					{
						this.fadein(fadeinblock, null);
					}
				}
			},
			
			fadetoblock: function(groupid, blockid)
			{
				var groupdiv = document.getElementById('fadegroup_' + groupid);
				var visibleblock = groupdiv.getAttribute("visibleblock");
				var divsarray = Array();
				
				if(visibleblock == null)
				{
					visibleblock = 0;
				}
				else
				{
					visibleblock = parseInt(visibleblock);
				}
				
				for(var i=0;i<groupdiv.childNodes.length;i++)
				{
					if(groupdiv.childNodes[i].tagName)
					{
						if(groupdiv.childNodes[i].tagName.toLowerCase() == "div")
						{
							divsarray[divsarray.length] = groupdiv.childNodes[i];
							
							if(groupdiv.childNodes[i] != divsarray[visibleblock])
							{
								groupdiv.childNodes[i].style.display = 'none';
							}							
						}
					}
				}
				
				var oldblock = divsarray[visibleblock].getAttribute("id");
				var newblock = divsarray[blockid - 1].getAttribute("id");
				
				if(oldblock != newblock)
				{
					this.fadeout(oldblock, newblock);
					
					groupdiv.setAttribute("visibleblock", blockid - 1);
				}
			},
			
			fadetonext: function(groupid)
			{
				var groupdiv = document.getElementById('fadegroup_' + groupid);
				var visibleblock = groupdiv.getAttribute("visibleblock");
				var divsarray = Array();
				
				if(visibleblock == null)
				{
					visibleblock = 0;
				}
				else
				{
					visibleblock = parseInt(visibleblock);
				}
				
				for(var i=0;i<groupdiv.childNodes.length;i++)
				{
					if(groupdiv.childNodes[i].tagName)
					{
						if(groupdiv.childNodes[i].tagName.toLowerCase() == "div")
						{
							divsarray[divsarray.length] = groupdiv.childNodes[i];
						}
					}
				}
				
				if(divsarray[visibleblock + 1])
				{
					if(divsarray[visibleblock + 1].tagName.toLowerCase() == "div")
					{
						this.fadeout(divsarray[visibleblock].getAttribute("id"), divsarray[visibleblock + 1].getAttribute("id"));
						groupdiv.setAttribute("visibleblock", visibleblock + 1);
					}
				}
				else
				{
					this.fadeout(divsarray[visibleblock].getAttribute("id"), divsarray[0].getAttribute("id"));
					
					groupdiv.setAttribute("visibleblock", 0);
				}
			},
			
			fadetoprevious: function(groupid)
			{
				var groupdiv = document.getElementById('fadegroup_' + groupid);
				var visibleblock = groupdiv.getAttribute("visibleblock");
				var divsarray = Array();
				
				if(visibleblock == null)
				{
					visibleblock = 0;
				}
				else
				{
					visibleblock = parseInt(visibleblock);
				}
				
				for(var i=0;i<groupdiv.childNodes.length;i++)
				{
					if(groupdiv.childNodes[i].tagName)
					{
						if(groupdiv.childNodes[i].tagName.toLowerCase() == "div")
						{
							divsarray[divsarray.length] = groupdiv.childNodes[i];
						}
					}
				}
				
				if(divsarray[visibleblock - 1])
				{
					if(divsarray[visibleblock - 1].tagName.toLowerCase() == "div")
					{
						this.fadeout(divsarray[visibleblock].getAttribute("id"), divsarray[visibleblock - 1].getAttribute("id"));
						groupdiv.setAttribute("visibleblock", visibleblock - 1);
					}
				}
				else
				{
					this.fadeout(divsarray[0].getAttribute("id"), divsarray[ divsarray.length - 1 ].getAttribute("id"));
					
					groupdiv.setAttribute("visibleblock", divsarray.length - 1);
				}
			}
			
		},
		
		scroller: {
		
			stopeff: false,
			sectioninitpos: new Number(0),
			heightsto: Array(),
			
			init: function()
			{
				var screens = document.getElementById("screens");
				var heights = Array(), childnumber = 0;
				
				if(!screens)
				{
					return;
				}
				
				var divs = screens.getElementsByTagName("div");
				for(var i=0;i<divs.length;i++)
				{	
					if(divs[i].parentNode == screens)
					{
						heights[childnumber] = divs[i].offsetHeight;
						
						this.heightsto[childnumber] = 0;
						for(var j=1;j<heights.length;j++)
						{
							this.heightsto[childnumber] += heights[j];
						}
						
						childnumber++;
					}
				}
				
				this.sectioninitpos = screens.offsetTop;
				
				var section = Environment.getparam("section");
				if(section)
				{
					this.scrolltosection(section);
				}
				else
				{
					this.scrolltosection(1);
				}
			},
			
			scrolltosection: function(section_number)
			{
				var thesection = document.getElementById("section_" + section_number);
				var screens = document.getElementById("screens");
				
				scrollFunction();
				
				var clips = screens.style.clip.substr(screens.style.clip.indexOf("(") + 1, screens.style.clip.indexOf(")") - screens.style.clip.indexOf("(") - 1);
				
				if(BrowserDetect.browser == "Explorer")
				{
					clips = clips.split(" ");
				}
				else
				{
					clips = clips.split(", ");
				}
				
				for(var i=0;i<clips.length;i++)
				{
					clips[i] = parseInt(clips[i].substr(0, clips[i].length - 2));
				}
				
				var newtop = screens.offsetTop + (this.sectioninitpos - screens.offsetTop - this.heightsto[section_number - 1]) / 4;
				
				screens.style.top = newtop + "px";
				screens.style.clip = "rect(" + (this.sectioninitpos - newtop) + "px " + clips[1] + "px " + (this.sectioninitpos - newtop + document.getElementById('section_' + section_number).offsetHeight) + "px " + (clips[3]) + "px)";
				
				if(Math.abs((this.sectioninitpos - screens.offsetTop - this.heightsto[section_number - 1]) / 4) > 1)
				{
					GlobalVars.addVariable("effectstimeouter", setTimeout("Effects.scroller.scrolltosection(" + section_number + ")", 50));
				}
				else
				{
					if(section_number == 5)
					{
						Effects.fader.autoplay = true;
						
						setTimeout("Effects.fader.fadetonext(1)", Effects.fader.fadespan);
					}
					else
					{
						Effects.fader.autoplay = false;
					}
					
					this.stopeffect();
				}
			},
			
			stopeffect: function()
			{
				clearTimeout(GlobalVars.getVariable("effectstimeouter"));
				
				GlobalVars.removeVariable("effectstimeouter");
			}
		}
	};
	
//-->