	function	toggleCodeExample( id, type )
	{
		if( typeof document.getElementById == "undefined" )
		{
			alert( "This feature works only in browsers with DOM support, please download Mozilla or Microsoft Internet Explorer" );
			return;
		}

		var	tmp	=	document.getElementById( "codeExample" + id );
		
		if( type.toLowerCase() == "output" )
		{
			var	div	=	tmp.nextSibling.nextSibling;
			if( div.className != 'codeOutput' )
			{
				alert( "Code outout not available for this example." );
				return;
			}
		}
		else
		{
			var	div	=	tmp.nextSibling;
		}

		if( div.style.display == "none" )
			div.style.display	=	"block";
		else
			div.style.display	=	"none";
	}
	
	function	copyCodeExample( id )
	{
		if( typeof document.all == "undefined" )
		{
			alert( "This feature currently works only in Microsoft Internet Explorer." );
			return;
		}

		id	=	id + 3;
		var	div			=	document.getElementById( "codeContent" + id );

		var	text		=	"";
		var	lines		=	div.innerText.split( "\n" );
		var	re			=	new	RegExp( "([0-9]+)(.*)", "i" );
		for( var i = 1; i < lines.length; i++ )
		{
			var	arr		=	re.exec( lines[i] );
			text		=	text + arr[2];		
		}

		window.clipboardData.setData( "text", text );
		alert( "Code example has been copied to clipboard." );
		return;
	}


