	/**	Disable Right Click Start Here	*/
	//isNN = document.layers ? 1 : 0;
	function noContext(){return false;}
	function noClick(e){
		if(isNN){
			if(e.which > 1) {return false;}
		} else { 
			if(event.button > 1){return false;}
		}
	}

/*
	if(isNN){ document.captureEvents(Event.MOUSEDOWN); }
	document.oncontextmenu = noContext;
	document.onmousedown   = noClick;
	document.onmouseup     = noClick;
*/
	/**	Disable Right Click End Here	*/
	
	/**	Disable Text Selection Start Here	*/
	function disableSelection(target)	{
		if (typeof target.onselectstart!="undefined") //IE route
			target.onselectstart=function(){return false}
		else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
			target.onmousedown=function(){return false}
		target.style.cursor = "default"
	}

	//Sample usages
	//disableSelection(document.body); //Disable text selection on entire body
	//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"
	
	/**	Disable Text Selection End Here	*/
	
function mystatus(dId)	{
		var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
	/* Non-IE */
	myWidth = (window.innerWidth-16);
	myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	/* IE 6+ in 'standards compliant mode' */
	myWidth = (document.documentElement.clientWidth+4);
	myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	/* IE 4 compatible */
	myWidth = (document.body.clientWidth+4);
	myHeight = document.body.clientHeight;
  }
  
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
	/* Netscape compliant */
	scrOfY = window.pageYOffset;
	scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	/* DOM compliant */
	scrOfY = document.body.scrollTop;
	scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	/* IE6 standards compliant mode */
	scrOfY = document.documentElement.scrollTop;
	scrOfX = document.documentElement.scrollLeft;
  }
	
	div_id = document.getElementById(dId);
	if(div_id.style.display=='')	{
		div_id.style.display='none';		
		return false;
	}else	{
		div_id.style.display='';
		div_id.style.left = (myWidth+scrOfX-646)/2+'px';
		/* sendRequest('users_view.php?req=1', 'navwin_res'); */
		return false;
	}		
	return false;
}

function viewdetail(nw, rq)	{
	mystatus(nw);
	document.getElementById(nw).style.display='';
	sendRequest(rq, 'navwin_res');
	return false;
}

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
	  retValue = retValue.substring(1, retValue.length);
	  ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
	  retValue = retValue.substring(0, retValue.length-1);
	  ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
	  retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function
