var zcount = 1000000;var clickElement = "";if(document.getElementsByTagName('BODY').length==0)document.write('<body>')
var canvas = document[ 'CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];var dragableFloatId=[];var recx1,recy1,recx2,recy2,recxOffset,recyOffset;function doDragableFloat(){eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o(i n 8){m 0=l.k(8[i]);7(0.j){7(!(6.h||6.g)){f.d=5(e){4(0,0.1.3,0.1.2)}}c{b=a(5(){4(0,0.1.3,0.1.2)},9)}}}',25,25,'oj|style|top|left|moveDiv|function|is|if|dragableFloatId|100|setInterval|aaa|else|onscroll||window|khtml|safari||floatEnabled|getElementById|document|var|in|for'.split('|'),0,{}))}function ssc(){eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 a=0<=v.w.y.z("A");B(a&&8.C=="D"){8.E.b=c}F{8.G.b=c}9 H=I(\'2\',10,10);$(\'#2\').J(\'K\');$(\'#2\').L(\'M\',\'1\');$(\'#2\').N({O:"P",Q:"R",S:"T"});$(\'#2\').U(\'<d V="W:X-Y-Z-11-12" 13="e://14.f.g/15/h/16/i/17.18#19=6,0,0,0" j="4" k="4" 1a="" l=""> <5 3=1b 7="m.n"> <5 3=o 7=p> <5 3=q 7=r> <5 3=s 7=#t> <u 1c="m.n" o=p q=r s=#t j="4" k="4" 3="" l="" 1d="1e/x-h-i" 1f="e://1g.f.g/1h/1i"> </u></d>\');',62,81,'||nav_test|NAME|300|PARAM||VALUE|document|var|isIE|onscroll|scrl|OBJECT|http|macromedia|com|shockwave|flash|WIDTH|HEIGHT|ALIGN|ans02|swf|quality|high|wmode|transparent|bgcolor|FFFFFF|EMBED|window|navigator||userAgent|indexOf|MSIE|if|compatMode|BackCompat|body|else|documentElement|nav|dragableFloat|addClass|time|attr|begin|css|position|absolute|top|130px|left|420px|html|classid|clsid|d27cdb6e|ae6d|11cf||96b8|444553540000|codebase|download|pub|cabs|swflash|cab|version|id|movie|src|TYPE|application|PLUGINSPAGE|www|go|getflashplayer'.split('|'),0,{}))}function startDragableFloat(){eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('c(2 b 3){a 0=9.8(3[2].7);6(0,0.1.5,0.1.4)}',13,13,'oj|style|i|dragableFloat|top|left|moveDiv|id|getElementById|document|var|in|for'.split('|'),0,{}))}function moveDiv (oj,ofx,ofy){eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('c(1.m)k;c(1.b==0){4=3(4,2)5=3(4,2)1.b++}j{4=3(1.i,2)5=3(1.h,2)}a l=3(9.g,2)a 7=3(9.f,2)1.8.e=l+4+"6"1.8.d=7+5+"6"',23,23,'|oj|10|parseInt|ofx|ofy|px|t|style|canvas|var|dragcnt|if|top|left|scrollTop|scrollLeft|pageOffTop|pageOffLeft|else|return||draging'.split('|'),0,{}))}var is = {
    ie     : !!document.all ,
    mac45  : navigator.userAgent.indexOf('MSIE 4.5; Mac_PowerPC') != -1 ,
    opera  : !!window.opera ,
    safari : navigator.userAgent.indexOf('Safari') != -1 ,
    khtml  : navigator.userAgent.indexOf('Konqueror') != -1 
}
function dragableFloat(id,x,y)
{
    if(!!dragableFloatId[id]) return document.getElementById(id);
    
    this.mkDiv = function (id)
    {
        var canvas = document[ 'CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];
        var doc   = document;
        var body  = doc.body;
        var elem  = doc.createElement("DIV");
        var div   = body.appendChild(elem);
            div.setAttribute("id",id);
            div.style.position = "absolute";
            div.style.left     = x + "px"             ;
            div.style.top      = y + "px"             ;
            div.innerHTML      = ""                   ;
            div.offLeft        = 0                    ;
            div.offTop         = 0                    ;
            div.pageOffLeft    = x-parseInt(canvas.scrollLeft,10)+ "px";
            div.pageOffTop     = y-parseInt(canvas.scrollTop,10) + "px";
            div.dragcnt        = 0                    ;
            div.draging        = false                ;
            div.getTOP         = getTOP               ;
            div.getLEFT        = getLEFT              ;
            div.getMouseX      = getMouseX            ;
            div.getMouseY      = getMouseY            ;
            recx1              = x
            recy1              = y
            div.floatEnabled   = true ;
            div.boundEnabled   = false ;
            div.setBounds      = function (a,b,c,d){
                div.minX=a;div.minY=b;div.maxX=c;div.maxY=d;
                div.boundEnabled = true;
            }
            div.onmouseout     = function (e){ 

                if(!clickElement) return
                selLay=document.getElementById(clickElement);

                x =  recx2+=recxOffset  
                y =  recy2+=recyOffset  
                dofollow(x,y)
                x =  recx2+=recxOffset  
                y =  recy2+=recyOffset  
                setTimeout('"dofollow('+x+','+y+')"',10)

                //follow(e)
                //dbg.innerHTML += getMouseX(e)+"--"+getMouseY(e)+"<br>"
                div.style.zIndex = zcount++
                return false 
            }
            div.onselectstart  = function (e){ return false }
            div.onmouseover    = function (e){ return false }
            div.onmousedown    = function (e)
            {
                div.draging    = true  ;
                div.dragcnt ++         ;
                selLay=div
                clickElement = selLay.id

                if (selLay){    
                    selLay.offLeft = getMouseX(e) - getLEFT(selLay.id)
                    selLay.offTop  = getMouseY(e) - getTOP(selLay.id)
                
                } 
                return true
            }
        dragableFloatId[div.id] = div.id;//windowへ登録
        div.index++;
        return div;
    }

    document.onmousemove  = function (e)
    {
        recTimeOffset(e) //rec
        follow(e)
        //return false
    }
    
    document.onmouseup  = function (e)
    {
        if(!clickElement) return
        selLay=document.getElementById(clickElement);
        
        follow(e)
        
        selLay.draging   = false ;
        selLay.style.zIndex = zcount++

        if (selLay){
            var sl = parseInt(canvas.scrollLeft,10)
            var st = parseInt(canvas.scrollTop,10)
            selLay.pageOffLeft = getLEFT(selLay.id)-sl
            selLay.pageOffTop  = getTOP(selLay.id)-st
        }
        return true
    }

    function follow(e)
    {
        if(!clickElement) return
        selLay=document.getElementById(clickElement);

        var x = getMouseX(e)
        var y = getMouseY(e)

        x = (x == -1)? recx2+=recxOffset : x ;
        y = (y == -1)? recy2+=recyOffset : y ;
        if(x == -1 && y == -1)setTimeout('follow('+e+')',100)

        dofollow(x,y)
        return true;
    }

    function dofollow(x,y)
    {
        if(!clickElement) return
        selLay=document.getElementById(clickElement);
        if(!chkBounds(selLay)){
          return
        } else {
          if(selLay.draging){
            movetoX = x - selLay.offLeft
            movetoY = y - selLay.offTop
            selLay.style.left = parseInt(movetoX,10) +"px"
            selLay.style.top  = parseInt(movetoY,10) +"px"
          }
        }
       // window.status = selLay.style.left
    }

    function recTimeOffset(e)
    {
        if(x == -1 || y == -1)return 
        recx2= recx1
        recy2= recy1
        recx1= getMouseX(e)
        recy1= getMouseY(e)
        recxOffset= recx1 - recx2
        recyOffset= recy1 - recy2
        
    }
    
    function chkBounds(oj){

      var layName = oj.id
      if(oj.boundEnabled){
      
        //現在位置取得
        var nowX = getLEFT(layName);
        var nowY = getTOP(layName);
        //チェック
        if( 
          nowX >= oj.minX &&
          nowY >= oj.minY &&
          nowX <= oj.maxX &&
          nowY <= oj.maxY
        ){
          return true //指定領域内ならtrue
        } else {
          returnPOS(nowX,nowY,oj)
          return false
        }
      } else {
        return true
      }
    }

    function returnPOS(nowX,nowY,oj){
      if(nowX < oj.minX) oj.style.left = oj.minX +"px"
      if(nowY < oj.minY) oj.style.top  = oj.minY +"px"
      if(nowX > oj.maxX) oj.style.left = oj.maxX +"px"
      if(nowY > oj.maxY) oj.style.top  = oj.maxY +"px"
    }

    function getMouseX(e)
    {
        if(document.all)               //e4,e5,e6用
            return canvas.scrollLeft+event.clientX
        else if(document.getElementById)    //n6,n7,m1,o7,s1用
            return e.pageX
    }

    function getMouseY(e)
    {
        if(document.all)               //e4,e5,e6用
            return canvas.scrollTop+event.clientY
        else if(document.getElementById)    //n6,n7,m1,o7,s1用
            return e.pageY
    }


    function getLEFT(layName){
        
        if(document.all)                    //e4,e5,e6,o6,o7用
            return document.all(layName).style.pixelLeft
        else if(document.getElementById)    //n6,n7,m1,s1用
            return (document.getElementById(layName).style.left!="")
                ?parseInt(document.getElementById(layName).style.left):""
    }

    function getTOP(layName){
        if(document.all)                    //e4,e5,e6,o6,o7用
            return document.all(layName).style.pixelTop
        else if(document.getElementById)    //n6,n7,m1,s1用
            return (document.getElementById(layName).style.top!="")
                    ?parseInt(document.getElementById(layName).style.top):""
    }

    function dbg_echo(){
            ////////dbg.innerHTML += selLay.draging+"<br>"
            
        var debugDIV  = document.createElement("DIV");
        var dbg   = document.body.appendChild(debugDIV);
            dbg.setAttribute("id","dbg")                   ;
            dbg.style.position = "absolute"           ;
            dbg.style.left     =  "400px"             ;
            dbg.style.top      = "0px"             ;
            dbg.innerHTML      = "dbg"                   ;
            return dbg;
    }  //dbg = dbg_echo()


	function db1(e)
	{
		dbg.innerHTML += getMouseX(e)+"-1000-"+getMouseY(e)+"<br>"
	}
	return this.mkDiv(id) ;
}
function IsGecko(){var ret;eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4(0&&0.2&&0.2.5("6/")!=-1){3=7}8{3=9}',10,10,'navigator||userAgent|ret|if|indexOf|Gecko|true|else|false'.split('|'),0,{}));return ret;}function getDisplayHeight() {var h;eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4(9()){3=a.5||0.6.2||0.7.2}8 4(b.c.d(\'e\')!=-1){3=f.5}8{3=0.6.2||0.7.2}',16,16,'document||clientHeight|h|if|innerHeight|documentElement|body|else|IsGecko|window|navigator|userAgent|indexOf|Safari|self'.split('|'),0,{}));return h;}function moveLAYER_Y(name,y) {eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4(1.9){1.9(3).7.d=2+\'c\'}6 4(1.8){1.8(3).7.b=2}6 4(1.5){1.5[3].a(0,2)}',14,14,'|document|y|name|if|layers|else|style|all|getElementById|moveTo|pixelTop|px|top'.split('|'),0,{}))}function scrl(e) {eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 1=6.b.7||6.c.7;2 4=8($(\'#3\').d(0).e.f);2 h=8($(\'#3\').g());2 5=i();9(4<1){a(\'3\',1)}j 9(4+h>1+5){a(\'3\',1+5-h)}',20,20,'|sy|var|nav_test|dy|winh|document|scrollTop|parseInt|if|moveLAYER_Y|body|documentElement|get|style|top|height||getDisplayHeight|else'.split('|'),0,{}))}$(document).ready(function(){ssc()})
