var _anago = new Object({
  win:window,
  doc:document,
  opts:{},
  siteId:null,
  anagoId:null,
  footprintId:null,
  schema:(("https:" == document.location.protocol) ? "https://" : "http://"),
  hostname:document.location.hostname,
  location:document.location.href,
  inTime:null,
  browser:{
    name:navigator.appName,
    version:parseInt(navigator.appVersion),
    userAgent:navigator.userAgent,
    platform:navigator.platform,
    isIE:!!(window.attachEvent && navigator.userAgent.indexOf('Opera') === -1),
    isOpera:navigator.userAgent.indexOf('Opera') > -1,
    isWebKit:navigator.userAgent.indexOf('AppleWebKit/') > -1,
    isGecko:navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') === -1,
    isMobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
  },
  evt:[
    /*  0  */'abort',     /*  1  */'blur',     /*  2  */'change',    /*  3  */'click',
    /*  4  */'dbclick',   /*  5  */'error',    /*  6  */'focus',     /*  7  */'keydown',
    /*  8  */'keypress',  /*  9  */'keyup',    /*  10 */'load',      /*  11 */'mousedown',
    /*  12 */'mousemove', /*  13 */'mouseout', /*  14 */'mouseover', /*  15 */'mouseup',
    /*  16 */'reset',     /*  17 */'resize',   /*  18 */'select',    /*  19 */'submit',
    /*  20 */'unload'
  ],
  evtmap:{
    //          0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
    A         :[0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    ABBR      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    ACRONYM   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    ADDRESS   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    APPLET    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    AREA      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    B         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BASE      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BASEFONT  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BDO       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BGSOUND   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BIG       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BLINK     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BLOCKQUOTE:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BODY      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BR        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    BUTTON    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    CAPTION   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    CENTER    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    CITE      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    CODE      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    COL       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    COLGROUP  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    COMMENT   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DD        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DEL       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DFN       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DIR       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DIV       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DL        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    DT        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    EM        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    EMBED     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    FIELDSET  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    FONT      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    FORM      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
    FRAME     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    FRAMESET  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H1        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H2        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H3        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H4        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H5        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    H6        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    HEAD      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    HR        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    HTML      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    I         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    IFRAME    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    ILAYER    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    IMG       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    INPUT     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    INS       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    ISINDEX   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    KBD       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LABEL     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LAYER     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LEGEND    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LI        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LINK      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    LISTING   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    MAP       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    MARQUEE   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    MENU      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    META      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    MULTICOL  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    NOBR      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    NOEMBED   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    NOFRAMES  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    NOLAYER   :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    NOSCRIPT  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    OBJECT    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    OL        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    OPTION    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    P         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    PARAM     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    PLAINTEXT :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    PRE       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    Q         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    RB        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    RP        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    RT        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    RUBY      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    S         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SAMP      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SCRIPT    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SELECT    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SMALL     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SPACER    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SPAN      :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    STRIKE    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    STRONG    :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    STYLE     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SUB       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    SUP       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TABLE     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TBODY     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TD        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TEXTAREA  :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TFOOT     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TH        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    THEAD     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TITLE     :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TR        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    TT        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    U         :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    UL        :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    VAR       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    WBR       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    XMP       :[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  },
  evtbuf:[],
  evttimer:null,
  evtproperty:{
    'type'    :'tp', 'keycode' :'kc', 'shiftkey':'sk', 'ctrlkey' :'ck', 'altkey'   :'ak', 'button' :'bt',
    'screenx' :'sx', 'screeny' :'sy', 'clientx' :'cx', 'clienty' :'cy', 'x'        :'x' ,  'y'     :'y' ,
    'offsetx' :'ox', 'offsety' :'oy', 'data'    :'dt', 'which'   :'wh', 'modifiers':'mo', 'pagex'  :'px',
    'pagey'   :'py', 'width'   :'wd', 'height'  :'ht', 'layerx'  :'lx', 'layery'   :'ly', 'detail' :'de',
    'metakey' :'mk', 'charcode':'cc'
  },
  defined:function(n){
    if(typeof(window[n])!='undefined'){
      return true;
    }else{
      return false;
    }
  },
  include:function(src){
    var script = document.createElement('script');
    script.src = src;
    script.type = 'text/javascript';
    this.getHead().appendChild(script);
  },
  beacon:function(src,func){
    var img=new Image(1,1);
    img.src=src;
    if(typeof func=='function'){
      img.onload=func;
    }
    this.getBody().appendChild(img);
  },
  getHead:function(){
    return document.getElementsByTagName('head')[0];
  },
  getBody:function(){
    return document.getElementsByTagName('body')[0];
  },
  query2Object:function(q){
    var args=new Object();
    var query=q;
    if(typeof query!='string'){
      query=location.search.substring(1);
    }
    var pairs=query.split("&");
    for(var i=0;i<pairs.length;i++){
      var pos=pairs[i].indexOf('=');
      if(pos==-1)continue;
      var argName=pairs[i].substring(0,pos);
      var value=pairs[i].substring(pos+1);
      value=decodeURIComponent(value);
      args[argName]=value;
    }
    return args;
  },
  object2Query:function(obj,sp){
    if(typeof obj!='object'){
      return '';
    }
    if(!sp){
      sp='&';
    }
    var q='',b=false;
    for(var i in obj){
	  alert(obj[i]);
      var f=i+'=';
      switch(typeof obj[i]){
      case 'string':
        f+=encodeURIComponent(obj[i]);
        break;
      case 'number':
        if(isFinite(obj)){
          f+=obj[i];
        }else{
          continue;
        }
        break;
      case 'boolean':
        f+=String(obj[i]);
        break;
      case 'object':
		f+=this.object2Query(obj[i]);
		break;
      case 'function':
      case 'null':
      case 'undefined':
        continue;
      }
      if(b){
        q+=sp+f;
      }else{
        q+=f;
      }
      b=true;
    }
    return q;
  },
  attachEvent:function(a,b,c){
    if (a.addEventListener){
      a.addEventListener(b, c, false);
      return true;
    } else if (a.attachEvent){
      var r = a.attachEvent("on"+b,c);
      return r;
    } else {
      return false;
    }
  },
  mappedEvent:function(){
    var el=this.getBody().getElementsByTagName("*");
    for(var i=0;i<el.length;i++){
      var tn=el[i].tagName;
      if(this.evtmap[tn]){
        for(var j=0;j<this.evtmap[tn].length;j++){
          if(this.evtmap[tn][j] != 0){
            this.attachEvent(el[i], this.evt[j], this.handleEvents);
          }
        }
      }
    }
    this.evttimer=setTimeout(_anago.handleEventTimer, 5000);
  },
  bufferingEvent:function(e){
    e = e || window.event;
    var buf=new Object();
    buf.footprintId=this.footprintId;
    buf.time=new Date().getTime();
    for(var k in e){
      var type=typeof e[k];
      if((type=='number'||type=='string'||type=='boolean')){
        var j=k.toLowerCase();
        if(this.evtproperty[j]){
          buf[this.evtproperty[j]]=e[k];
        }
      }
    }
    if(this.browser.isIE){
      element=e.srcElement;
    }else{
      element=e.target;
    }
    buf.tag=element.tagName.toLowerCase();

    function pos(element){
      var pos=1;
      var org=element.nodeName;
      while(element!=undefined&&element!=null){
        element=element.previousSibling;
        if(typeof element != 'object'||element==null){
            break;
        }
        if(org==element.nodeName){
          pos=pos+1;
        }
      }
      return pos;
    };
    var temp=element;
    var path='';
    while(temp!=undefined&&temp!=null){
      if(temp.nodeName.toLowerCase()=='body'){
          break;
      }
      if(temp.nodeName.toLowerCase()=='#document'||temp.nodeName.toLowerCase()=='#text'){
          temp=temp.parentNode;
          continue;
      }
      if(temp.attributes&&temp.id){
        path='/'+temp.nodeName.toLowerCase()+'[@id=\''+temp.id+'\']'+path;
      }else{
        var p=pos(temp);
        if(p==1){
          path='/'+temp.nodeName.toLowerCase()+path;
        }else{
          path='/'+temp.nodeName.toLowerCase()+'['+p+']'+path;
        }
      }
      temp=temp.parentNode;
    }
    buf.path=path;
//    var q='';
//    for(var i in buf){
//      if(buf[i]==undefined){
//        continue;
//      }
//      if(q.length==0){
//        q = i+'='+encodeURIComponent(buf[i]);
//      }else{
//        q = q+'&'+i+'='+encodeURIComponent(buf[i]);
//      }
//    }

    //this.evtbuf.push(this.object2Query(buf,'&'));
    this.evtbuf.push(buf);
  },
  sendEvent:function(){
    if(this.evtbuf.length){
      var jsonObj=new Object({});
      for(var i=0;i<this.evtbuf.length;i++){
        jsonObj[String(i)]=this.evtbuf[i];
      }
	  //this.ajax.sendJson('http://****',{params:jsonObj});
      this.evtbuf=new Array();
    }
  },
  handleEvents:function(e){
    _anago.bufferingEvent(e);
  },
  handleEventTimer:function(){
    _anago.sendEvent();
    _anago.evttimer=setTimeout(_anago.handleEventTimer, 5000);
  },
  handleInit:function(e){
    _anago.mappedEvent();
    _anago.anagolize();
  },
  handleExit:function(e){
    _anago.sendEvent();
    clearTimeout(_anago.evttimer);
  },
  handleBeforeUnload:function(e){
    var element=_anago.doc.activeElement;
    var jsonObj=new Object({});
    var tag=element.tagName.toLowerCase();
    switch(tag){
    case 'a':
      jsonObj.url=element.href;
      jsonObj.method='GET';
      break;
    case 'body':
      return;
    case 'input':
      jsonObj.url=element.form.action;
      jsonObj.method=element.form.method;
      break;
    }
    var end=new Date().getTime();
    jsonObj.stayTime=end-_anago.inTime;
	//_anago.ajax.sendJson('http://****',{params:jsonObj});
  },
  anagolize:function(){
    if(typeof(this.anagoId)=='string'){
//      this.include('http://anago.actbank.net/anago/set?anagoId='+encodeURIComponent(this.anagoId));
    }else{
      return false;
    }
    var geo=new Object();
    //geo.winX=this.geometry.getWindowX();
    //geo.winY=this.geometry.getWindowY();
    //geo.viewPortWidth=this.geometry.getViewportWidth();
    //geo.viewPortHeight=this.geometry.getViewPortHeight();
    geo.hScroll=this.geometry.getHorizontalScroll();
    geo.vScroll=this.geometry.getVerticalScroll();
    geo.dWidth=this.geometry.getDocumentWidth();
    geo.dHeight=this.geometry.getDocumentHeight();
    geo.divs=new Object();

    var allDivs=this.doc.getElementsByTagName("div");
    for(var i=0;i<allDivs.length;i++){
      var e=allDivs[i]
      var id=e.id;
      if(typeof id!='string')continue;
      var pos = this.geometry.getElementPos(e);
      var siz = this.geometry.getElementSize(e);
      geo.divs[e.id]=new Object({id:e.id,x:pos.x,y:pos.y,w:siz.w,h:siz.h});
    }

    var jsonObj=new Object();
    jsonObj.siteId=this.siteId;
    jsonObj.anagoId=this.anagoId;
    jsonObj.footprintId=this.footprintId;
    jsonObj.browser=this.browser;
    jsonObj.geo=geo;
    //this.ajax.sendJson('http://****',{params:jsonObj});
  },
  startup:function(opts){
    if(typeof opts!='object'){
      throw "anago initialize failure!!";
    }else{
      this.opts=opts||{};
      if(!this.opts.anagoId)this.opts.anagoId=this.cookie("anagoId");
    }
    this.inTime=new Date().getTime();
    this.siteId=this.opts.siteId;
    this.footprintId=this.opts.footprintId;
    this.anagoId=this.opts.anagoId;
    this.attachEvent(this.win,'load',_anago.handleInit);
    this.attachEvent(this.win,'unload',_anago.handleExit);
    this.attachEvent(this.win,'beforeunload',_anago.handleBeforeUnload);
  }
});
_anago.cookie=function(name, value, options) {
  if (typeof value != 'undefined') {
    options=options||{};
    if (value===null) {
      value='';
      options.expires=-1;
    }
    var expires='';
    if (options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){
      var date;
      if (typeof options.expires=='number'){
        date=new Date();
        date.setTime(date.getTime()+(options.expires*24*60*60*1000));
      } else {
        date=options.expires;
      }
      expires='; expires='+date.toUTCString();
    }
    var path=options.path?'; path='+(options.path):'';
    var domain=options.domain?'; domain='+(options.domain):'';
    var secure=options.secure?'; secure':'';
    document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');
  }else{
    var cookieValue = null;
    if (document.cookie&&document.cookie!='') {
      var cookies = document.cookie.split(';');
      for(var i=0;i<cookies.length;i++) {
        var cookie=(cookies[i]||"").replace(/^\s+|\s+$/g, "");
        if (cookie.substring(0,name.length+1)==(name+'=')) {
          cookieValue=decodeURIComponent(cookie.substring(name.length+1));
          break;
        }
      }
    }
    return cookieValue;
  }
};
_anago.ajax=new Object({
  transport:null,
  sendPost:function(url, obj){
    if(!_anago.ajax.transport){
      return false;
    }
    _anago.ajax.resetHandler();
    var q='';
    if(typeof obj=='object'){
      if(typeof obj['onsucess']=='function'){
        _anago.ajax.onsucess=obj['onsucess'];
      }
      if(typeof obj['onfailure']=='function'){
        _anago.ajax.onfailure=obj['onfailure'];
      }
      if(typeof obj['params']=='object'){
        q=_anago.object2Query(obj);
      }
    }
    _anago.ajax.transport.open("POST", url, true);
    _anago.ajax.transport.setRequestHeader("Content-Type", "application/x-?www-form-urlencoded;charset=UTF-8");
    _anago.ajax.transport.setRequestHeader("Content-Length", String(q.length));
    _anago.ajax.transport.setRequestHeader('X-Requested-With','XMLHttpRequest');
    _anago.ajax.transport.send(q);
    _anago.ajax.transport.onreadystatechange=_anago.ajax.onreadystatechange;
  },
  sendGet:function(url, obj){
    if(!_anago.ajax.transport){
      return false;
    }
    _anago.ajax.resetHandler();
    var q='';
    if(typeof obj=='object'){
      if(typeof obj['onsucess']=='function'){
        _anago.ajax.onsucess=obj['onsucess'];
      }
      if(typeof obj['onfailure']=='function'){
        _anago.ajax.onfailure=obj['onfailure'];
      }
      if(typeof obj['params']=='object'){
		alert("koko");
        q='?'+_anago.object2Query(obj);
		alert(q);
      }
    }
    _anago.ajax.transport.open("GET", url+q, true);
    _anago.ajax.transport.setRequestHeader('X-Requested-With','XMLHttpRequest');
    _anago.ajax.transport.onreadystatechange=_anago.ajax.onreadystatechange;
  },
  sendJson:function(url, obj){
    if(!_anago.ajax.transport){
      return false;
    }
    _anago.ajax.resetHandler();
    var json="null";
    if(typeof obj=='object'){
      if(typeof obj['onsucess']=='function'){
        _anago.ajax.onsucess=obj['onsucess'];
      }
      if(typeof obj['onfailure']=='function'){
        _anago.ajax.onfailure=obj['onfailure'];
      }
      if(typeof obj['params']=='object'){
        json=_anago.json.encode(obj['params']);
      }
    }
    _anago.ajax.transport.open("POST", url, true);
    _anago.ajax.transport.setRequestHeader("Content-Type","application/json");
    _anago.ajax.transport.setRequestHeader("Content-Length", String(json.length));
    _anago.ajax.transport.setRequestHeader('X-Requested-With','XMLHttpRequest');
    _anago.ajax.transport.send(json);
    _anago.ajax.transport.onreadystatechange=_anago.ajax.onreadystatechange;
    //alert(json);
  },
  onreadystatechange:function(){
//    var sta=_anago.ajax.transport.readyState;
//    var sts=_anago.ajax.transport.status;
//    if(sta == 4){
//      if(sts >= 200 && sts < 300) {
//        _anago.ajax.onsucess(_anago.ajax.transport);
//      }else{
//        _anago.ajax.onfailure(_anago.ajax.transport);
//      }
//    }
  },
  onsucess:function(transport){
  },
  onfailure:function(transport){
  },
  resetHandler:function(){
    _anago.ajax.onsucess=function(transport){};
    _anago.ajax.onfailure=function(transport){};
  }
});
if(window.ActiveXObject){
  try {
    _anago.ajax.transport = new ActiveXObject("Msxml2.XMLHTTP");
  }catch(e){
    try {
      _anago.ajax.transport = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e2) {
      _anago.ajax.transport = null;
    }
  }
} else if(window.XMLHttpRequest){
  _anago.ajax.transport = new XMLHttpRequest();
}else{
  _anago.ajax.transport = null;
}
_anago.geometry=new Object({
  getElementPos:function(e){
    function getPosX(e){
      var x=0;
      while(e){
        x+=e.offsetLeft;
        e =e.offsetParent;
      }
      return x;
    };
    function getPosY(element){
      var y=0;
      for(var e=element;e;e=e.offsetParent)
        y+=e.offsetTop;
      for(e=element.parentNode;e&&e!=document.body;e=e.parentNode)
        if(e.scrollTop)y-=e.scrollTop;
      return y;
    };
    return new Object({x:getPosX(e),y:getPosY(e)});
  },
  getElementSize:function(e){
    return new Object({w:e.offsetWidth,h:e.offsetHeight});
  }
});
if(window.screenLeft){//IEなど
  _anago.geometry.getWindowX=function(){return window.screenLeft;};
  _anago.geometry.getWindowY=function(){return window.screenTop;};
}else if(window.screenX){//Firefoxなど
  _anago.geometry.getWindowX=function(){return window.screenX};
  _anago.geometry.getWindowY=function(){return window.screenY};
}
if(window.innerWidth){//IE以外E全ブラウザ
  _anago.geometry.getViewportWidth=function(){return window.innerWidth;};
  _anago.geometry.getViewportHeight=function(){return window.innerHeight;};
  _anago.geometry.getHorizontalScroll=function(){return window.pageXOffset;};
  _anago.geometry.getVerticalScroll=function(){return window.pageYOffset;};
}else if(document.documentElement && document.documentElement.clientWidth){
  // DOCTYPEありIE6
  _anago.geometry.getViewportWidth=function(){return document.documentElement.clientWidth;};
  _anago.geometry.getViewportHeight=function(){return document.documentElement.clientHeight;};
  _anago.geometry.getHorizontalScroll=function(){return document.documentElement.scrollLeft;};
  _anago.geometry.getVerticalScroll=function(){return document.documentElement.scrollTop;};
}else{
  // DOCTYPEなしIE4,5,6
  _anago.geometry.getViewportWidth=function(){return document.documentElement.clientWidth;};
  _anago.geometry.getViewportHeight=function(){return document.documentElement.clientHeight;};
  _anago.geometry.getHorizontalScroll=function(){return document.documentElement.scrollLeft;};
  _anago.geometry.getVerticalScroll=function(){return document.documentElement.scrollTop;};
}
if (document.documentElement && document.documentElement.scrollWidth){
  _anago.geometry.getDocumentWidth=function(){return document.documentElement.scrollWidth;};
  _anago.geometry.getDocumentHeight=function(){return document.documentElement.scrollHeight;};
}else if(document.body.scrollWidth){
  _anago.geometry.getDocumentWidth=function(){return document.body.scrollWidth;};
  _anago.geometry.getDocumentHeight=function(){return document.body.scrollHeight;};
}
_anago.json=new Object({
  encode:function(obj){
    var r='';
    switch(typeof(obj)){
    case 'string':
      if (/["\\\x00-\x1f]/.test(obj)) {
        obj = obj.replace(/([\x00-\x1f\\"])/g, function(a, b) {
          var c = m[b];
          if (c) {
            return c;
          }
          c = b.charCodeAt();
          return '\\u00' +
             Math.floor(c / 16).toString(16) +
                  (c % 16).toString(16);
        });
      }
      return '"' + obj + '"';
    case 'number':
      return isFinite(obj) ? String(obj) : 'null';
    case 'boolean':
      return String(obj);
    case 'null':
      return 'null';
    case 'object':
        if(obj instanceof Array){
          var buf=['['],b=false;
          for(var i=0;i<obj.length;i++){
            val=obj[i];
            val=this.encode(val);
            if(typeof val=='string'){
              if(b){
                buf[buf.length]=',';
              }
              buf.push(this.encode(i),':',val);
              b=true;
            }
            buf[buf.length]=']';
            return buf.join('');
          }
        }else{
          var buf=['{'], val, b=false;
          for(var i in obj){
            val=obj[i];
            val=this.encode(val);
            if(typeof val=='string'){
              if(b){
                buf[buf.length]=',';
              }
              buf.push(this.encode(i),':',val);
              b=true;
            }
          }
          buf[buf.length]='}';
          return buf.join('');
        }
    case 'function':
      return 'null';
    }
  },
  decode:function(str){
    return eval('('+str+')');
  }
});
