
	IsNs = ( navigator.appName.indexOf("Netscape") >= 0 )? true:false;
	
	
	var _x;
	var _y;
	var lastKeyPress;

	document.onmousemove	= GrabMouseCoordinates;
	document.onkeydown	= GrapKeyPress;

	if (IsNs) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.MOUSEMOVE | Event.KEYDOWN);
	//#####################################################################
	function switchClass(obj,strClassName) {
		obj.className	= strClassName;
	}
	//#####################################################################
	function gotoURL(strUrl) {
		location = strUrl;
	}
	//#####################################################################
	function displayConfirm(text, URL) {
		if (confirm(text)) location.href = URL
	}
	//#####################################################################
	function openPopup(windowname, URL, sw, sh) {
		popWindow = window.open(URL,windowname,"scrollbars=auto,status=yes,resizable=yes,width=" + sw + ",height=" + sh);
	}
	//#####################################################################
	function sendMessage(intUserID) {
		window.open("onlinelist.asp?mode=1&userid=" + intUserID, "MessagePopup", "width=400,height=190,scrollbars=no, resizable=yes, status=no");
	}
	//#####################################################################
	function readMessage(intMessageID) {
		window.open("onlinelist.asp?mode=4&messageid=" + intMessageID, "MessagePopup" + intMessageID, "width=400,height=340,scrollbars=yes, resizable=yes, status=no");
	}
	//#####################################################################

	//#####################################################################

	//#####################################################################

	//#####################################################################
	function checkEnterPress(functionToCall) {		
		if(lastKeyPress == 13) {
			eval(functionToCall);
		}		
	}
	//#####################################################################
	function SetOption(obj,strValue) {
		if(strValue != '') {
			for(i = 0; i < obj.length; i++) {
				if(obj.options[i].value == strValue) obj.options[i].selected = true;
			}
		}
	}
	//#####################################################################
	function GrapKeyPress(e) {
		if (IsNs)
			var iKey=e.which;
		else
			var iKey=event.keyCode;
			
		lastKeyPress = iKey;
	}
	//#####################################################################
	function GrabMouseCoordinates(e) {
		
		if(IsNs) {
			_x = e.clientX;
			_y = e.clientY
			//window.pageYOffset
		}
		else {
			_x = window.event.clientX;
			_y = window.event.y + document.body.scrollTop
		}
		
		//Debug :
		//status = _x + 'x' + _y
		//status = document.body.scrollTop;
	
		return true;
	}
	//#####################################################################


	function threadInfoBox(objImg, intThreadID, strMode) {
		
		objBoxDiv			= document.getElementById('threadInfo' + intThreadID);
		objBoxDiv.style.display		= ((strMode=='over') ? '' : 'none');
		objBoxDiv.style.left		= (getElementLeft(objImg) - parseInt(objBoxDiv.style.width));
		objBoxDiv.style.top		= getElementTop(objImg);
	}
	
	function replyInfoBox(objImg, intReplyID) {

		strImageName		= objImg.src.toString().toLowerCase();
		strImageName		= strImageName.substring(strImageName.lastIndexOf('/')+1);
		strNewImageName		= (strImageName.indexOf('plus') == -1)? 'forum_showthread_plus.gif':'forum_showthread_minus.gif';

		objInfoBox		= document.getElementById('replyInfo' + intReplyID);
		strDisplay		= objInfoBox.style.display.toString().toLowerCase();
		strDisplay		= (strDisplay == '')? 'none':'';
		objInfoBox.style.display= strDisplay;
		objImg.src		= '/image/' + strNewImageName;

		var dtmExpireDate	= new Date();
		dtmExpireDate.setTime(dtmExpireDate.getTime() + 365 * 24 * 60 * 60 * 1000);

		if(!getCookie('forumReplyInfoBox'))
			alert('Please note that this is effect all forum threads');
			
		setCookie('forumReplyInfoBox', strDisplay + ' ', dtmExpireDate, '/') ;
	}

	
	//========================================================================
	function getElementTop( obj ) {

	    y = 0;
	    
	    while (obj.offsetParent != null) {
	      y += obj.offsetTop;
	      obj = obj.offsetParent;
	    }
	    y += obj.offsetTop;
	    
	    return parseInt(y);
	}
	//========================================================================
	function getElementLeft( obj ) {
	
	    x = 0;
	    
	    while (obj.offsetParent != null) {
	      x += obj.offsetLeft;
	      obj = obj.offsetParent;
	    }
	    x += obj.offsetLeft;
	    
	    return parseInt(x);
	}	