/*START EXPORT JS FILE*/
	var prev_id;	
	prev_id = -1;
	var clueboxmode;
	clueboxmode = true;
	var letters = "sdtwuuicarvecutbacktzculluwatusshubieemnt-tubeaerialfrariplloglshoulderalotmterspongereqnwlpguga-aopeuiokiscualvoinsteamerlanesurfingyaplrrygn";
	var cluesA = [,
,
,
"Deep turn",
"Return to the breaking wave",
,
"One of many quality Indonesian surf breaks.",
,
"Someone who buys surf gear and clothing but does not surf",
"Wave hollow",
"Gorkin Flip, for example",
,
"Strong current heading out to sea",
,
"______________ - hop",
,
,
"Body boarder",
,
,
,
,
,
,
"Famous Santa Cruz, California surf spot. ",
"Surface water sport",
,
,
];
	var cluesD = ["______________ - stance (ambidextrous foot)",
"Dive under oncoming wave",
"Lonboarder's duck-dive (two words)",
,
,
"Florida's first four-time world champ ('84 - '88)",
,
"Quick sharp turn",
"Slow down",
,
,
"Atop the breaking wave",
,
"Young surfer",
,
"Surfing technique pioneered by Laird Hamilton, Buzzy Kerbox, Dave Kalama, and others.",
"Right footed",
"Cutting off, or burning",
"Ultra clean surf",
"Collection of surfboards",
"Nose dive that ends the ride",
"Left footed",
"Same thing as a sea only bigger",
"Generate speed",
,
,
,
,
];

	function check( down )
	{
		var i;
		for ( i = 0; i < 142; i++ )
		{
			obj = document.all[ 'b' + i ] ? document.all[ 'b' + i ] : document.all[ 'c' + i ];
			if ( obj )
			{
				if ( down )
					obj.style.backgroundColor = (document.all[ 'c' + i ].innerText.toLowerCase() == letters.charAt(i)) ? "#66CC66" : "#FF6666";
				else
					obj.style.backgroundColor = "#FFFFFF"
			}
		}
	}

	function clearall()
	{
		var i;
		for ( i = 0; i < 142; i++ )
		{
			obj = document.all[ 'c' + i ];
			if ( obj )
				obj.innerHTML = "&nbsp;";
		}
	}

	function klthis( id )
	{
		var obj;
		

		if( prev_id != -1 )
		{
			obj = document.all[ 'b' + prev_id ] ? document.all[ 'b' + prev_id ] : document.all[ 'c' + prev_id ];
			if( obj ) obj.style.backgroundColor="#FFFFFF";
		}

		obj = document.all[ 'b' + id ] ? document.all[ 'b' + id ] : document.all[ 'c' + id ];
		if( obj ) obj.style.backgroundColor="#6699FF"; 

		prev_id = id;

		if( clueboxmode )
		{
                       
			if( document.all[ 'b' + id ] )
			{
				document.all[ 'ac' ].innerText = '';
				var sentence = new String(document.all[ 'b' + id ].innerText);
				var num = '';
				for( i=0; i < sentence.length; i++ )
					if( sentence.charAt(i) >= '0' && sentence.charAt(i) <= '9')
						num = num + sentence.charAt(i);
				var inner = '';
				if( cluesA[num-1] )
					inner = '<div class="clueh">Across</div><br>' + '<b>' + num + '.</b>&nbsp;' + cluesA[num-1]+'<br><br>';
				if( cluesD[num-1] )
					 inner = inner + '<div class="clueh">Down</div><br>' + '<b>' + num + '.</b>&nbsp;' + cluesD[num-1];
				document.all[ 'ac' ].innerHTML = inner;
			}
		}

	}
	function kpress(evnt) 
	{
		var obj;

		if( prev_id != -1 )
		{
			obj = document.all[ 'c' + prev_id ];
			if( obj )
			{
				if ( ( evnt.keyCode >= 0x41 && evnt.keyCode <= 0x5A ) ||
				( evnt.keyCode >= 0x61 && evnt.keyCode <= 0x7A ) ||
				( evnt.keyCode >= 0x30 && evnt.keyCode <= 0x39 ) ||
				evnt.keyCode == 0x2D || evnt.keyCode == 32 )					
				{
					if ( evnt.keyCode == 32 )
						obj.innerHTML = "&nbsp;";
					else
						obj.innerText = String.fromCharCode( evnt.keyCode );
				
					evnt.returnValue = false;
				}
			}
		} 
	}
	function showltr()
	{
		if( prev_id != -1 )
		{
			obj = document.all[ 'c' + prev_id ];
			if( obj ) obj.innerText = letters.charAt(prev_id);
		
		}		
	}
	function showall()
	{
		var i;
		for ( i = 0; i < 142; i++ )
		{
			obj = document.all[ 'c' + i ];
			if ( obj )
				obj.innerText = letters.charAt(i);
		}

	}

/*END EXPORT JS FILE*/
