var csession=(function(){
	var time=null;
	return{
		cek:function(){
			//alert('a');
			if(time){
				clearInterval(time);
			}
			
			time=setInterval(function(){
				var ik_data = {
					ajax: 1,
					mode: "plg",
					cl: "csession",
					ikdata: {0:"ceksess"}
				};
				
				$.ajax({
					url: lokal+"man.ajax.php",
					type: "POST",
					dataType: "json",
					async:true,
					data: ik_data,
					success: function(e){
						
						//alert(e['status']);
						if(e['status']=="TIME OUT"){
							document.location=lokal;
							clearInterval(time);
						}
					}
				});
			},30000);
		}
	};
})();
