// Start Round Search Field

function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Please update your old browser - see www.firefox.com");
  }
}

var DEF_VAL   = "Search"; // Default Value
var isSafari  = ((parseInt(navigator.productSub)>=20020000)&&
               (navigator.vendor.indexOf("Apple Computer")!=-1));

function replaceSearchField() {
  if (!document.getElementById) return;
  var searchForm  = document.getElementById('searchform');
  var searchField = document.getElementById('s');
  if (!searchField) return;
  if (isSafari) {
    searchForm.className = 'issafari';
    searchField.setAttribute('type', 'search');
    searchField.setAttribute('placeholder', DEF_VAL);
  } else {
    addEvent(searchField, 'focus', focusSearch, false);
    addEvent(searchField, 'blur',  blurSearch, false);
    if (searchField.value=='') searchField.value = DEF_VAL;
  }
  
}

function focusSearch() {
  // removes the initial value from the search field
  if (this.value==DEF_VAL) {
    this.value = '';
    this.setAttribute('class', 'focus');
  }
}

function blurSearch() {
  // assigns default value, if no value has been entered
  if (this.value=='') {
    this.value = DEF_VAL;
    this.removeAttribute('class', 'focus');
  }
}

addEvent(window, 'load', replaceSearchField, false);
// End Round Search Field

// Start Popup Image

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,left=150,top=105,width=700,height=500');");
}
// End Popup Image


// Popup HTML

function openpopup(popurl) {var winpops=window.open(popurl,"","width=500,height=400,scrollbars,resizable")}

//