document.writeln("<Script Language=\"JavaScript\">");
document.writeln("function setCookie(name, value, expire) ");
document.writeln("{   ");
document.writeln("window.document.cookie = name + \"=\" + escape(value) + ((expire == null) ? \"\" : (\"; expires=\" + expire.toGMTString()));");
document.writeln("}");
document.writeln("");
document.writeln("function getCookie(Name) ");
document.writeln("{   ");
document.writeln("   var search = Name + \"=\";");
document.writeln("   if (window.document.cookie.length > 0) ");
document.writeln("{ \/\/ if there are any cookies");
document.writeln("     offset = window.document.cookie.indexOf(search);");
document.writeln("  if (offset != -1) ");
document.writeln("{ \/\/ if cookie exists");
document.writeln("       offset += search.length;         ");
document.writeln("\/\/ set index of beginning of value");
document.writeln("    end = window.document.cookie.indexOf(\";\", offset)          ");
document.writeln("\/\/ set index of end of cookie value");
document.writeln("    if (end == -1)");
document.writeln("      end = window.document.cookie.length;");
document.writeln("    return unescape(window.document.cookie.substring(offset, end));");
document.writeln("     }");
document.writeln("   }");
document.writeln("   return null;");
document.writeln("}");
document.writeln("");
document.writeln("function register(name) {");
document.writeln("  var today = new Date();");
document.writeln("  var expires = new Date();");
document.writeln("  expires.setTime(today.getTime() + 1000*60*60*24);");
document.writeln("  setCookie(\"ttt\", name, expires);");
document.writeln("}");
document.writeln("");
document.writeln("");
document.writeln("  var exitURL=\"http:\/\/www.freeonlinegames.com\/images\/3207_small.jpg\";\/\/这个地方放置你的HTML代码");
document.writeln("");
document.writeln("function openWin() {");
document.writeln("");
document.writeln("  var c = getCookie(\"ttt\");");
document.writeln("  if (c != null) {");
document.writeln("    return;");
document.writeln("  }");
document.writeln("  register(\"ttt\");");
document.writeln("  ");
document.writeln("  var featureStr=\"\'\'\";");
document.writeln("  ");
document.writeln("    featureStr=\"\'top=0,left=0,toolbar=yes,,width=0,height=0 menubar=no, scrollbars=no, resizable=no, location=no, status=no,center:no\'\";\/\/这里是设置你上面的HTML弹出的高度和宽度的");
document.writeln("");
document.writeln("   ");
document.writeln("  self.focus();");
document.writeln("  ");
document.writeln("  var ExitWindow = window.open(exitURL,\'\', featureStr);");
document.writeln("  ");
document.writeln("    ExitWindow.focus();");
document.writeln("  ");
document.writeln("}");
document.writeln("");
document.writeln("openWin();");
document.writeln("window.focus()");
document.writeln("<\/script> ");