/* auteur: Nadim Saikali */
/* Date de création: 29/01/2004 */
function swap_it(img_name,to_what,time)
{
	towhat=to_what;
	swap=eval('document.images.'+img_name);
//	var towhat="img/shim.gif";//'img/'+to_what+'.gif';
	swap.src=towhat;
}

function focuson(oThis) {
	if (oThis.value=="Enter a product number") {
		oThis.value="";
	}
}
function blurout(oThis) {
	if (oThis.value=="") {
		oThis.value="Enter a product number";
	}
}
//-
function tybsearch() {

	var atLeastOne;
	var theFrom = document.searchform;
	var countFields = parseInt(theFrom.countfields.value);
	for (i=0;i<countFields;i++) {
		if (theFrom.elements[i].checked==true)
			atLeastOne = 1;
	}
	
	if	(atLeastOne != 1) {
		alert("Veuillez sélectionner un type de bâtiment !");
		return;
	} else {
		theFrom.action = "recherche_result.php";
		theFrom.submit();
	}
	return;
}
//-
var delayed;
function delay() {
	delayed = setTimeout('document.getElementById("gamtext").innerText="Please, select a product range"', 400);
}
function stopdelay() {
	 clearTimeout(delayed);
}
//-
function popen(urlstr,nom,larg,haut,top,gch,scrl,rsz)
{
	new_win=window.open(urlstr,nom,'toolbar=no,location=no,directories=no,status=no,scrollbars='+scrl+',resizable='+rsz+',menubar=no,width='+larg+',height='+haut+',top='+top+',left='+gch+'');
	new_win.focus();
	return;
}

//|--
function handleCountryDiv(h){
	if (h==1) document.getElementById("countrydiv").style.display="";
	else document.getElementById("countrydiv").style.display="none"
}