rendered paste body<script language="JavaScript1.2" type="text/javascript">
/*******************************************************************
Made by Martial Boissonneault © 2001 http://getElementById.com/
May be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
********************************************************************/
function ShowHide(obj, visibility) {
if(document.getElementById){
divs = document.getElementsByTagName("div");
divs[obj].style.display = visibility;
}
}
function toggleConfirm(obj) {
if(document.getElementById){
divs = document.getElementsByTagName("div");
if(divs[obj].style.display == 'block') {
divs[obj].style.display = 'none';
}
else {
divs[obj].style.display = 'block';
}
}
}
<!--
function convertPreBlocks() {}
var regular = "x-small";
function bigger(thing){
thing.style.fontSize = "large";
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="LI") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="LI") {
siblingElement.style.fontSize = "medium";
break;
}
siblingElement = siblingElement.nextSibling;
}
}
function normal(thing){
thing.style.fontSize = regular;
siblingElement = thing.previousSibling;
while(siblingElement) {
if(siblingElement.tagName=="LI") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.previousSibling;
}
siblingElement = thing.nextSibling;
while(siblingElement) {
if(siblingElement.tagName=="LI") {
siblingElement.style.fontSize = regular;
break;
}
siblingElement = siblingElement.nextSibling;
}
}
// -->
</script>
<fieldset><legend><a href="javascript:toggleConfirm('taxo_id_container');">Looking for a specific keyword?</a></legend>
<div id="taxo_id_container">
<TABLE width="100%" cellpadding="0" cellspacing="0"><TR>
<?php
$i = 0;
function is_lesson($tid) {
$sql = db_rewrite_sql(db_query("SELECT n.type, ctl.field_skypecast_url_value FROM node n INNER JOIN term_node tn ON tn.nid = n.nid INNER JOIN content_type_lesson ctl ON ctl.nid = n.nid WHERE tn.tid = '$tid' AND n.type = 'lesson'"));
if (mysql_num_rows($sql) != 0) { $is_lesson = '<div class="asterisk">*</div>';}
while ($result = db_fetch_object($sql)) {
if ($result->field_skypecast_url_value != '') { $has_screenie = ' <div class="has_screencast">√</div>';}
}
$output = $is_lesson . $has_screenie;
return $output;
}
$sql = db_rewrite_sql(db_query("SELECT DISTINCT td.tid, td.name FROM term_data td INNER JOIN term_node tn ON td.tid = tn.tid WHERE td.vid = 1 ORDER BY td.name"));
$max_i = ceil(mysql_num_rows($sql) / 4);
while ($result = db_fetch_object($sql)) {
if ($i == 0) { print '<TD valign="top" width="25%"><div id="taxo_list"><UL >'; }
$i++;
print '<LI' . /* onmouseover="bigger(this)" onmouseout="normal(this)" */ '> <a href="/' . drupal_get_path_alias("taxonomy/term/$result->tid") . '">' . $result->name .'</a>' . is_lesson($result->tid) . ' </LI>';
if ($i == $max_i) {$i = 0; print '</UL></div></TD>'; }
}
?>
</TD></TR>
<TR><TD colspan="4" align="right" class="taxo_legend">* covered in a lesson<BR>
√ has screencast</TD></TR></TABLE>
</div>
</fieldset>