		var ie5 = (document.getElementById && document.all); 
		var ns6 = (document.getElementById && !document.all);

		var timerID = null;
		var opak = 0;
		var index = 0;
		var mouseX = 5;
		var mouseY = 20;

		var msg = new Array();
		msg[0]="Play Intro";
		msg[1]="Latest News";
		msg[2]="DHTML Scripts and Tutorials";
		msg[3]="Top 20 Rated Scripts";
		msg[4]="Cool DHTML Links";
		msg[5]="Promote this Site";
		msg[6]="Copyright Notice";
		
		function fadingTooltipsInit(){
			if(ie5 || ns6){
				lnk = document.getElementById('menucont').getElementsByTagName('A');
				for(var i=0;i<lnk.length;i++){
					if(ie5){
						lnk[i].attachEvent("onmouseout", hideMsg);
					}
					else if(ns6){
						lnk[i].addEventListener("mouseout", hideMsg, false);
					}
				lnk[i].style.visibility = "visible";
				}
			}
		}

		function changeMsg(index){
			if(ie5){
				document.getElementById('box').style.filter="blendTrans(Duration=1.2)";
				document.getElementById('box').filters[0].Apply();
				document.getElementById('box').style.visibility = "visible";
				document.getElementById('box').filters[0].Play();
				document.getElementById('box').innerHTML = msg[index];
			}
			else if(ns6){
				document.getElementById('box').style.visibility = "visible";
				document.getElementById('box').innerHTML = msg[index];
			}
		}

		function hideMsg(){
			if(ie5||ns6){
				document.getElementById('box').style.visibility="hidden";
			}
		}

		function getMouseMove(e){
			if(ie5){
				document.getElementById('box').style.left = document.body.scrollLeft + event.clientX + mouseX;
				document.getElementById('box').style.top = document.body.scrollTop + event.clientY + mouseY;
			}
			else if(ns6){
				document.getElementById('box').style.left = window.pageXOffset + e.clientX + mouseX + "px";
				document.getElementById('box').style.top = window.pageYOffset + e.clientY + mouseY + "px";
			}
		}
		document.onmousemove=getMouseMove;

		nSpace=5   
		nSpeed=100 

		timerLSM=null;

		function LetterSpacingMenu() {
			if(ie5 || ns6){
				lnks = Math.floor(Math.random()*lnk.length);
				letterSpacing = Math.floor(Math.random()*nSpace);
				lnk[lnks].style.letterSpacing = letterSpacing + "px";
				timerLSM = setTimeout("LetterSpacingMenu()", nSpeed);
			}
		}

		function StopMenu() {
			if(ie5 || ns6) {
				clearTimeout(timerLSM);
				for(i=0;i<lnk.length;i++) 
				lnk[i].style.letterSpacing = 0 + "px";
			}
		}

		function LSMenuInit() {
			if((ie5||ns6) && !window.opera){
				lnk = document.getElementById("menucont").getElementsByTagName("a");
				cnt = document.getElementById("menucont");
				cnt.style.textAlign= "center";
				cnt.onmouseover=StopMenu;
				cnt.onmouseout=LetterSpacingMenu;
				document.getElementById("bdy").style.visibility = "visible";
				LetterSpacingMenu();
			}
			else {
			alert('Sorry, this site is optimized for IE5+ and all Gecko-based browsers Mozilla, NS6+ and FireFox.');	 
			location.href=('about:blank'); 
			}
		}
		
		function OpenWin(URL, theX, theY){
				var w = theX;
				var h = theY;
				var x = (screen.width-w)/2;
				var y = (screen.height-h)/2;
				newWin = window.open (''+ URL +'','','width=' + w + ',height=' + h + ',top=' + y + ',left=' + x + '');
				newWin.focus();
		}
		
		function validateNotEmpty( strValue ) {
			var strTemp = strValue;
			strTemp = trimAll(strTemp);
				if(strTemp.length > 0){
					return true;
				}  
			return false;
		}
		
		function trimAll( strValue ) {
			var objRegExp = /^(\s*)$/;

			if(objRegExp.test(strValue)) {
				strValue = strValue.replace(objRegExp, '');
				if( strValue.length == 0)
					return strValue;
			}
	
			objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
				if(objRegExp.test(strValue)) {
				strValue = strValue.replace(objRegExp, '$2');
				}
			return strValue;
		}