function DESemail(emailname,emailserver) {
	document.write("<a href='mailto:" + emailname + "@" + emailserver +"'>");
	document.write(emailname + "@" + emailserver); 
	document.write("</a>"); 
}

function closeInstructions() {
	if($.browser.msie) {
		$("#instructions").fadeOut();
	} else {
		$("#instructions").hide("puff", { }, 350);
	}
	$("#question_scoring").css("background","#ffc");	
}
	
	
$(document).ready(function(){
	
	if (document.getElementById("open_help") && document.getElementById("question_help")) {
		
		$("#open_help").click(function() {
			
			var questID = $(this).attr("rel");
			
			$("#question_help").load(
				"/incs/ajax/question_help.php?id="+questID+"",
				function() {
					$("#question_help").dialog({
						height: 400,
						width: 500,
						position: ["center", 50],
						resize:function(){
							$("#alert").height($(this).height()-50);
							$("#alert").width($(this).width()-30);
						}
					});
				}
			);
			return false;
		});
	}
	
	if (document.getElementById("home_quotes")) {
		$('#home_quotes').cycle({ 
			fx:      'turnDown', 
			speed:    500, 
			timeout:  8000 
		});
	}
	
	if (document.getElementById("score_options")) {
		$("#score_options li a").click(function() {
			var thisText = $(this).text();
			$(this).text(thisText+"...");
			$(this).addClass('clicked');
		});
	}
	

	if (document.getElementById("instructions")) {
		$("#instructions").fadeIn(500);
		
		itime = setTimeout("closeInstructions()", 8000);
		
		$("#close_instructions").click( function() {
			closeInstructions();
			clearTimeout(itime);
			return false;
		});
	}
	
	
	
	
});





