// This script file used by feedback, feedback_events, CenteredOnTheEdge/exploration_feedback
// For javascript debugging, use Internet Explorer, uncheck "disable script debugging (IE)"
// through"Tools/Internet Options/Advanced/Browsing"

	var retindex = 0;
	var text = new Array();
	text[0] = "DREAM";
	text[1] = "GLASS";
	text[2] = "WATCH";
	text[3] = "JUMPS";
	text[4] = "SHOOT";
	text[5] = "CLIMB";
	text[6] = "PARKS";
		
	function randomize_index() 	{
		return Math.floor(Math.random() * (text.length));
	}
	
	function display_code(dir,index) {
	    document.write('<img src="' + dir + 'art/spamtest/string' + index + '.jpg" width="90" height="30">');
	}
	
	function check_code(form) {
	var str = form.spamcode.value;
	str = str.toUpperCase();
	if (str != text[retindex]) {
		if (str == '')
			str = 'No code word entered (next to colored box).';
		else
			str = '"' + str + '"' + ' entered.';
		alert(str + "  Please re-enter the colored word you see.");
		return false;
		}
	else
		return true;
	}

