// ¿¥ÆÄ½º PCID ÄíÅ° ½ºÅ©¸³Æ®
function getPCIDCookie() {
var allcookies = document.cookie;
var pos = allcookies.indexOf("EmpasPCID=");
if ( pos==-1 ) return null;
var start = pos + 10;
var end = allcookies.indexOf(";",start);
if (end == -1) end = allcookies.length;
var value = allcookies.substring(start,end);
value = unescape(value);
return value;
}
function setPCIDCookie(value) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + 3650 );
document.cookie = "EmpasPCID=" + escape( value ) + "; domain=empas.com; path=/; expires=" + todayDate.toGMTString();
}
var PCID=getPCIDCookie();
if(PCID == null || PCID == "") {
var cookieval = new Date();
cookieval = cookieval.getTime();
var rStr_1 = "" + Math.random();
var rStr_2 = "" + Math.random();
var rStr_3 = "" + Math.random();
var rStr_4 = "" + Math.random();
var rStr_5 = "" + Math.random();
rStr_1 = rStr_1.charAt(2);
rStr_2 = rStr_2.charAt(2);
rStr_3 = rStr_3.charAt(2);
rStr_4 = rStr_4.charAt(2);
rStr_5 = rStr_5.charAt(2);
cookieval = cookieval + rStr_1 + rStr_2 + rStr_3 + rStr_4 + rStr_5;
setPCIDCookie(cookieval);
}
