
//*******************	SHOW/HIDE DIV	********************************************************************

function showDiv(div,vis){ document.getElementById(div).style.display=(vis)?"":"none"; }

function _$(dElem){
	var theElement = document.getElementById(dElem);
	return theElement;
}

//*******************	CHECK BROWSER **********************************************************************

	var strPath = '';
	var dPath = document.location.href;
	var msg;
	
	function checkBrowser()
	// Returns the version of Internet Explorer or a -1
	// (indicating the use of another browser).
	{
		var rv = -1; // Return value assumes failure
	
		if (navigator.appName == 'Microsoft Internet Explorer')
		{
			var ua = navigator.userAgent;
			var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
			if (re.exec(ua) != null)
			  rv = parseFloat( RegExp.$1 );
		}
		/*else if(navigator.appName.indexOf('Netscape') > -1){
			msg = "<link href=\"" + strPath + "css/firefox.css\" type=\"text/css\" rel=\"stylesheet\" />";
		}*/
			
		if ( rv > -1 )
		{
			if ( rv == 6.0 ){
				msg = "<link href=\"" + strPath + "css/IE6hacks.css\" type=\"text/css\" rel=\"stylesheet\" />";
				document.write( msg.toString() );
			}
			//else if( rv == 7 ) { msg = "<link href=\"" + strPath + "css/ie7.css\" type=\"text/css\" rel=\"stylesheet\" />"; }
		}
		return;
	}



//*******************	COPY CODE BLOCK		**********************************************************************

function copyIt() {
	var txtFld = document.getElementById("txtCodeBlock");
	var myTxt;
	var length = txtFld.value.length;
	
	if( txtFld.createTextRange ){
        myTxt = txtFld.createTextRange();
    }
	else if ( txtFld.setSelectionRange ){
        txtFld.focus();
        myTxt = txtFld.setSelectionRange( length, length );
	}
    //now we do the copy
	myTxt.execCommand("Copy");

	window.status="Contents highlighted and copied to clipboard!";
	setTimeout("window.status=''",1800);	
}



//*******************	THIS IS FOR THE NAV		**********************************************************************

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}         
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");         
		}     
	} 
} 

if (window.attachEvent) window.attachEvent("onload", sfHover); 




















//--><!]]>
