/* format.js */

var cache = new Object();

cache.load = new Image;
cache.load.src = '/img/format/load.gif';

if(location.href.match(/1023world\.net\/(blog|shop|diy)\//)){
  var ref = document.referrer;
  if(ref && !ref.match(/1023world\.net/)){
    cache.ref = new Image;
    cache.ref.src = '/analysis/ref/?' + ref;
  }
}

if (top != self) {
  top.location = self.location;
}

var env = getENV();

if(env.mac){
  document.write('<link href="/css/mac.css" rel="stylesheet" type="text/css" />');
}


function getENV(){   // get OS and Browser version.
  var ua = navigator.userAgent.toLowerCase();
  var env = new Object;
  env.ie = (!window.opera && $m('msie') != -1)? $c($m('msie ')+5): 0;
  env.fx = ($m('firefox/') != -1)? $c($m('firefox/')+8): 0;
  env.nn = ($m('netscape/') != -1)? $c($m('netscape/')+9): 0;
  env.op = ($m('opera/') != -1)? $c($m('opera/')+6): 0;
  env.sa = ($m('safari') != -1 && $m('version/') != -1)? $c($m('version/')+8): 0;
  env.win = ($m('windows') != -1)? 1: 0;
  env.mac = ($m('mac') != -1)? 1: 0;
  env.std = (document.compatMode == 'CSS1Compat')? 1: 0;
  return env;
  function $m(str){
    return Number(ua.indexOf(str));
  }
  function $c(num){
    return Number(ua.charAt(num));
  }
}

function getObject(id){
  return document.getElementById(id);
}

function getElement(id,element){
  return (!id)? document.getElementsByTagName(element): getObject(id).getElementsByTagName(element);
}

function setOnload(func){   // multi onload event function.
  (window.addEventListener)? window.addEventListener('load',func,false):   // for W3C DOM
  (window.attachEvent)? window.attachEvent('onload',func):   // for IE
  window.onload = func;
}

function setHeader(){
  var html = '';
  html += '<object data="/img/format/1023TM.swf" width="240" height="53" type="application/x-shockwave-flash" class="trade">\n';
  html += '<param name="movie" value="/img/format/1023TM.swf" />\n';
  html += '<param name="menu" value="false" />\n';
  html += '<param name="wmode" value="transparent" />\n';
  html += '</object>\n';
  html += '<hr />\n';
  html += '<table border="0" cellspacing="0" cellpadding="2">\n';
  html += '<tr>\n';
  html += '<td rowspan="3" class="icon">\n';
  html += '<embed type="application/x-shockwave-flash" src="/reef_ring/0080e0.swf" width="70" height="43" menu="false" wmode="transparent" /><br />\n';
  html += '</td>\n';
  html += '<td class="sub">\n';
  html += '<strong><a href="http://www.1023world.net/reef_ring" target="_blank" title="Reef Ring">Reef Ring</a></strong>\n';
  html += '</td>\n';
  html += '</tr>\n';
  html += '<tr>\n';
  html += '<td class="list">\n';
  html += '<a href="http://www.1023world.net/reef_ring/list" target="_blank" title="List">List</a>\n';
  html += '<a href="http://www.1023world.net/reef_ring/rank" target="_blank" title="Rank">Rank</a>\n';
  html += '</td>\n';
  html += '</tr>\n';
  html += '<tr>\n';
  html += '<td class="jump">\n';
  html += '<a href="http://www.1023world.net/reef_ring/prev5" target="_blank" title="Prev5">&lt;5</a>\n';
  html += '<a href="http://www.1023world.net/reef_ring/prev" target="_blank" title="Prev">&lt;</a>\n';
  html += '<a href="http://www.1023world.net/reef_ring/next" target="_blank" title="Next">&gt;</a>\n';
  html += '<a href="http://www.1023world.net/reef_ring/next5" target="_blank" title="Next5">5&gt;</a>\n';
  html += '</td>\n';
  html += '</tr>\n';
  html += '</table>\n';
  html += '<a href="http://www.1023world.net/reef_ring/" target="_blank" class="reef-status"><img src="/reef_ring/tools/status/eiji" alt="ReefRing Status" style="border:0;" /></a>\n';
  html += '<hr />\n';
  document.write(html);
}

function setTitle(){
  var html = '';
  html += '<h1><a href="http://www.1023world.net/">1.023world - \u30E4\u30C9\u30AB\u30EA\u30D1\u30FC\u30AF\u3068\u30DE\u30EA\u30F3\u30A2\u30AF\u30A2\u30EA\u30A6\u30E0 -</a></h1>\n';
  html += '<h2>\u6D77\u6D0B\u306E\u4ED5\u7D44\u307F\u3068\u7D30\u83CC\u30FB\u5FAE\u751F\u7269\u304B\u3089\u5B66\u3076\u30DE\u30EA\u30F3\u30A2\u30AF\u30A2\u30EA\u30A6\u30E0\u30B5\u30A4\u30C8</h2>\n';
  document.write(html);
}

function setImgView(){
  document.write('<div id="alphaBackground"><img id="alphaImg" src="/img/format/alpha.png" width="1" height="1" /></div>');
  document.write('<div id="imgView" onclick="imgClose();" title="\u9589\u3058\u308B"><span title="\u9589\u3058\u308B"></span></div>');
  var obj = document.getElementById('alphaBackground').style;
  if(env.ie && !env.mac){
    obj.filter = 'alpha(opacity=50)';
    obj.background = '#000';
  }else{
    obj.background = 'transparent url(/img/format/alpha.png)';
  }
  setYahooBookmark();
}

function imgView(url,w,h){
  var pos = getEventXY();
  var img = getObject('imgView').style;
  img.backgroundImage = 'url(/img/format/load.gif)';
  img.left = Math.floor(pos.X-(w/2)) + 'px';
  img.top = Math.floor(pos.Y-(h/2)) + 'px';
  img.width = w + 'px';
  img.height = h + 'px';
  img.backgroundImage = 'url(' + url + ')';
  img.display = 'block';
  var btn = getElement('imgView','span')[0].style;
  btn.width = w + 'px';
  btn.height = h + 'px';
  setOpacity(true);
}

function getEventXY(){
  var obj = new Object;
  obj.X = (env.sa && env.sa < 3)? window.event.clientX:
          (env.ie)? window.event.clientX + (document.documentElement.scrollLeft|document.body.scrollLeft):
               (window.event.clientX + window.pageXOffset|window.event.pageX);
  obj.Y = (env.sa && env.sa < 3)? window.event.clientY:
          (env.ie)? window.event.clientY + (document.documentElement.scrollTop|document.body.scrollTop):
               (window.event.clientY + window.pageYOffset|window.event.pageY);
  return obj;
}

function getScrollXY(){
  var obj = new Object;
  obj.X = (env.sa)? window.pageXOffset: (document.body.scrollLeft|document.documentElement.scrollLeft);
  obj.Y = (env.sa)? window.pageYOffset: (document.body.scrollTop|document.documentElement.scrollTop);
  return obj;
}

function getWindowWH(){
  var obj = new Object;
  obj.W = (env.sa)? window.innerWidth: (env.op || env.nn && env.nn < 1.7 ||!env.std)? document.body.clientWidth: document.documentElement.clientWidth;
  obj.H = (env.sa)? window.innerHeight: (env.op || env.nn && env.nn < 1.7 || !env.std)? document.body.clientHeight: document.documentElement.clientHeight;
  return obj;
}

function getScrollWH(){
  var obj = new Object;
  obj.W = (env.sa || !env.std)? document.body.scrollWidth: document.documentElement.clientWidth;
  obj.H = (env.sa || !env.std)? document.body.scrollHeight: document.documentElement.clientHeight;
  return obj;
}

function imgClose(){
  var img = getObject('imgView').style;
  img.display = 'none';
  img.backgroundImage = 'url(/img/format/load.gif)';
  setOpacity(false);
}

function setOpacity(mode){
  var obj = getObject('alphaBackground').style;
//  obj.width = (env.sa && env.sa < 3)? document.body.scrollWidth + 'px': (env.std)? document.documentElement.scrollWidth + 'px': (env.ie && env.mac)? document.body.offsetWidth + 'px': document.body.scrollWidth + 'px';
  obj.height = (env.sa && env.sa < 3)? document.body.scrollHeight + 'px': (env.std)? document.documentElement.scrollHeight + 'px': (env.ie && env.mac)? document.body.offsetHeight + 'px': document.body.scrollHeight + 'px';
  obj.display = (mode)? 'block': 'none';
}

function setBookmark(){
  var title = document.title;
  var url = (window.location.host)? window.location.host + window.location.pathname: window.location.hostname + window.location.pathname;
//  if(window.location.search) url += window.location.search;
//  if(window.location.hash) url += window.location.hash;
  url = 'http://' + url;
  return '<p class="book">\n' + getBookmark(true,url,title) + '</p>\n';
}

function getBookmark(mode,url,title){
  var enc = encodeURI(title);
  enc = enc.replace(/&/g,'%26').replace(/;/g,'%3b').replace(/\?/g,'%3f').replace(/=/g,'%3d').replace(/\//g,'%2f').replace(/,/g,'%2c');
  url = encodeURI(url);
  url = url.replace(/&/g,'%26').replace(/\?/g,'%3f').replace(/=/g,'%3d');
  var key = new Array(
    'yahoo',
    'google',
    'hatena',
    'delicious',
    'livedoor',
    'nifty'
  );
  var book = new Array(
    'Yahoo! Bookmark',
    'Google Bookmark',
    'Hatena Bookmark',
    'del.icio.us',
    'Livedoor Clip',
    'Nifty Clip'
  );
  var post = new Array(
    'http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?u=' + url + '&amp;t=' + enc,
    'http://www.google.co.jp/bookmarks/mark?op=edit&bkmk=' + url + '&amp;title=' + enc,
    'http://b.hatena.ne.jp/append?' + url,
    'http://del.icio.us/post?url=' + url + '&amp;title=' + enc,
    'http://clip.livedoor.com/redirect?link=' + url + '&amp;title=' + enc,
    'http://clip.nifty.com/create?url=' + url + '&amp;title=' + enc
  );
  var html = '';
  for(var i=0;i<key.length;i++){
    if(mode){
      html += '<a href="' + post[i] + '" target="_blank" onmouseover="toolTip(\'toolTip_' + key[i] + '\',1);" onmouseout="toolTip(\'toolTip_' + key[i] + '\',0);" class="' + key[i] + '">';
      html += '<strong>' + book[i] + '</strong> \u306B\u8FFD\u52A0</a>\n';
      html += '<span id="toolTip_' + key[i] + '"><span><em>' + title + '</em> \u3092</span> <span><strong>' + book[i] + '</strong> \u306B\u8FFD\u52A0<br /></span></span>\n';
    }else{
      html += '<a href="' + post[i] + '" target="_blank" title="' + title + ' \u3092 ' + book[i] + ' \u306B\u8FFD\u52A0" class="' + key[i] + '"><strong>' + book[i] + '</strong> \u306B\u8FFD\u52A0</a>\n';
    }
  }
  return html;
}

function toolTip(id,mode){
  var obj = getObject(id).style;
  var pos = getEventXY();
  obj.left = (pos.X + 0) + 'px';
  obj.top = (pos.Y + 22) + 'px';
  obj.display = (mode)? 'block': 'none';
}

function setYahooBookmark(){
  try{
    var a = getElement('YahooBookmark','a');
    a[0].setAttribute('title','Yahoo! Bookmark \u3067\u3053\u306E\u30B5\u30A4\u30C8\u3092\u767B\u9332\u3057\u3066\u3044\u308B\u4EBA\u6570');
    a[0].setAttribute('target','_blank');
  }catch(e){
    try{
      var a = getElement('YahooBookmark','a');
      a[0].title = 'Yahoo! Bookmark \u3067\u3053\u306E\u30B5\u30A4\u30C8\u3092\u767B\u9332\u3057\u3066\u3044\u308B\u4EBA\u6570';
      a[0].target = '_blank';
    }catch(e){}
  }
}

function setInputSelect(){
  try{
    var input = getElement('','input');
    for(var i=0;i<input.length;i++){
      if(input[i].getAttribute('class') == 'SelectAll' || input[i].getAttribute('className') == 'SelectAll'){
        input[i].onclick = function(){ this.select(); }
        input[i].onfocus = function(){ this.select(); }
        input[i].onmouseup = function(){ this.select(); }
        input[i].readOnly = true;
      }
    }
    var textarea = getElement('','textarea');
    for(var i=0;i<textarea.length;i++){
      if(textarea[i].getAttribute('class') == 'SelectAll' || textarea[i].getAttribute('className') == 'SelectAll'){
        textarea[i].onclick = function(){ this.select(); }
        textarea[i].onfocus = function(){ this.select(); }
        textarea[i].onmouseup = function(){ this.select(); }
        textarea[i].readOnly = true;
      }
    }
  }catch(e){}
}


function initTree(){
  var li = getElement('tree','li');
  for(var i=0;i<li.length;i++){
    var strong = li[i].getElementsByTagName('strong');
    if(!strong.length) continue;
    var ul = li[i].getElementsByTagName('ul');
    if(!ul.length) continue;
    ul[0].setAttribute('id','ul' + i);
    var a = li[i].getElementsByTagName('a');
    for(var j=0;j<a.length;j++){
      if(a[j].getAttribute('class') != 'here' && a[j].getAttribute('className') != 'here') continue;
      setViewTree(ul[0].style,true);
      break;
    }
    a[0].onfocus = function(){ this.blur(); }
    a[0].innerHTML += '<span onclick="chgViewList(\'' + i + '\');return false;" title="\u30B5\u30D6\u30E1\u30CB\u30E5\u30FC"></span>';
  }
}


function chgViewList(num){
  var ul = getObject('ul' + num).style;
  if(ul.display != 'block') setViewTree(ul,true);
  else setViewTree(ul,false);
}

function setViewTree(ul,mode){
  ul.display = (mode)? 'block': 'none';
}

function cityPlay(){
  var x = Math.floor((screen.width-600)/2);
  var y = Math.floor((screen.height-600)/2)-100;
  var set = "resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=no,left="+x+",top="+y+",screenX="+x+",screenY="+y+",width=600,height=600";
  var city = window.open("/city/play-city.html","city",set);
  city.focus();
  return false;
}

function winLocation(url){
  window.location.href = url;
  return false;
}

var chkPNG = {   // PNG to alpha for WinIE5.x~6.0.
  CSS: function() {   // 'background' CSS property only.
    if(env.mac || env.ie > 6 || env.ie < 5) return;
    var link = getElement('','link');
    var index = 0;
    for(var i=0;i<link.length;i++){
      if(!link[i].getAttribute('rel').match(/stylesheet/i)) continue;
      var rule = document.styleSheets[index].rules;
      for(var j=0;j<rule.length;j++) {
        var png = rule[j].style['background'];
        if(!png.match(/\.png/i)) continue;
        png = png.substring(png.indexOf('url(')+4,png.length);
        png = png.substring(0,png.indexOf(')'));
        rule[j].style['filter'] = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + png + ',sizingMethod=crop)';
        rule[j].style['background'] = '';
      }
      index++;
    }
  },
  HTML: function(){   // '<img>' elements only.
    if(env.mac || env.ie > 6 || env.ie < 5) return;
    var img = getElement('','img');
    for(var i=0;i<img.length;i++){
      var src = img[i].getAttribute('src');
      if(!src.match(/\.png/i)) continue;
      try{
        img[i].setAttribute('src','/img/format/null.gif');
      }catch(e){
        try{
          img[i].src = '/img/format/null.gif';
        }catch(e){}
      }
      img[i].style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + src + ',sizingMethod=scale)';
    }
  }
}

var timer,timer2;

function setInitViewList(){
  if(env.ie && env.ie < 6 || env.sa && env.sa < 3 || env.op && env.op < 8) return;
  if(env.ie && env.ie == 6) document.body.style.overflowX = 'hidden';
  var list = document.createElement('div');
  list.setAttribute('id','ViewList');
  var tab = document.createElement('h3');
  tab.appendChild(document.createTextNode('\u4ED8\u7B8B'));
  list.appendChild(tab);
  var sub = document.createElement('h4');
  sub.appendChild(document.createTextNode('\u3057\u304A\u308A\u3059\u3068 beta '));
  var span = document.createElement('span');
  span.appendChild(document.createTextNode(' (\u3088\u304F\u898B\u308B\u30DA\u30FC\u30B8\u3068\u304B)'));
  sub.appendChild(span);
  list.appendChild(sub);
  var em = document.createElement('em');
  em.appendChild(document.createTextNode('\u73FE\u5728\u306E\u30DA\u30FC\u30B8\u3092\u8FFD\u52A0'));
  list.appendChild(em);
  var font = document.createElement('font');
  font.appendChild(document.createTextNode('MAX 20'));
  list.appendChild(font);
  var strong = document.createElement('strong');
  strong.appendChild(document.createTextNode('\u30AF\u30EA\u30A2'));
  list.appendChild(strong);
  var ol = document.createElement('ol');
  list.appendChild(ol);
  document.body.appendChild(list);

  setViewList();

  var list = document.getElementById('ViewList');
  list.onmouseover = function(){
    switchViewList(true);
  };
  list.onmouseout = function(){
    timer = setInterval('switchViewList(false)',1000);
  };
  var em = list.getElementsByTagName('em')[0];
  em.onclick = function(){ setThisPage(); };
  var strong = list.getElementsByTagName('strong')[0];
  strong.onclick = function(){ clearViewList(); };
}

function switchViewList(mode){
  clearInterval(timer);
  var list = document.getElementById('ViewList');
  viewListMove(mode);
}

function viewListMove(mode){
  clearInterval(timer2);
  var list = document.getElementById('ViewList');
  var move = Number(list.style.right.replace(/[^\d]+/g,''));
  if(!move) move = 300;
  move = (mode)? Math.floor(move / 2): move * 2;
  if(move < 2) move = 2;
  if(move > 300) move = 300;
  list.style.right = '-' + move + 'px';
  var op = Math.floor((302 - move) / 60) / 10 + 0.5;
  list.style.opacity = op;
  list.style.MozOpacity = op;
  if(mode && move <= 2 || !mode && move >= 300) return false;
  else timer2 = setInterval('viewListMove(' + mode + ')',30);
}

function setThisPage(){
  var url = getRootPath();
  var title = document.title.replace(/\uFF5C1\.023world$/,'');
  if(url == '/') title = '\u30C8\u30C3\u30D7\u30DA\u30FC\u30B8';
  var a = document.getElementById('ViewList').getElementsByTagName('a');
  var flag = 0;
  var cnt = 0;
  for(var i=0;i<a.length;i++){
    if(a[i].getAttribute('href') == url) flag = 1;
    cnt++;
  }
  if(flag) return false;
  document.getElementById('ViewList').getElementsByTagName('ol')[0].appendChild(getListTag(title,url,true));
  setCookie(cook.key,getCookie(cook.key) + encodeURIComponent(title) + ':' + encodeURIComponent(url) + '&');
  setViewList();
  checkButtonView(cnt + 1);
}

function checkButtonView(cnt){
  document.getElementById('ViewList').getElementsByTagName('em')[0].style.display = (cnt < 20)? 'block': 'none';
  document.getElementById('ViewList').getElementsByTagName('font')[0].style.display = (cnt < 20)? 'none': 'block';
}

function setViewList(){
  var cookie = getCookie(cook.key);
  var pages = cookie.split('&');
  var ol = document.getElementById('ViewList').getElementsByTagName('ol')[0];
  for (var i=ol.childNodes.length-1;i>=0;i--) {
    ol.removeChild(ol.childNodes[i]);
  }
  var cnt = 0;
  for(var i=0;i<pages.length;i++){
    if(!pages[i].match(/:/)) continue;
    cnt++;
    var pair = pages[i].split(':');
    pair[1] = decodeURIComponent(pair[1]);
    var focus = (pair[1] == getRootPath())? true: false;
    ol.appendChild(getListTag(decodeURIComponent(pair[0]),pair[1],focus));
  }
  checkButtonView(cnt);
}

function getRootPath(){
  return location.href.replace(/^https?:\/\/[^\/]+\//,'/').split(/#/)[0];
}

function getListTag(title,url,focus){
  var li = document.createElement('li');
  var a = document.createElement('a');
  a.setAttribute('href',url);
  if(focus) a.setAttribute('id','ViewListFocus');
  a.appendChild(document.createTextNode(title));
  li.appendChild(a);
  var span = document.createElement('span');
  (!env.ie || env.ie >= 8)? span.setAttribute('onclick','deletePage(this);'): span.setAttribute('onclick',new Function('deletePage(this);'));
  li.appendChild(span);
  return li;
}

function clearViewList(){
  setCookie(cook.key,'');
  setViewList();
  checkButtonView(0);
}

function deletePage(del){
  var url = del.parentNode.getElementsByTagName('a')[0].getAttribute('href');
  var list = document.getElementById('ViewList');
  list.getElementsByTagName('ol')[0].removeChild(del.parentNode);
  var cookie = getCookie(cook.key);
  var pages = cookie.split('&');
  for(var i=0;i<pages.length;i++){
    if(!pages[i].match(/:/)) continue;
    var pair = pages[i].split(':');
    if(pair[1] == encodeURIComponent(url)){
      pages.splice(i,1);
      break;
    }
  }
  setCookie(cook.key,pages.join('&'));
  checkButtonView(0);
}

var cook = {
  key : 'ViewList',   // cookie name.
  exp : 3650          // days of cookie expires.
}

function getCookie(key){
  var cooks = document.cookie.split(/ *; */);
  var value = '';
  for(var i=0;i<cooks.length;i++){
    var pair = cooks[i].split('=');
    if(pair[0] != key) continue;
    value = pair[1];
    break;
  }
  if(value) return value;
//  setCookie(key,'');
  return '';
}

function setCookie(key,value){
  var exp = new Date();
  exp.setTime(exp.getTime() + cook.exp * 24*60*60*1000);
  document.cookie = key + '=' + value + ';path=/;expires=' + exp.toGMTString();
}

function getUserFeel(){
  var div = document.getElementById('user-feel');
  if(!div) return false;
  div.style.backgroundImage = 'url(/city/item/loading.gif)';
  var dl = div.getElementsByTagName('dl')[0];
  dl.style.filter = 'alpha(opacity=30)';
  dl.style.MozOpacity = '0.3';
  dl.style.opacity = '0.3';
  getHTTP('/city/getUserFeel.cgi');
  return false;
}

var http,timer;
function getHTTP(url){
  http = objXML();
  http.open('GET',url,true);
  http.onreadystatechange = function(){
    if(http.readyState == 4 && http.status == 200){
      clearInterval(timer);
      var div = document.getElementById('user-feel');
      div.style.backgroundImage = 'none';
      div.innerHTML = http.responseText;
      return false;
    }
  };
  http.send(null);
  timer = setInterval('timeout()',5000);
  return false;
}

function objXML(){
  try{
    return new XMLHttpRequest();
  }catch(e){
    try{
      return new ActiveXObject('Msxml2.XMLHTTP');
    }catch(e){
      try{
        return new ActiveXObject('Microsoft.XMLHTTP');
      }catch(e){
        return null;
      }
    }
  }
}

function timeout(){
  clearInterval(timer);
  http.abort();
  var div = document.getElementById('user-feel');
  if(!div) return false;
  div.style.backgroundImage = 'none';
  var dl = div.getElementsByTagName('dl')[0];
  dl.style.filter = 'alpha(opacity=100)';
  dl.style.MozOpacity = '1';
  dl.style.opacity = '1';
  return false;
}

function setCityBlogOut(){
  var obj = document.getElementById('userBlog');
  if(!obj) return false;
  var a = obj.getElementsByTagName('a');
  for(var i=0;i<a.length;i+=2){
    a[i].setAttribute('alt',a[i+1].getAttribute('href').replace(/^.*?\/([^\/]+)\/$/,'$1'));
    a[i].onclick = function(){
      var uid = this.getAttribute('alt');
      var exp = new Date();
      var img = new Image;
      var href = this.getAttribute('href');
      if(env.ie <= 6) href = escape(href);
      img.src = '/city/blog.cgi?time=' + exp.getTime() + '&uid=' + uid + '&url=' + href;
      return true;
    };
  }
}



function onloads(){   // onload functions.
  chkPNG.HTML();
  var href = location.href.replace(/^https?:\/\/[^\/]+/,'');
  if(!href.match(/^(\/city\/mgr|\/ypark\/service\/mylog|\/blog\/wp-content)/)) setInitViewList();
}

if(!env.ie){
 (function(){
  var evt = ['mousedown','mouseover','mouseout','mousemove','mousedrag','click','dblclick'];
  for(var i=0; i<evt.length; i++){
   window.addEventListener(evt[i], function(e){window.event=e;}, true);
  }
 }());
};



//chkPNG.CSS();

setOnload(onloads);

setOnload(setInputSelect);

setOnload(setCityBlogOut);

