//Given a course name and department/number, generates the proper html

function generate_course_header(name, dept, number, section) {
	var out = "";

	out += "<div id=\"break\"> </div>";
	out += "<div id=\"course_name\">" + name + "</div>";
	
	if(dept == ""){out += "<br>"}
	else if(section != ""){ out += "<div id=\"course_numb\">" + dept + " " + number + "-" + section + "</div>"; }
	else{ out += "<div id=\"course_numb\">" + dept + " " + number + "</div>"; }
	out += "<div id=\"break\"> </div>";
	
	document.write(out);
};
function generate_assignment(name, desc) {
	var out = "";

	out += "<div id=\"assignment_name\">" + name + "</div>";
	if(desc != "")out += "<div id=\"assignment_desc\">" + desc + "</div>";
	out += "<div id=\"break\"> </div>";
	
	document.write(out);
};function show_picture (whichpic) {
	if (document.getElementById) { 
		document.getElementById('place').src = whichpic.href; 
		//if (whichpic.title) { 
		//	document.getElementById('caption').childNodes[0].nodeValue = whichpic.title; 
		//} else { 
		//	document.getElementById('caption').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; 
		//} 
		return false; 
	} else { 
		return true; 
	} 
};

function news_item(date, head, body){
	var out = "";
	
	out += "<div id=\"news\">";
	out += "<div id=\"head\">  " + head + "</div>";
	out += "<div id=\"date\">" + date + "</div>";
	out += "<div id=\"body\">  " + body + "</div>"; 
	out += "</div>";
	out += "<div id=\"break\"> </div>";
	
	document.write(out);
}