function switchCat(catID) {
	$(".results").hide();
	$("#newstype a").removeClass("active");
	$("#"+catID+"").addClass("active");
	
	$("#cat"+catID+"").fadeIn('fast');
	return false;
}

function newsCat_init() {
	$("#newstype a").click(function() {
		var catID = $(this).get(0).rel;
		$(".results").hide();
		$("#newstype a").removeClass("active");
		$(this).addClass("active");
	
		$("#cat"+catID+"").fadeIn('medium');
		return false;
		
	});
	//return false;
}

function swap_tour_image(photoID) {
	var newHref = '/img/fullsize/photo'+photoID+'.jpg';
	//var newSrc = $(this).get(0).href;
	var myString = '<img src="' + newHref + '"  height="183" width="260" />';
	$("#masterpic img").fadeOut('fast');
	$("#masterpic").html(myString);
	$(this).addClass("current");
	//$("#image_num a").removeClass("current");
	
	$("#masterpic img").fadeIn('fast');
	
	return false;
}


$(document).ready(function(){
	
	//$("#announcer").cycle();
	
	
	$('#announcer').cycle({ 
	    fx:      'scrollUp', 
	    speed:    500, 
	    timeout:  6000 
	});
	
	// random number start
	//var rn=Math.floor(Math.random()*10)
	
	$('#header_slider').cycle({ 
	    fx:      'fade', 
	    speed:    750, 
	    timeout:  4000,
	    startingSlide: 0,
	    random: true
	});
	

	newsCat_init();
	
	
}); // End jQuery


function DESemail(emailname,emailserver,emailtext) {
	document.write("<a href='mailto:" + emailname + "@" + emailserver +"'>");
	document.write(emailtext);
	document.write("</a>"); 
}

// Accessible Pop Ups
function DESopen(url,width,height,toolbar,scroll) {
	window.open(url, "", "scrollbars="+scroll+",toolbar="+toolbar+",height="+ height +",width="+width);
	return false;
}
