
// Elenco delle funzioni di inizializzazione registrate
var overgears_windowOnload_initList = new Array();

// Da invocare per registrare una funzione di inizializzazione
function overgears_windowOnload_registerFunction( func ) {
    var last = overgears_windowOnload_initList.length;
	overgears_windowOnload_initList[last] = func;
}

function overgears_windowOnload_runInitialization(){
    var length = overgears_windowOnload_initList.length;
	for(var i = 0;i < length; i++ ) {
        // Invoca una alla volta tutte le funzioni di inizializzazione
        overgears_windowOnload_initList[i]();
	}
}

// Registra la funzione di inizializzazione globale
window.onload = overgears_windowOnload_runInitialization; 
/* no code */
function tethys_searchBox_search(){
  var u = document.location.href.replace(/http:\/\//, ''); 
  var sb = document.getElementById('tethys_searchbox'); 
  sb.cref.value = 'http://www.google.com/cse/tools/makecse?url=' + encodeURIComponent(u); 
}

function tethys_searchBox_watermark(){
  var f = document.getElementById('tethys_searchbox'); 
  if (!f) { 
    f = document.getElementById('tethys_searchbox'); 
  } 
  if (f && f.textfield) {
    var textfield = f.textfield; 
    var n = navigator; 
		var l = location; 
		if (n.platform == 'Win32') { 
      textfield.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;'; 
    } 
    var b = function() { 
      if (textfield.value == '') { 
        textfield.style.background = '#FFFFFF url(http://www.tethysriproduzione.it/webints/tethys/tiles/searchBox/pics/googleWatermark.gif) left no-repeat'; 
      }
    }; 
    var f = function() { 
      textfield.style.background = '#ffffff'; 
    }; 
    textfield.onfocus = f; 
    textfield.onblur = b; 
    if (!/[&?]textfield=[^&]/.test(l.search)) { 
      b(); 
    } 
  } 
}

function tethys_searchBox_googleSearch() {
   var textSearch = document.getElementById( "textfield" );
   window.location = "http://www.google.com/search?hl=it&ie=UTF-8&domains=www.tethysriproduzione.it&q=" 
	   + textSearch.value + "&btnG=Cerca&sitesearch=www.tethysriproduzione.it"
}


overgears_windowOnload_registerFunction( tethys_searchBox_search );
overgears_windowOnload_registerFunction( tethys_searchBox_watermark );
//overgears_windowOnload_registerFunction( tethys_searchBox_googleSearch );