

if (document.images) {

		n0r = new Image();
        n0r.src="gif/sidenav/home_o.gif";
		
		n1r = new Image();
        n1r.src="gif/sidenav/speakerprofile_o.gif";
        
        n2r = new Image();
        n2r.src="gif/sidenav/contactus_o.gif";
        
        n3r = new Image();
        n3r.src="gif/sidenav/aboutus_o.gif";
                  
        n4r = new Image();
        n4r.src="gif/sidenav/featuredspeakers_o.gif";
                  
        n5r = new Image();
        n5r.src="gif/sidenav/speaker_o.gif";
		  
		n6r = new Image();
        n6r.src="gif/sidenav/faq_o.gif";
		  
	 	n7r = new Image();
        n7r.src="gif/sidenav/links_o.gif";

		n8r = new Image();
        n8r.src="gif/sidenav/home_o.gif";

		n9r = new Image();
        n9r.src="gif/sidenav/privacypolicy_o.gif";

		n10r = new Image();
        n10r.src="gif/sidenav/request_on.gif";
        
//

		n0 = new Image();
        n0.src="gif/sidenav/home.gif";

		n1 = new Image();
        n1.src="gif/sidenav/speakerprofile.gif";

        n2 = new Image();
        n2.src="gif/sidenav/contactus.gif";

        n3 = new Image();
        n3.src="gif/sidenav/aboutus.gif";
                  
        n4 = new Image();
        n4.src="gif/sidenav/featuredspeakers.gif";

        n5 = new Image();
        n5.src="gif/sidenav/speaker.gif";
		  
		n6 = new Image();
        n6.src="gif/sidenav/faq.gif";
		  
		n7 = new Image();
        n7.src="gif/sidenav/links.gif";

		n8 = new Image();
        n8.src="gif/sidenav/home.gif";

    	n9 = new Image();
        n9.src="gif/sidenav/privacypolicy.gif";

		n10 = new Image();
        n10.src="gif/sidenav/request.gif";
       
            
        }

       
function imgRoll(img_id) {
        if (document.images) {
                document[img_id].src = eval(img_id + "r.src");                
        }
}


function imgReset(img_id) {
        if (document.images  && img_id!=active) {
                document[img_id].src = eval(img_id + ".src");
        }
}

var active="";
function activate(img_id) {
                if (active.length >0){
                                document[active].src = eval(active + ".src");
                }
                active=img_id;
                document[active].src = eval(active + "r.src");
}

function change_category(x) {
	if(x == -1) return true;
	var option = new Array();
	document.advform_category.topic.length = 0;
	var counter = 0;
	<?
		global $DB;
		$result = $DB->associative_array("SELECT topic.topic_id, topic.name, category.category_id, category.name AS cname FROM topic, category WHERE category.category_id = topic.category_id ORDER BY category.name, topic.name;");
		reset($result);
		while(list($id,$element) = each($result)) {
			$catid = $element[category_id];
			$topic_list[$catid][$id][topic_id] = $element[topic_id]; 
			$topic_list[$catid][$id][name] = $element[name]; 
		}
		reset($topic_list);
		$categories = $topic_list;
		while(list($cat_id,$topics) = each($categories)) { 
		?>	
			if(x == <?echo ($cat_id)?>) {
				option[0] = new Option("View all in this category","-1");
				<?
				$k = 1;
				while(list($category_id,$topics) = each($topic_list)) {
					if ($category_id==$cat_id) {
						foreach ($topic_list[$cat_id] as $topic) {
							$topic_name = addslashes(ereg_replace("[\r\n]+"," ",$topic[name]));
							echo("option[$k] = new Option('$topic_name','$topic[topic_id]');\n");
							echo("counter++;\n");
							$k++;
						}
					}
				}
				?>
			}
				<?
		reset($topic_list);
		}
		?>
	for(i=0;i <= counter;i++) {
		eval("document.advform_category.topic.options[" + i + "] = option[" + i + "]");
	}
	document.advform_category.topic.options[0].selected = true;
	document.advform_category.topic.focus();
}

function redirect(id){
	alert ("change page");
		window.location="http://"+document.domain+"/profile.php?s_id="+id;
}
//-->
