﻿// JavaScript Document
var	HTML	={"TEMP":{"TOP":'<div id="ec_bnr_img" onclick="ga(\'LOGIN_GT\',\'itemClick\',\'@@/NAME/@@\');loginCHK(\'@@/URL/@@\',this)" style="cursor:pointer;"><img src="@@/banner.GT/@@" title="@@/NAME/@@" alt="@@/NAME/@@">\
</div>\n\
<p id="bnr_text" onclick="ga(\'LOGIN_GT\',\'itemClick\',\'@@/NAME/@@\');loginCHK(\'@@/URL/@@\',this);" style="color:#0000ff;cursor:pointer;">@@/TEXT/@@</p><!--/div-->\n',
"BOX3":'<div class="ec_cplist" style="cursor:pointer;" onclick="ga(\'LOGIN_GT\', \'itemClick\', \'@@/NAME/@@\');loginCHK(\'@@/URL/@@\',this);">\
<div id="@@/CAN_ID/@@" class="imgBOX_L" onmouseover="fukidashiBOX($(\'s@@/CAN_ID/@@\'),$(\'@@/CAN_ID/@@\'),\'CC\',\'CC\');" onmouseout="$(\'@@/CAN_ID/@@\').style.top=\'-500px\'"><img src="https://www.sourcenext.com/img/product_img/@@/CODE/@@_l.gif" alt="@@/NAME/@@" title="@@/NAME/@@" height="140" width="100"></div>\
<div id="s@@/CAN_ID/@@" class="imgBOX" onmouseover="fukidashiBOX(this,$(\'@@/CAN_ID/@@\'),\'CC\',\'CC\');" onmouseout="$(\'@@/CAN_ID/@@\').style.top=\'-500px\'"><img src="https://www.sourcenext.com/img/product_img/@@/CODE/@@_s.gif" alt="@@/NAME/@@" title="@@/NAME/@@" height="70" width="50"></div>\
<div class="textBOX"><p id="day@@/CODE/@@" class="cp_message">@@/DAY.end.M/@@月@@/DAY.end.D/@@日まで　</p>\
<p class="cp_name">@@/NAME/@@</p><p class="cp_comment">@@/TEXT/@@</p></div>\
<div style="clear: both;"></div></div>'},
"HTML":{"TOP":"","BOX3":""}
};
var	setCP	= function(JSON){
//	mAlert(time);
	var	PUBLIC	= JSON.PUBLIC;
	var	TODAY	= (function(){
		var	temp	= new String();
		if(URLargument.time){
			if((""+URLargument.time).length>8){
				time	= URLargument.time;
			}else{
				time	= ""+URLargument.time+"12";
			}
		}
		if(JSON.PUBLIC[Math.floor(time/100)]){
			var	sTIME	= PUBLIC[Math.floor(time/100)];
		}else{
			var	sTIME	= 23;
		}
		var	Y	=time.toString().replace(/([0-9]{4})([0-9]{2})([0-9]{2})(.*)/ig,"$1");
		var	M	=time.toString().replace(/([0-9]{4})([0-9]{2})([0-9]{2})(.*)/ig,"$2");
		var	D	=time.toString().replace(/([0-9]{4})([0-9]{2})([0-9]{2})(.*)/ig,"$3");
		var	T	=time.toString().replace(/([0-9]{4})([0-9]{2})([0-9]{2})(.*)/ig,"$4");
		
		sTIME	= T-sTIME;
		var	NT	=slashDobj(Y+"/"+M+"/"+D);
		NT.setTime(NT.getTime() + (sTIME*3600*1000));
		temp	= NT.getFullYear()*10000+(NT.getMonth()+1)*100+NT.getDate();
		return(temp.toString().replace(/([0-9]{4})([0-9]{2})([0-9]{2})(.*)/ig,"$1-$2-$3"))
	})();
	var	GT		= JSON.pickups.GT[TODAY];
	var	GTtop	= [JSON.pickups.GTtop[TODAY]];
	GTtop[0].BNR	= (function(){
		var	URL	= GTtop[0].URL.split('/');
		return '/cp/img/catch/'+URL[5]+'/'+URL[6].replace(/\.html/,'')+'.jpg';
	})();
	HTML.HTML.TOP	= jsonlib.setJSON(GTtop,HTML.TEMP.TOP,"\n");
	HTML.HTML.BOX3	= jsonlib.setJSON(GT,HTML.TEMP.BOX3,"\n");
}
