
    function showWin() {
    	window.open('../');
    }

    function stopIt() {
    	top.scripter.stopWork();
    }

    function openCredits() {
    	parent.main.document.location.href = "index.php?a=18";
    	xwwd = window.setTimeout('stopIt()', 2000);
    }

	function NavToggle(element) {
		// This gives the active tab its look
		var navid = document.getElementById('nav');
		var navs = navid.getElementsByTagName('li');
		var navsCount = navs.length;
		for(j = 0; j < navsCount; j++) {
			active = (navs[j].id == element.parentNode.id) ? "active" : "";
			navs[j].className = active; 
		}
		
		// Don't use effect if Opera detected
		if(navigator.userAgent.toLowerCase().indexOf("opera")==-1){
			//Hide all content containers
			contents = document.getElementsByClassName('subnav');
			contentsCount = contents.length;
			for(var i = 0; i < contentsCount; i++) {
				contents[i].style.display = 'none';
			}
			
			//Extract content container id from href
			ele = element.getAttribute('href').replace(/^.*\#/,'');
			
			//Magic Happens
			new Effect.Appear(ele,{duration:0.2});
		}
	}
