<!--
/*
  $Id: general.js 1739 2007-12-20 00:52:16Z hpdl $

  B2B (Business to Business) Company Directory

  Copyright (c) 2008 Gill

*/

function changeCenter(input){
	if (input==1)  {
		if (document.quick_find.keywords.value!=='') {
			if (document.quick_find.keywords.value==='Search Products' || document.quick_find.keywords.value==='Search Buyers' || document.quick_find.keywords.value==='Search Suppliers') {
		  	document.quick_find.keywords.value = 'Search Products';
		  }
	  	document.quick_find.search_type.value = '1';
	  	makeactive(1);
		}
  }
	if (input==2)  {
		if (document.quick_find.keywords.value!=='') {
			if (document.quick_find.keywords.value==='Search Products' || document.quick_find.keywords.value==='Search Buyers' || document.quick_find.keywords.value==='Search Suppliers') {
		  	document.quick_find.keywords.value = 'Search Buyers';
		  }
	  	document.quick_find.search_type.value = '2';
	  	makeactive(2);
		}
  }
	if (input==3)  {
		if (document.quick_find.keywords.value!=='') {
			if (document.quick_find.keywords.value==='Search Products' || document.quick_find.keywords.value==='Search Buyers' || document.quick_find.keywords.value==='Search Suppliers') {
		  	document.quick_find.keywords.value = 'Search Suppliers';
		  }
	  	//document.quick_find.search_type.value = '3'; NG:2009-08-01 17:42:45, I have changed the suppliers to default-country-companies
	  	document.quick_find.search_type.value = '4';
	  	makeactive(3);
		}
  }
}

function makeactive(tab) {
	if (tab==1)  {
		document.getElementById("headproducts").className = "on";
		document.getElementById("headbuyer").className = "off";
		document.getElementById("headsupplier").className = "off";
	}
	if (tab==2)  {
		document.getElementById("headproducts").className = "off";
		document.getElementById("headbuyer").className = "on";
		document.getElementById("headsupplier").className = "off";
	}
	if (tab==3)  {
		document.getElementById("headproducts").className = "off";
		document.getElementById("headbuyer").className = "off";
		document.getElementById("headsupplier").className = "on";
	}
}

//-->