function setStat() { var sitenum = "1"; var sessionid = "SESSIONID_"+sitenum; var connectid = "CONNECTID_"+sitenum; var appname = navigator.userAgent; var os; var osversion; var browser; var browsername; var isfirst = false; // Check OS if(appname.indexOf("NT 5.0")>0) { os = "Windows 2000"; osversion = "2000"; } else if(appname.indexOf("NT 5.1")>0) { os = "Windows XP"; osversion = "XP"; } else if(appname.indexOf("NT 5.2")>0) { os = "Windows 2003"; osversion = "2003"; } else if(appname.indexOf("98")>0) { os = "Windows 98"; osversion = "98"; } else if(appname.indexOf("ME")>0) { os = "Windows ME"; osversion = "ME"; } else if(appname.indexOf("LINU")>0) { os = "LINUX"; osversion=""; } else { os = "ETC"; osversion="-"; } if(appname.indexOf("MSIE 6.0")>0) { browser="MSIE 6.0"; browsername="Internet Explorer"; } else if(appname.indexOf("MSIE 5.5")>0) { browser="MSIE 5.5"; browsername="Internet Explorer"; } else if(appname.indexOf("MSIE 5.0")>0) { browser="MSIE 5.0"; browsername="Internet Explorer"; } else if(appname.indexOf("MSIE")>0) { browser="MSIE"; browsername="Internet Explorer"; } else if(appname.indexOf("Gecko")>0) { browser="Gecko"; browsername=navigator.appName;} else if(appname.indexOf("Opera")>0) {browser = "Opera"; browsername="Internet Explorer";} else { browser = "ETC"; browsername=navigator.platform; } var url = document.URL var urls = url.split("?"); var urlhost = urls[0]; var urlquery = urls.length>1 ? urls[1] : ""; var pref = parent.document==null ? "" : parent.document.referrer; var ref = document.referrer; var refs, refhost="", refquery=""; if(pref != ref) { ref = pref; } if(ref==url) { ref = ""; } else { refs = ref.split("?"); refhost = refs[0]; refquery = refs.length>1 ? refs[1] : ""; } var sessionid_val = getCookie(sessionid); var connectid_val = getCookie(connectid); var curdate = new Date(2018, 11, 16, 1, 39, 50 ); var expire = new Date(); expire.setTime(curdate.getTime() + 1000 * 3600 * 24 * 365); if(sessionid_val=="") { setCookie(sessionid, ""+curdate.getTime(), expire); sessionid_val = ""+curdate.getTime(); } if(connectid_val == "") { connectid_val = ""+curdate.getTime(); setCookie(connectid,connectid_val,null); isfirst = true; } // 이미지 링크할 때는 절대 경로로 합니다. HOST명까지 적어 주어야 합니다. var img = "http://www.busanbustour.co.kr/CRM_new/stat.asp?sitenum=" + sitenum+"&isfirst="+isfirst+"&sessionid="+sessionid_val+"&connectid="+connectid_val+"&os="+escape(os)+"&osversion="+escape(osversion)+"&browser="+escape(browser)+"&browsername="+escape(browsername)+"&ref="+escape(ref)+"&url="+escape(url); document.write(""); } // COOKIE 설정 function getCookie(name) { var nameOfCookie = name + "="; var x = 0; while (x <= document.cookie.length) { var y = (x+nameOfCookie.length); if (document.cookie.substring (x, y) == nameOfCookie) { if ((endOfCookie = document.cookie.indexOf (";", y)) == -1) endOfCookie = document.cookie.length; return unescape (document.cookie.substring(y, endOfCookie)); } x = document.cookie.indexOf (" ", x) + 1; if (x == 0) break; } return ""; } function setCookie (name, value, expires) { if(expires==null) document.cookie = name + "=" + escape (value) + "; path=/"; else document.cookie = name + "=" + escape (value) + "; path=/; expires=" + expires.toGMTString(); } /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// setStat(); /////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////