var domainURL = document.location.href;
domainURL = domainURL.substring(0, (domainURL.indexOf('/', domainURL.indexOf('://')+3)));
var apps = new Array('CourseManager','Courses','Editor','GroupsPlanner','Stats','UserManager','UserServices','Admin');
document.cookie = 'JOSSO_SESSIONID=-;expires=' + (new Date()).toGMTString() + ';path=/';
document.cookie = 'JOSSO_SESSIONID=-;expires=' + (new Date()).toGMTString() + ';path=/josso';
for(var i=0; i<apps.length; i++){
	YAHOO.util.Connect.asyncRequest('GET', domainURL + '/ele' + apps[i] + '/public/killSession.do', null, null);
        document.cookie = 'JOSSO_SESSIONID=-;expires=' + (new Date()).toGMTString() + ';path=/'+ '/ele' + apps[i];
}
