function initProtection(userID,userName,userGroup){
	$("#ajaxSearch_submit").attr("value", "")
	var userID = userID;
	var userName = userName;
	if(userID==0) {
		$("a.protected").attr("href", "javascript:;")
		$("a.protected").click(function(e) {
	    var pageY = e.pageY;
	    var pageX = e.pageX;
			$('#loginBox').css({'top' : pageY, 'left' : pageX}).fadeIn();
		});			
	}
	else if(userGroup==1) {
		$("#signIn").html(userName + " |<a href='index.php?id=67' class='userNav'>View User Data</a>|<a href='index.php?id=68' class='userNav'>Edit Profile</a>|<a href='index.php?id=1&webloginmode=lo' class='userNav'>Log Out</a>" );
	
	}
	else if(userName==0) {
		$("#signIn").html("<a href='index.php?id=68' class='userNav'>Edit Profile</a>|<a href='index.php?id=1&webloginmode=lo' class='userNav'>Log Out</a>" );
	}
	else {
		$("#signIn").html(userName + " |<a href='index.php?id=68' class='userNav'>Edit Profile</a>|<a href='index.php?id=1&webloginmode=lo' class='userNav'>Log Out</a>" );
	}
}

function highlightLinks(parentparent,parent,id) {
	var ppid = "#a"+parentparent;
	var pid = "#a"+parent;
	var aid = "#a"+id;
	$(ppid).addClass('active');
	$(pid).addClass('active');
	$(aid).addClass('active');	  
}


$(document).ready(function() {
		
		$('#slideshow').delay(2000).fadeIn(2000);
		$('#navSlide').delay(2500).fadeIn(2000);


 // hides the slickbox as soon as the DOM is ready
  $('.qBox').hide();

 // shows the slickbox on clicking the noted link  
  $('a.show').click(function() {
    $('.qBox').show('fast');
    return false;
  });

 // hides the slickbox on clicking the noted link  
  $('a.close').click(function() {
    $('.qBox').hide('fast');
    return false;
  });
});










$(function() { 
    $('#slideshow').cycle({ 
      fx:     'fade', 
      speed:   500, 
      timeout: 8000, 
      pager:  '#navSlide', 
			fastOnEvent: true
    }); 
});






