// JavaScript Document

	var w3c =
	{
		init : function ()
		{
			w3c.capture();
		},
		capture : function()
		{
			try
			{
				var capturedKeys = new Array();
				if (document.layers) document.captureEvents(Event.KEYPRESS);
				document.onkeypress = function (evt) 
				{
					
					var key = document.layers ? evt.which : document.all ? event.keyCode : (evt.which || evt.charCode || evt.keyCode);
					
					if (key >= 32)
					{
						// 87 = Shift + W // alert(key);
						if ( key == 87 && document.getElementById('KeypressCaptureZone').style.display == 'none')
						{
							document.getElementById('KeypressCaptureZone').style.display='block';
							w3c.applyLinks();
						}
						else
						{
							document.getElementById('KeypressCaptureZone').style.display='none';
						}
						//capturedKeys[capturedKeys.length] = String.fromCharCode(key);
						//window.status = capturedKeys;
						
					}
					return true;
				}
			}catch(e){}

		},
		applyLinks : function()
		{
			try
			{
				var w3c_xhtml = document.getElementById('w3c_xhtml');
				var w3c_css = document.getElementById('w3c_css');
				
				w3c_xhtml.href = 'http://validator.w3.org/check?uri=referer';
				w3c_css.href = 'http://jigsaw.w3.org/css-validator/validator?uri=http://' + window.location.hostname + window.location.pathname;
			}
			catch(e) {}
		}
	}
	Core.start(w3c);
	

