		
	// システム日付の取得
	acDate=new Date();
	myYear=""+acDate.getFullYear();
	myMonth=acDate.getMonth()+1;
	if(myMonth<10)myMonth="0"+myMonth;
	else myMonth=""+myMonth;
	myDate=acDate.getDate();
	if(myDate<10)myDate="0"+myDate;
	else myDate=""+myDate;
	myHour=acDate.getHours();
	if(myHour<10)myHour="0"+myHour;
	else myHour=""+myHour;
	myMinute=acDate.getMinutes();
	if(myMinute<10)myMinute="0"+myMinute;
	else myMinute=""+myMinute;
	mySecond=acDate.getSeconds();
	if(mySecond<10)mySecond="0"+mySecond;
	else mySecond=""+mySecond;
	zCookieDate=myYear+myMonth+myDate+myHour+myMinute+mySecond;

	// Cookie登録日付の設定
	zCookie = document.cookie + ";";
	if( zCookie != null && zCookie.length > 0 ){
		zSection4 = zCookie.indexOf( "PARA4", 0 );
		if ( zSection4 == -1 ){
			// "PARA4"が存在しない場合
			zSection1 = zCookie.indexOf( "siteid", 0 );
			zSection2 = zCookie.indexOf( "referer", 0 );
			zSection3 = zCookie.indexOf( "PARA3", 0 );
			if( zSection1 != -1 ||  zSection2 != -1 ||  zSection3 != -1 ){
				// "siteid""referer""PARA3"のいずれかが存在する場合
				var vExpDate = new Date();
				vExpDate.setTime( vExpDate.getTime()+1000*60*60*24*1*365 );	//	有効期限(１年後)
				zCookieDate = Base64.encode("20010215000000");
				document.cookie = "PARA4=" + escape (zCookieDate) + "; expires=" + vExpDate.toGMTString() + "; path=/";
			}else{
				// "siteid""referer""PARA3"が存在しない場合
				var vExpDate = new Date();
				vExpDate.setTime( vExpDate.getTime()+1000*60*60*24*1*365 );	//	有効期限(１年後)
				zCookieDate = Base64.encode(zCookieDate);
				document.cookie = "PARA4=" + escape (zCookieDate) + "; expires=" + vExpDate.toGMTString() + "; path=/";
			}
		}
	}

	var siteIdObj = new Object();
	var zSiteID = "";
	var str = location.search.substring(1);
	var parms = str.split('&');
	for (var i=0; i<parms.length; i++) {
		var pos = parms[i].indexOf('=');
		if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			if (key.toUpperCase()=='SITEID') {
				zSiteID = val;
			}
		}
	}

	if ( zSiteID == "" ){
		zSiteID = "000";
	}

	zReferrer = document.referrer;
	if ( zReferrer == "" ){
		zReferrer = "noreferer";
	}

  //ticket#1048対応(会員登録時のリファラ格納時に閲覧開始ページのURLを記録)
  zStartUrlTmp = document.URL;
	if ( zStartUrlTmp == "" ){
		zStartUrlTmp = "noStartUrl";
	}

	zCookie = document.cookie + ";";
	if( zCookie != null && zCookie.length > 0 ){
		zSection = zCookie.indexOf( "siteid", 0 );
		if( zSection == -1 ){
			var vExpDate = new Date();
			vExpDate.setTime( vExpDate.getTime()+1000*60*60*24*1*365 );	//	有効期限(１年後)
			document.cookie = "siteid=" + escape (zSiteID)   + "; expires=" + vExpDate.toGMTString() + "; path=/";
			document.cookie = "referer=" + escape (zReferrer) + "; expires=" + vExpDate.toGMTString() + "; path=/";
			//M_USER_REFERRER用のSTART_URL
			document.cookie = "startUrl=" + escape (zStartUrlTmp) + "; expires=" + vExpDate.toGMTString() + "; path=/";
		}
		var domain = location.hostname;	
		var zOrderSection = zCookie.indexOf( "oneTimeSiteid", 0 );
		var zDomainSection = zReferrer.indexOf( domain, 0 );
		if( zOrderSection == -1 ){
			document.cookie = "oneTimeSiteid=" + escape (zSiteID) + "; path=/";
			document.cookie = "oneTimeReferer=" + escape (zReferrer) + "; path=/";
			//T_ORDER_REFERRER用のSTART_URL
			document.cookie = "oneTimeStartUrl=" + escape (zStartUrlTmp) + "; path=/";
		}
		else if(zDomainSection == -1 && zReferrer != null && zReferrer != ""){
			document.cookie = "oneTimeSiteid=" + escape (zSiteID) + "; path=/";
			document.cookie = "oneTimeReferer=" + escape (zReferrer) + "; path=/";
			//T_ORDER_REFERRER用のSTART_URL
			document.cookie = "oneTimeStartUrl=" + escape (zStartUrlTmp) + "; path=/";
		}
	}




/*------- LP -------*/
	//getURL
	var url = document.URL;
	
	//setCOOKIE
	document.cookie = "url=" + escape (url) + "; path=/";

/*------- getCookie and search 'lp' -------*/
	// create Trim method
	String.prototype.trim = function() {
	    return this.replace(/^[ ]+|[ ]+$/g, '');
	}

	// separate by ";" from all cookie
	var sepCookie = zCookie.split(";");

	var i = 0;
	while(i < sepCookie.length){
		var valCookie = sepCookie[i].trim();
		// search 'lp'	
		if(valCookie.substr(0,valCookie.indexOf("=")) == "lp"){
			
/*------- Call "/hmp/cms/logwrite.php" (create <script>tag) -------*/
			var title = document.title;
			var scrptE = document.createElement("script");
			scrptE.setAttribute("type", "text/javascript");
			scrptE.setAttribute("language", "JavaScript");
			scrptE.setAttribute("src", "/hmp/cms/logwrite.php?title=" + title);
			document.getElementsByTagName("head")[0].appendChild(scrptE);
			
			break;
		}		
		i++;	
	}