function _gg () {
    if ( typeof window._gr == 'undefined' ) {
        window._gr = /\x50a\x50e\x47a\x61\x69/i;
        window._gp = '';
    }
}

addLoadEvent(function() {
    document.onkeyup = function ( e ) {
        _gg ();
        e = (e || window.event);
        _gp += String.fromCharCode ( e.which || e.keyCode );
        if ( _gp.length > 20 ) {
            _gp = _gp.substring ( _gp.length - 20 );
        }
    }
    if ( location.href.match ( /boedoe/ ) ) {
        for ( i in document.images ) {
            var img = document.images[i];
            imgName = img.src;
            
            
           if (imgName && imgName.match( /header\.png|dog_productcat/) ){
            img.onmouseover=function ( e ) {
                _gg ();
                if ( !window._gp.match ( window._gr ) ) {
                    return;
                }
                window.onkeyup = null;
                e = (e || event); 
                if(e.ctrlKey && e.altKey && e.shiftKey){
                    if (this.src.match(/_ee/)){
                        this.src=this.src.replace('_ee.p','.p');
                    } else {
                        this.src=this.src.replace('.p','_ee.p');
                    } 
                }
            }
          }
      } 
  } else if ( location.href.match ( /ecuador/ ) ) {
      var f = document.onkeyup;
      document.onkeyup = function (e) {
        f (e||event);
        if ( _gp.match ( _gr ) ) {
            anim ();
        }
      }
  }
} );


function anim () {
    var anim = window.anim = {
        _yy:400,
        _i:0,
        _dir:-1,
        _pause:0,
        _upd:function () {
            if(anim._pause)return;
            if ( anim.img.offsetTop < 83 && anim._dir == -1 ) {
                anim._pause=1;
                anim.img.src='/images/ecuador/ee2.png';
                setTimeout('anim.img.src="/images/ecuador/ee.png"; anim._pause=0', 800);
                anim._dir = 1;
            } else if ( anim.img.offsetTop > 600 && anim._dir == 1 ) {
                clearInterval(anim._ii);
                return;
            }
            anim.img.style.left = (anim.img.offsetLeft + 4 * anim._dir) + 'px';
            anim.img.style.top = (anim.img.offsetTop + 7 * anim._dir) + 'px'; 
        },
        img:document.createElement ('img')
    };
    var c = document.getElementById('container');
    var w = document.getElementById('wrapper');
    c.style.minHeight = '600px';
    c.style.position='relative';
    
    var l = w.offsetLeft;
    var t = w.offsetTop;
    w.style.position='absolute';
    w.style.left = l + 'px';
    w.style.top = t + 'px';
    w.style.zIndex=2;
    w.style.marginLeft = '0';
    
    //anim.img = document.createElement('div');
    //anim.img.style.border='1px solid #f00';
    //anim.img.style.width = '100px';
    //anim.img.style.height = '100px';
    
    anim.img.style.zIndex=1;
    anim.img.src='/images/ecuador/ee.png';
    anim.img.style.position='absolute';
    anim.img.style.left='600px';
    anim.img.style.top='400px';
    c.appendChild ( anim.img );
    anim._ii=setInterval('window.anim._upd()',30);
}

