sec = 15;
function cook ()
{
	var today = new Date();
 	var expire = new Date();
	var key = location.pathname.substr(1,8);

  	expire.setTime(today.getTime()+1000*sec);
   	document.cookie = "TabOpen="+key+"; expires="+expire.toGMTString()+"";


}

var c = 1; fc();
function fc()
{
	if(c == sec){ cook (); c = 1; } else { c++; }
 	setTimeout("fc()", 1000);
}
cook ();