// Validators Display, JavaScript
//  for the NEUMES Project website.
// Copyright 2005-2007, Louis W. G. Barton
// Version: 25 July 2007

/* Abstract:
 * - This Div is free-standing.
 * - Displays W3C Validators icons for HTML and/or CSS, depending on JavaScript flags in the
 *   HTML document, and passes path of the W3C Validators to the document as an HRef.
 * - Inline JS of HTML page may include the following,
 *     var _HTMLvalid='4.01 Transitional';
 *	 OR
 *     var _HTMLvalid='4.0 Transitional';
 *     var _CSSvalid='true';
 */

// Display HTML and CSS validation icons; include HRef to this document:
// ['background-color:transparent' is necessary for Mozilla]
if(window._HTMLvalid || window._CSSvalid) {
	// The Div for this:
	document.writeln('<div ' +
	  'style=\"margin-top:15px; margin-left:14px; margin-bottom:0px; margin-right:14px; ' +
	  'font-family:Geneva,arial,sans-serif; font-size:10px; background-color:transparent; ' +
	  'font-weight:bold; color:rgb(0, 51, 102);\">');
	document.writeln('<br>');

	// HTML 4.01 Transitional:
	// [comes first for shortcut evaluation of more-common case]
	if('4.01 Transitional' == window._HTMLvalid) {
		document.writeln('<a href=\"http:\/\/validator.w3.org\/check?uri=' +
		  window.location.href + '\" target="_webpageValidation" ' +
		  'style="background-color:transparent; color:inherit;">' +
		  '<img width="88" height="31" ' +
		  'src="http:\/\/www.scribeserver.com\/NEUMES\/images\/w3c_html401.gif" ' +
// '<img src="http:\/\/www.w3.org\/Icons\/valid-html40" ' +
		  'style="vertical-align:middle;" border="0" ' +
		  'alt="Valid HTML 4.01 Transitional.">' +
		  '<\/a> &nbsp; Pass: <i>W3C<\/i> HTML 4.01 Transitional validator. ' +
		  '&nbsp;&nbsp;');
// &radic;
	}  //[end, if _HTMLvalid 4.01]

	// HTML 4.0 Transitional:
	else if ('4.0 Transitional' == window._HTMLvalid) {
		document.writeln('<a href=\"http:\/\/validator.w3.org\/check?uri=' +
		  window.location.href + '\" target="_webpageValidation" ' +
		  'style="background-color:transparent; color:inherit;">' +
		  '<img width="88" height="31" ' +
		  'src="http:\/\/www.scribeserver.com\/NEUMES\/images\/w3c_html40.gif" ' +
		  'style="vertical-align:middle;" border="0" ' +
		  'alt="Valid HTML 4.0 Transitional.">' +
		  '<\/a> &nbsp; Pass: <i>W3C<\/i> HTML 4.0 Transitional validator. ' +
		  '&nbsp;&nbsp;');
	}  //[end, if _HTMLvalid 4.0]

	// CSS:
	if('true' == window._CSSvalid) {
		document.writeln('<a ' +
		  'href=\"http:\/\/jigsaw.w3.org\/css-validator\/validator?uri=' +
		  window.location.href + '\" target="_webpageValidation" ' +
		  'style="background-color:transparent; color:inherit;">' +
		  '<img width="88" height="31" ' +
		  'src="http:\/\/www.scribeserver.com\/NEUMES\/images\/w3c_css.gif" ' +
// '<img src="http:\/\/jigsaw.w3.org\/css-validator\/images\/vcss" ' +
		  'style="vertical-align:middle;" border="0" ' +
		  'alt="Valid CSS."><\/a> &nbsp; Pass: <i>W3C<\/i> CSS validator.');
	}  //[end, if _CSSvalid]

	document.writeln('<\/div>');
}  //[end, if]


/*	FN: INIT
 *
 * For browser synchronization: to force wait in page load.
 */
function validators_display_init() {
	return false;
}  //end, validators_display_init()

/*[end, validators_display.js]*/