<!-- Hide script from old browsers
//

function readMarker( pBuffer, pStart, pFinish )
{
	var start = pBuffer.indexOf( pStart ) + pStart.length;
	var finish = pBuffer.indexOf( pFinish );
	if ( (start >= 0) && (finish >= 0) )
	{
		var buffer = pBuffer.substring( start, finish );
		return buffer;
	}
	return pBuffer;
}

function removeMarker( pBuffer, pStart, pFinish )
{
	var start = pBuffer.indexOf( pStart );
	var finish = pBuffer.indexOf( pFinish ) + pFinish.length;
	if ( (start >= 0) && (finish >= 0) )
	{
		var buffer = pBuffer.substring( 0, start ) + pBuffer.substring( finish, pBuffer.length );
		return buffer;
	}
	return pBuffer;
}

function generatePrintWindow()
{
	var newWindow = window.open( 'blank.htm', '_blank', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=720' );
	
	newWindow.document.writeln( '<html>' );
	newWindow.document.writeln( '<HEAD>' );
	newWindow.document.writeln( '<LINK href="styles/Styles.css" type="text/css" rel="stylesheet">' );
	newWindow.document.writeln( '<script language="javascript">' );
	newWindow.document.writeln( 'function print_window()' );
	newWindow.document.writeln( '{' );
	newWindow.document.writeln( '  print_table.innerText = "";' );
	newWindow.document.writeln( '  window.print();' );
	newWindow.document.writeln( '  setTimeout( "window.close();", 500 );' );
	newWindow.document.writeln( '}' );
	newWindow.document.writeln( '</script>' );
	newWindow.document.writeln( '</HEAD>' );
	newWindow.document.writeln( '<body>' );

	if ( window.print )
	{
		newWindow.document.writeln( '<table id="print_table" border="0" width="100%">' );
		newWindow.document.writeln( '<tr><td align="center"><h1>Printable View</h1></td></tr>' );
		newWindow.document.writeln( '<tr><td align="center">To print this document please press <input type="button" name="windowAction" value="Print" onclick="javascript:print_window()"></td></tr>' );
		newWindow.document.writeln( '</table>' );
	}
	else if ( brand.indexOf( 'mac' ) != -1 )
	{
		alert( "Press 'Cmd+p' on your keyboard to print this document." );
	}
	else
	{
		alert( "Press 'Ctrl+p' on your keyboard to print this document." )
	}

	var buffer = document.body.innerHTML;
	buffer = readMarker( buffer, '<!--PRINTABLE_START-->', '<!--PRINTABLE_FINISH-->' );
	
	while( buffer.indexOf( '<!--DONT_PRINT_START-->' ) >= 0 )
	{
		buffer = removeMarker( buffer, '<!--DONT_PRINT_START-->', '<!--DONT_PRINT_FINISH-->' );
	}
	
	buffer = buffer.replace( 'TABLE class=Panel', 'TABLE ' );
	buffer = buffer.replace( /onmousewheel/g, 'nop' );
	buffer = buffer.replace( /onclick/g, 'nop' );
	buffer = buffer.replace( /onmouseup/g, 'nop' );
	buffer = buffer.replace( /onmousedown/g, 'nop' );
	buffer = buffer.replace( /onmousemove/g, 'nop' );
	buffer = buffer.replace( /onmouseout/g, 'nop' );
	buffer = buffer.replace( /onmouseover/g, 'nop' );

	newWindow.document.writeln( buffer );
	
	newWindow.document.writeln( '</body>' );
	newWindow.document.writeln( '</html>' );
	
	newWindow.document.close();
}

// -->
