<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function ControllaRicerca(s){
	if (s == '' || s.length<2){	
		alert('Per effettuare una ricerca inserire almeno due lettere!');	
		return false;	
	}else return true; 
	}

function ControllaRicerca(s, min, max){
	var nMin = parseInt( min );
	var nMax = parseInt( max );
	if( isNaN(nMin) ) nMin=0;
	if( isNaN(nMax) ) nMax=0;
	if( nMin==0 && nMax==0 ){
		if (s == '' || s.length<2){	
			alert("Per effettuare una ricerca inserire  almeno due lettere per il prodotto e/o un prezzo minimo e/o massimo!");
			return false;	
		} 
	}	
		if( nMin!=0 && nMax !=0 && nMin > nMax ){
			alert("Attenzione, il prezzo minimo non deve essere maggiore del prezzo massimo!");
			return false;
		}
		// controlla se il prezzo inserito è numerico
		if( isNaN(nMin) ){
			alert("Attenzione, il prezzo minimo deve essere numerico e superiore a 0 (zero)!");
			return false;
		}
		if( isNaN(nMax) ){
			alert("Attenzione, il prezzo massimo deve essere numerico e superiore a 0 (zero)!");
			return false;
		}
	return true;
	}

function showAdvSearch(){ 
	document.getElementById('divAdvSearch').style.visibility='visible'; 
	document.getElementById('AdvSearch').style.visibility='hidden'; 
	document.getElementById('txtSearch').focus(); 
	}

function AggiungiAPreferiti()
	{
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4))
		{
		window.external.AddFavorite("http://www.Yodoo.it","Yodoo - Confronta i migliori prezzi online" );
  		}
  	else
  		{
	  alert("Premi CTRL + D per aggiungere Yodoo ai Preferiti.")
  		}
	}	
//-->
