/*
 * Add Class to First LI of Lists in a Content area for IE6 (because it doesn't support :first-child)
 * written by Cyberwoven (JB) in the style of Chris Heilmann's DTSL (above)
 *
 * - Looks for any UL or OL in the content block (defined by contentDivID)
 *   and adds a class (desiredLiClass) to the first list item.
*/
var firstli={
	contentDivID:'leftcol',
	desiredLiClass:'firstlistitem',
	init:function(){

	  if (navigator.appName == 'Microsoft Internet Explorer')
		{
			var ua = navigator.userAgent;
			var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
			if (re.exec(ua) != null) {
				version = parseFloat( RegExp.$1 );
				if (version<=6)
				{
				  var contentarea = document.getElementById(firstli.contentDivID);
				  if (contentarea.childNodes != null) {
				  
					  for (i=0; i<contentarea.childNodes.length; i++){
						  if (contentarea.childNodes[i].nodeName=="OL" || contentarea.childNodes[i].nodeName=="UL")
						  for (j=0; j<contentarea.childNodes[i].childNodes.length; j++){
							  if (contentarea.childNodes[i].childNodes[j].nodeName=="LI")
								  contentarea.childNodes[i].childNodes[0].className = firstli.desiredLiClass;
						  }
					  }
					}
				}
			}
		}
	},
	addEvent: function(elm, evType, fn, useCapture){
		if (elm.addEventListener) 
		{
			elm.addEventListener(evType, fn, useCapture);
			return true;
		} else if (elm.attachEvent) {
			var r = elm.attachEvent('on' + evType, fn);
			return r;
		} else {
			elm['on' + evType] = fn;
		}
	}
}
firstli.addEvent(window, 'load', firstli.init, false);



$(document).ready(
	function()
	{
		$("#menu li").hover(
			function () {$(this).addClass("over");},
			function () {$(this).removeClass("over");}
		);
		
	  var ddlValue = $("select.categorydropdown option:selected").val();
	  if (ddlValue == "multiple")
	  {
	    $('#selectMultipleBox').show();
	  }
	  
		$('select.categorydropdown').change(function () {
      var str =  $("select.categorydropdown option:selected").val();

		  if (str == "multiple"){
			  $('#selectMultipleBox').show('slow');
		  } else {  
		  	setTimeout('__doPostBack(\'cmtMain$ctl00$ddlEventCategories\',\'\')', 0);
		  }
        })

	}
);

