
document.onkeydown = function doSomething(e) {
    var code;
    if (!e) var e = window.event;
    if (e.keyCode) code = e.keyCode;
    else if (e.which) code = e.which;
    var character = String.fromCharCode(code);
    if (character == 'z') history.go(0);
}


function settit(tit) {
    titum.style.display = 'block';
    notit.style.display = 'none';
    clicktitle.innerHTML = tit;
}


function clrtit(tit) {
    titum.style.display = 'none';
    notit.style.display = 'block';
    clicktitle.innerHTML = "&nbsp;";
}
    
    
function MM_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) {
            d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; // alert(a[i]); 
            }
    }
}

function loadthelot() {
    if (navigator.appName == "Microsoft Internet Explorer") { loadthelotIE() } else { loadthelotFF() };
}


function loadthelotIE() {
   // alert("ltlIE");
    // thumbnails
    MM_preloadImages(
    '/2010/pics/_dancers_II_1.jpg', '/2010/pics/_dancers_II_2.jpg', '/2010/pics/_dancers_II_3.jpg', '/2010/pics/_dancers_II_4.jpg',
    '/2010/pics/_Woman_Pulling_on_a_Stockin.jpg', '/2010/pics/_Woman_Sitting_Down.jpg', '/2010/pics/_Woman_Turning_in_Surprise.jpg',
    '/2010/pics/_mr1.jpg', '/2010/pics/_mr2.jpg', '/2010/pics/_mr3.jpg', '/2010/pics/_mr4.jpg', '/2010/pics/_jump1.jpg', '/2010/pics/_jump2.jpg');
}

function loadthelotFF() {
    // alert("ltlFF");
    thumbnails();
    prevnext();
    WomenDancingV();
    StraightJump();
    DancersII();
    Drawings();
    WomanSeries();
    ManRunning();
    Dancers();
    HungarianDancer();
    Muybridge();
    Archive();
   }
   
function thumbnails() {
    MM_preloadImages('/2010/pics/_dancers_II_1.jpg', '/2010/pics/_dancers_II_2.jpg', '/2010/pics/_dancers_II_3.jpg', '/2010/pics/_dancers_II_4.jpg',
    '/2010/pics/_Woman_Pulling_on_a_Stockin.jpg', '/2010/pics/_Woman_Sitting_Down.jpg', '/2010/pics/_Woman_Turning_in_Surprise.jpg',
    '/2010/pics/_mr1.jpg', '/2010/pics/_mr2.jpg', '/2010/pics/_mr3.jpg', '/2010/pics/_mr4.jpg', '/2010/pics/_jump1.jpg', '/2010/pics/_jump2.jpg');
    }
function prevnext() {
    MM_preloadImages('/pics/goleft2.gif', '/pics/goright2.gif', '/pics/goleft3.gif', '/pics/goright3.gif', '/pics/goleft4.gif', '/pics/goright4.gif', '/pics/goleft5.gif', '/pics/goright5.gif', '/pics/goleft6.gif', '/pics/goright6.gif');
    }
function WomenDancingV() {
    MM_preloadImages(
    '/2010/pics/Women_Dancing_IV.jpg'); 
    }
function StraightJump() {
    MM_preloadImages(
    '/2010/pics/jumpj.jpg');
    }
function DancersII() {
    MM_preloadImages(
    '/2010/pics/dancers_II_1.jpg',
    '/2010/pics/dancers_II_2.jpg',
    '/2010/pics/dancers_II_3.jpg',
    '/2010/pics/dancers_II_4.jpg');
    }
function Drawings() {
    MM_preloadImages(
    '/2010/pics/hd.jpg',
    '/2010/pics/torso.jpg',
    '/2010/pics/kata.jpg',
    '/2010/pics/head.jpg',
    '/2010/pics/body.jpg');
    }
function WomanSeries() {
    MM_preloadImages(
    '/2010/pics/Woman_Pulling_on_a_Stocking.jpg',
    '/2010/pics/Woman_Sitting_Down.jpg',
    '/2010/pics/Woman_Turning_in_Surprise.jpg');
    }
function ManRunning() {
    MM_preloadImages(
    '/2010/pics/mr1.jpg',
    '/2010/pics/mr2.jpg',
    '/2010/pics/mr3.jpg',
    '/2010/pics/mr4.jpg');
    }
function Dancers() {
    MM_preloadImages(
    'pics/The_Dancers_I.jpg',
    'pics/The_Dancers_II.jpg',
    'pics/The_Dancers_III.jpg',
    'pics/The_Dancers_IV.jpg',
    'pics/The_Dancers_V.jpg',
    'pics/The_Dancers_VI.jpg');
    }
function HungarianDancer() {
    MM_preloadImages(
    '/pics/HD_drawing1.jpg',
    '/pics/HD_drawing2.jpg',
    '/pics/HD_drawing3.jpg',
    '/pics/HD_drawing4.jpg',
    '/pics/HD1.jpg',
    '/pics/HD2.jpg',
    '/pics/HD3.jpg',
    '/pics/HD4.jpg',
    '/pics/HD5.jpg',
    '/pics/HD6.jpg',
    '/pics/HD7.jpg',
    '/pics/HD8.jpg',
    '/pics/HD9.jpg',
    '/pics/HD10.jpg',
    '/pics/HD11.jpg', 
    '/pics/HD12.jpg');
    }
function Muybridge() {
    MM_preloadImages(
    '/2010/pics/Woman_I.jpg',
    '/2010/pics/Woman_II.jpg',
    '/2010/pics/Woman_III.jpg',
    'Woman_IV2b.jpg', 'Woman_V.jpg',
    'Men_Wrestling_V.jpg',
    'pigeon.jpg');
    }
function Archive() {
    MM_preloadImages(
    '/pics/Women-Dancing_2.jpg',
    '/pics/Women-Dancing_II.jpg',
    '/pics/Women-Dancing_III.jpg',
    '/pics/Women-Dancing_IV.jpg',
    '/pics/Woman-Walking_2.jpg',
    '/pics/Man-Walking_3.jpg',
    '/pics/men_fighting.jpg',
    '/pics/men_fighting_II.jpg',
    '/pics/men_fighting_III.jpg',
    '/pics/men_fighting_IV.jpg',
    '/pics/Men-Wrestling_2.jpg',
    '/pics/Men-Wrestling-II_2.jpg',
    '/pics/Men-Wrestling-III_2.jpg',
    '/pics/Men-Wrestling-IV.jpg');
    }



function dropSignature() {

    isNS6 = (!document.all && document.getElementById) ? true : false;

    innerH = document.body.clientHeight

    if (isNS6) { innerH = self.innerHeight; document.getElementById('signature').style.top = (innerH - 20) + "px" }

    else {
        document.getElementById('signature').style.top = innerH - 17;
    }

}


function toggleVisibility(id, NNtype, IEtype, WC3type) {
    if (document.getElementById) {
        if (screen.width > 1000) {
            eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
        }
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
}
function toggle2(id, NNtype, IEtype, WC3type) {
    if (document.getElementById) {
        if (screen.width > 1000) {
            eval("document.getElementById(id).style.display = \"" + WC3type + "\"");
        }
    } else {
        if (document.layers) {
            document.layers[id].display = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.display = \"" + IEtype + "\"");
            }
        }
    }
}


function f11() {
    var frameHeight

    if (self.innerWidth) {
        //FF
        frameHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientWidth) {
        frameHeight = document.documentElement.clientHeight;
    }
    else if (document.body) {
        frameHeight = document.body.clientHeight;
        //IE
    }
    if ((frameHeight + 10) > screen.availHeight) {
        document.getElementById('F11').style.display = 'none';
    }
    else {
        document.getElementById('F11').style.display = 'block';
    }

}


function showF11() {
    toggle2('f11expl', 'block', 'block', 'block');
}

function hideF11() {
    toggle2('f11expl', 'none', 'none', 'none');
}

/* Expando Image Script ©2008 John Davenport Scheuer
   as first seen in http://www.dynamicdrive.com/forums/
   username: jscheuer1 - This Notice Must Remain for Legal Use
   */

if (document.images){
 (function(){
  var cos, a = /Apple/.test(navigator.vendor), times = a? 20 : 40, speed = a? 40 : 20;
  var expConIm = function(im){
   im = im || window.event;
   if (!expConIm.r.test (im.className))
    im = im.target || im.srcElement || null;
   if (!im || !expConIm.r.test (im.className))
    return;
   var e = expConIm,
   widthHeight = function(dim){
    return dim[0] * cos + dim[1] + 'px';
   },
   resize = function(){
    cos = (1 - Math.cos((e.ims[i].jump / times) * Math.PI)) / 2;
    im.style.width = widthHeight (e.ims[i].w);
    im.style.height = widthHeight (e.ims[i].h);
    if (e.ims[i].d && times > e.ims[i].jump){
     ++e.ims[i].jump;
     e.ims[i].timer = setTimeout(resize, speed);
    } else if (!e.ims[i].d && e.ims[i].jump > 0){
     --e.ims[i].jump;
     e.ims[i].timer = setTimeout(resize, speed);
    }
   }, d = document.images, i = d.length - 1;
   for (i; i > -1; --i)
    if(d[i] == im) break;
   i = i + im.src;
   if (!e.ims[i]){
    im.title = '';
    e.ims[i] = {im : new Image(), jump : 0};
    e.ims[i].im.onload = function(){
     e.ims[i].w = [e.ims[i].im.width - im.width, im.width];
     e.ims[i].h = [e.ims[i].im.height - im.height, im.height];
     e (im);
    };
    e.ims[i].im.src = im.src;
    return;
    }
   if (e.ims[i].timer) clearTimeout(e.ims[i].timer);
   e.ims[i].d = !e.ims[i].d;
   resize ();
  };

  expConIm.ims = {};

  expConIm.r = new RegExp('\\bexpando\\b');

  if (document.addEventListener){
   document.addEventListener('mouseover', expConIm, false);
   document.addEventListener('mouseout', expConIm, false);
  }
  else if (document.attachEvent){
   document.attachEvent('onmouseover', expConIm);
   document.attachEvent('onmouseout', expConIm);
  }
 })();
}
