
function checkSession() {
	var myAjax = new Ajax.Request('http://ekb.pharmalive.com/checkSession.cfm',
		{method: 'get',
			onComplete: testSession
		});
}

function testSession(originalRequest){
	
	myText = originalRequest.responseText;
	lastChar = myText.substr(myText.length-1,1)
	
	if (lastChar == '0') 
		{homePage();}
	else {
		//alert('active session');
	}
}

function homePage() {
	 document.location.href = 'http://ekb.pharmalive.com';
}