//disabletextselection.js Copyright DAS Software (c) 2005 

	/*  include this on pages which you don't want text
			selection to be possible on
			
			pagetextselectable() called with true or false
			will enable or disable text selection on the page.
			With care, the user can disable page text selection
			at the moment that he sets his other code to allow 
			the user to drag or resize something on the page. 
			And then reenable text selection when dragging is 
			no longer in immediate use.
	*/

	function disabletext(e){
		try {
			if(e.target.type == 'text')
				return true
			else
				return false
		}
		catch(e) {
			return false
		}
	}

	function reEnable(){
		return true
	}

	function pagetextselectable(enable) {
		if(enable) {
			//if the browser is IE4+
			document.onselectstart=new Function ('return true');
		
			//if the browser is NS6
			if (window.sidebar){
				document.onmousedown=new Function ('return true');
				document.onclick=new Function ('return true');
			}
		} else {
			//if the browser is IE4+
			document.onselectstart=new Function ('return false');
		
			//if the browser is NS6
			if (window.sidebar){
				document.onmousedown=disabletext
				document.onclick=reEnable
			}
		}
	}