//form focus
function focusClear(item,fill) {
var change = document.getElementById(item);
  if (change.value == fill) {
    change.value = '';
  }
}
function blurFill(item,fill) {
var change = document.getElementById(item);
  if (change.value != '') {
    return;
  } else {
    change.value = fill;
  }
}

// mail mash
// from http://www.tauros.eu/en/article-hide-email-address-from-spammers
function mash(id) {
var E = 'footlooseupstate.com';
var r = 'hr'+'ef=';
var l = 'l'+'to';
var s = 'm'+'ai';
E = 'webmaster'+("a@bc.nl").charAt(1)+E;
E = '<a '+r+'"'+s+l+':'+E+'">Webmaster</a>';
document.getElementById(id).innerHTML = E;
}


// Random Quote
function quote() {
  var randomnumber=Math.floor(Math.random()*21);
  var text;
  if (randomnumber==0) {
    text="&ldquo;There are short&ndash;cuts to happiness, and dancing is one of them.&rdquo; &ndash; Vicki Baum";
  } else if (randomnumber==1) {
    text="&ldquo;Life is a dance, from one stage to the next.&rdquo; &ndash; Anonymous";
  } else if (randomnumber==2) {
    text="&ldquo;Dance is the hidden language of the soul.&rdquo; &ndash; Martha Graham";
  } else if (randomnumber==3) {
    text="&ldquo;Dancers are the athletes of God.&rdquo; &ndash; Albert Einstein";
  } else if (randomnumber==4) {
    text="&ldquo;We&rsquo;re fools whether we dance or not, so we might as well dance.&rdquo; &ndash; Japanese proverb";
  } else if (randomnumber==5) {
    text="&ldquo;To dance is to be out of yourself.&rdquo; &ndash; Agnes De Mille";
  } else if (randomnumber==6) {
    text="&ldquo;Dance, even if you have nowhere to do it but your living room.&rdquo; &ndash; Kurt Vonnegut";
  } else if (randomnumber==7) {
    text="&ldquo;Stifling an urge to dance is bad for your health&ndash;it rusts your spirit and your hips.&rdquo; &ndash; Adabella Radici";
  } else if (randomnumber==8) {
    text="&ldquo;Dancing is the poetry of the foot.&rdquo; &ndash; John Dryden";
  } else if (randomnumber==9) {
    text="&ldquo;Dance is the hidden language of the soul.&rdquo; &ndash; Martha Graham";
  } else if (randomnumber==10) {
    text="&ldquo;To watch us dance is to hear our hearts speak.&rdquo; &ndash; Hopi Indian saying";
  } else if (randomnumber==11) {
    text="&ldquo;The dance is a poem of which each movement is a word.&rdquo; &ndash; Mata Hari";
  } else if (randomnumber==12) {
    text="&ldquo;There is a bit of insanity in dancing that does everybody a great deal of good.&rdquo; &ndash; Edwin Denby";
  } else if (randomnumber==13) {
    text="&ldquo;I would believe only in a God that knows how to dance.&rdquo; &ndash; Friedrich Nietzsche";
  } else if (randomnumber==14) {
    text="&ldquo;Never trust spiritual leader who cannot dance.&rdquo; &ndash; Mr. Miyagi";
  } else if (randomnumber==15) {
    text="&ldquo;Nobody cares if you can't dance well. Just get up and dance.&rdquo; &ndash; Dave Barry";
  } else if (randomnumber==16) {
    text="&ldquo;Dancing faces you towards Heaven, whichever direction you turn.&rdquo; &ndash; Sweetpea Tyler";
  } else if (randomnumber==17) {
    text="&ldquo;You can dance anywhere, even if only in your heart&rdquo; &ndash; Anonymous";
  } else if (randomnumber==18) {
    text="&ldquo;Dancing is the perpendicular expression of a horizontal desire.&rdquo; &ndash; Anonymous";
  } else if (randomnumber==19) {
    text="&ldquo;Anyone who says sunshine brings happiness has never danced in the rain.&rdquo; &ndash; Anonymous";
  } else if (randomnumber==20) {
    text="&ldquo;Dance first. Think later. It&rsquo;s the natural order.&rdquo; &ndash; Samuel Beckett";
  }
  return (text);
}

// Toggle event 'more info'
// from http://www.netlobo.com/div_hiding.html
function toggle( id ) {
  var elem, vis;
  if( document.getElementById ) {// this is the way the standards work
    elem = document.getElementById( id );
  } else if( document.all ) { // this is the way old msie versions work
      elem = document.all[id];
  } else if( document.layers ) { // this is the way nn4 works
    elem = document.layers[id];
  }
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

// Toggle invisible field in forms
// from http://www.satya-weblog.com/2007/06/javascript-show-hide-div-p-input-or-any.html
function toggleElement(sel1, element1) {
  element1 = document.forms[0].elements[element1];
  // alert(element1.value);
  if (sel1.value == 'Other') {
    element1.style.display = 'inline';
  }
  else {
    element1.style.display = 'none'; // hide text element
  }
  return;
}