//**                      **//
//**  eKomi Jump_Layer    **//
//**                      **//

function jlSetCookie() {
	var a = new Date();
	a = new Date(a.getTime() +1000*60*60*24*14);
	document.cookie = 'jumpLayer_seen=true; expires='+a.toGMTString()+';';
	alert('jumpLayer_seen=true; expires='+a.toGMTString()+';');
}

function jlDeleteCookie() {
	var a = new Date();
	a = new Date(a.getTime() +1000*60*60*24*14);
	document.cookie = 'jumpLayer_seen=true; expires=Thu, 01-Jan-70 00:00:01 GMT;';
	//alert('jumpLayer_seen=true; expires='+a.toGMTString()+';');
}

function jlCheckCookie() { // FALSE=dont have a cookie->show Layer | TRUE=has seen the layer in the past 14 days
	if(document.cookie.search('jumpLayer_seen=true')===-1) {
		return false;
	} else {
		return true;
	}
}


function jlPopUp() {
	if(jlCheckCookie()) {
		// Has seen the Layer, just refresh the 2 Week counter.
		jlSetCookie();
	} else {
		// Start timer.
		window.timeout('jltimeoutPopUp()', 1);
	}
}

function jltimeoutPopUp() {
	// pop!
}

//$(function () { jlCheckPopUp(); });

function jlCheckPopUp() {
	// DEPRECATED
	// Leave only for compatibility
	//	(was in the document.ready of the old <script> code)
}