/*function initSyllabusSample(myRand) {
	id = 'syl'+myRand
	new Ajax('', {update:id}).request();
}
function loadSyllabusSample(id) {
	// requires loading mootools first
	$('container').effect('opacity',{duration:1000, fps:50, onComplete:completeLoadSyllabusSample}).start(1,0);
};

function completeLoadSyllabusSample() {
	new Ajax('displaytime.php', {update:'container', onComplete:fadeInContainer}).request();
}


}*/

function loadSyllSample(courseId, containerId) {
	container = document.getElementById(containerId);
	function showSyll (responseTree, responseElements, content, responseJavaScript) {
		children = container.getElementsByTagName('div');
		syll = children[0];
		for (var i=0; i<children.length; i++)
			if (children[i].className.indexOf('actual_syllabus')>=0)
				syll = children[i];
		syll.innerHTML = content;
		container.style.display = 'inline';
	}
	myUrl = 'http://humanities.tau.ac.il/yedion/08-09/courses/short-syll.php?id='+courseId;
	var req = new Request.HTML({
		method: 'get',
		encoding: 'windows-1255',
		url: myUrl,  
		onComplete: showSyll,
		evalScripts: true
	}).send();
	
	
}

function toggleSyllabus(courseId, containerId) {
	obj = document.getElementById(containerId);
	if (obj.style.display=='none' || obj.style.display=='')
		loadSyllSample(courseId, containerId);
	else
		obj.style.display = 'none';
}
