var chatId; function setStat() { var sitenum = "1"; var sessionid = "SESSIONID_"+sitenum; var connectid = "CONNECTID_"+sitenum; var refid = "REFID_"+sitenum; var appname = navigator.userAgent; var os; var osversion; var browser; var browsername; var isfirst = false; // üũ ÇØ»óµµ var vn_screenx = screen.width; // È­¸é½ºÅ©¸° ³ÐÀÌ var vn_screeny = screen.height; // È­¸é½ºÅ©¸° ³ôÀÌ var resolution = vn_screenx + " * " + vn_screeny; // üũ ŸÀÓÁ¸ var tz = new Date(); var tzStr = (tz.getTimezoneOffset()/60) * -1; // üũ »ç¿ë¾ð¾îº° var lang; if (navigator.appName == "Netscape") lang = navigator.language; else lang = navigator.userLanguage; // Check OS if(appname.indexOf("NT 5.0")>0) { os = "Windows 2000"; osversion = "2000"; } else if(appname.indexOf("NT 6.0")>0) { os = "Windows Vista"; osversion = "VISTA"; } 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 8.0")>0) { browser="MSIE 8.0"; browsername="Internet Explorer"; } else if(appname.indexOf("MSIE 7.0")>0) { browser="MSIE 7.0"; browsername="Internet Explorer"; } else 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] : ""; //alert(typeof("parent.document")); var pref = "";//document==null ? "" : parent.document.referrer; var ref = document.referrer; var refs, refhost="", refquery=""; try{ pref = parent.document.referrer;}catch(_e){ try{ pref = top.document.referrer; }catch(_e){ pref = ""} } if(pref != ref) { ref = pref; } if(ref==url) { ref = ""; } else { refs = ref.split("?"); refhost = refs[0]; refquery = refs.length>1 ? refs[1] : ""; } // À¯ÀÔ°æ·Îº° Àμ­Æ® ·ÎÁ÷Ãß°¡ var cururl = url; var cururl2 = ""; if(cururl.indexOf("http://www.") > -1) { cururl2 = cururl.substring(11, cururl.substring(11).indexOf("/") + 11); } else if(cururl.indexOf("http://") > -1) { cururl2 = cururl.substring(7, cururl.substring(7).indexOf("/") + 7); } var refurl = ref; var refurl2 = ""; if(refurl.indexOf("http://www.") > -1) { refurl2 = refurl.substring(11, refurl.substring(11).indexOf("/") + 11); } else if(refurl.indexOf("http://") > -1) { refurl2 = refurl.substring(7, refurl.substring(7).indexOf("/") + 7); } // À¯ÀÔ°æ·Îº° Àμ­Æ® ·ÎÁ÷Ãß°¡ ³¡ var expire = new Date(); var sessionid_val = getCookie(sessionid); var connectid_val = getCookie(connectid); var refid_val = getCookie(refid); var curdate = new Date(2024, 10, 30, 12, 32, 17, expire.getMilliseconds() ); 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; } // À¯ÀÔ°æ·Îº° Àμ­Æ® ·ÎÁ÷Ãß°¡ if(refid_val == "") { if(refurl2 == "") { refid_val = "BOOKMARK"; } else { refid_val = refurl2; } setCookie(refid,refid_val,null); } if( (refurl2 != "" && cururl2 != refurl2) && (refurl2 != refid_val) ) { connectid_val = ""+curdate.getTime(); setCookie(connectid,connectid_val,null); setCookie(refid,refurl2,null); isfirst = true; } // À¯ÀÔ°æ·Îº° Àμ­Æ® ·ÎÁ÷Ãß°¡ ³¡ chatId = connectid_val; // À̹ÌÁö ¸µÅ©ÇÒ ¶§´Â Àý´ë °æ·Î·Î ÇÕ´Ï´Ù. HOST¸í±îÁö Àû¾î ÁÖ¾î¾ß ÇÕ´Ï´Ù. var img = "http://weblog2.ahndentist.com/stat.jsp?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))+"&resolution="+resolution+"&lang="+lang+"&tzStr="+tzStr; document.write(""); } // COOKIE ¼³Á¤ function getCookie(name) { var nameOfCookie = name + "="; var x = 0; // 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(); /////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////