// This is the default Blueprint javascript lib for this site.
function clearMe(formfield){
  if (formfield.defaultValue==formfield.value)
   formfield.value = ""
}

function gradientify() {
  var colours = ['pink-blue', 'grey-blue', 'blue-green', 'blue-yellow', 'yellow-red', 'pink-red'];
  colours.shuffle();
  $$('body', '#content', '.footer').each( function(col) {
    col.addClassName(colours[0]);
  });
}


/*
 * Add a shuffle function to Array object prototype
 * Usage : 
 *  var tmpArray = ["a", "b", "c", "d", "e"];
 *  tmpArray.shuffle();
 */
Array.prototype.shuffle = function (){
    var i = this.length, j, temp;
    if ( i == 0 ) return;
    while ( --i ) {
        j = Math.floor( Math.random() * ( i + 1 ) );
        temp = this[i];
        this[i] = this[j];
        this[j] = temp;
    }
};
