
/**********************************************************
 * Clears the copi.org search input box when the user gives
 * it focus && it contains the default text.
 *********************************************************/
function clearInput(textBox, text){
   if (textBox.value == text){
      textBox.value = "";
   }
}


/**********************************************************
 * changes the stylesheet of the current page and saves the
 * user's preferred style sheet in the "style" cookie.
 *********************************************************/
function setStyleSheet(style){
   var ss;
   var date = new Date();
   date.setTime(date.getTime()+(2592000000)); //add 30 days to the current date
   var expires = date.toGMTString();
   
   if(document.all){ //This is IE
      ss = document.styleSheets[0].owningElement;
   }else{ //This is Mozilla
      ss = document.styleSheets[0].ownerNode;
   }

   ss.href = style + ".css";

   //Save the user's style preference
   document.cookie = "style=" + escape(style) + "; expires=" + expires + "; path=/; domain=copi.org;"

}
/*
function dispFl(x, y){
   var img = document.createElement("img");
   img.src = "images/flower.gif?"+x;
   img.style.position = "absolute";
   img.style.left = x + "px";
   img.style.top = y + "px";
   document.body.appendChild(img);
}

window.setTimeout("dispFl(165,30)", 3000);
window.setTimeout("dispFl(92,25)", 2000);
window.setTimeout("dispFl(2,2)", 3500);
*/