 document.observe("dom:loaded", function() {
	var tds = $A($("classTable01").getElementsByTagName("td"));
	tds.each(function(obj) {
		var text = obj.innerHTML;
		text = text.replace(/Ashtanga/g, "Ashtanga<br>");
		text = text.replace(/Basics/g, "Basics<br>");
		text = text.replace(/Advanced/g, "Advanced<br>");
		text = text.replace(/Pranayama/g, "Pranayama<br>");
		text = text.replace(/Lecture/g, "Lecture<br>");
		text = text.replace(/Basic /g, "Basic<br>");//for : Hot Basic, Yoga Basic
		text = text.replace(/Meditation /g, "Meditation<br>");
		
		if(text.indexOf("Ashtanga<br> Intro")!=-1) {//force to nowarp and take away "*"
			text = text.replace("Gladys*", "Gladys");
			text = text.replace(/Ashtanga<br> Intro /g, "<span style='font-size:11px;font-weight:bold;font-family:Times New Roman;'>Ashtanga Intro</span><br> ");
		}
		
		if(text.indexOf("DaDa*")) {
			text = text.replace("teachers02.php?id=83", "events05_dada.htm");
		}
		if(text.indexOf("Mario*")) {
			text = text.replace("Mario*", "<a href='classes02.php?id=17#teacherBIO'>Mario*</a>");
		}
		if(text.indexOf("Jharna*")) {
			text = text.replace("Jharna*", "<a href='classes02.php?id=17#teacherBIO'>Jharna*</a>");
		}
		if(text.indexOf("Adarsh")) {
			text = text.replace("Adarsh", "<a href='workshops_201002_AdarshWilliams.php'>Adarsh</a>");
		}
		
		if(text.indexOf("Ayurveda Lecture")!=-1) {
			text = "<strong class='orsmall'><a href='#89983' class='orsmall' style='text-decoration:none;'>&#36;</a></strong> " + text;
		}
		if(text.indexOf("Ayurveda Mini Workshop阿育吠陀學習工坊")) {
			text = text.replace("Ayurveda Mini Workshop阿育吠陀學習工坊", "<a href='http://www.withinspace.com/workshops_201001_RachelTsai.php'>Ayurveda Mini Workshop阿育吠陀學習工坊</a>");
		}
		if(text.indexOf("Kino")) {
			text = text.replace("Kino", "<a href='http://www.withinspace.com/workshops_201003_Kino.php'>Kino</a>");
		}
		
		
		obj.innerHTML = text;
	});
 });
 
 function resetList() {
	$("viewSchedule")['classTypeID'].options[0].selected=true;
	$("viewSchedule")['bioID'].options[0].selected=true;
	$("viewSchedule").submit();
 }
 
 function resetTheOtherBox(name) {
	$$("#viewSchedule select").each(function(element){
		if(element.name!=name) {
			element.options[0].selected=true;
		}
	});
 }