	window.onload=function(){
		request('chat/chatcount.php', '', "none", chatcount);	
		ajaxtab('activity.jsp', 'activload');	
		setonload('ajax/recentposts.jsp', 'recent_posts_content', '120000', getonload);
		notifications();
	
	};
	function moreactivities(id, times, type, divid){
		document.getElementById(divid+times).style.display ='none';
		document.getElementById(divid+'load').style.display ='block';
		var post="id="+id+"&times="+times+"&type="+type;
		request('ajax/more_activities.jsp', post, divid, moreactivelist);
	}
	function moreactivelist(rs, divid){
		document.getElementById(divid+'load').style.display ='none';
		document.getElementById(divid).innerHTML+=rs;
	}
	function notifications(){
		var date = currentdate();
		request('ajax/notifications.jsp', 'date='+date+'', 'notificationbox,notifications', shownotifcation); 
	}
	function shownotifcation(rs, divid){
		data=divid.split(',');
		if(rs!='no'){idtobj('notificationbox').style.display="block"; idtobj('notifications').innerHTML=rs; }
	}
	function gettodolist(){ 
		date=currentdate(); displaywindow('modal', 'todolisting.jsp?date='+date+'', '500px', 'auto', 'div', 'Today\'s Todo-List', modalpadzero);
	}
	function broadpost(rs, divid){
		var tablist = document.getElementById('activloadtabs').getElementsByTagName('a');
		for (i=0; i<tablist.length; i++) { if(tablist[i].getAttribute('class')=='selected') { ajaxtab(tablist[i].getAttribute('id'), 'activload'); }}
		resetform(divid); 	hidemodalload();
	}


