




function menuToggle(element, eventName, handler){
	element = document.getElementById(element);
	if (element.addEventListener) {
	element.addEventListener(eventName, handler, false);
	} else {
	element.attachEvent("on" + eventName, handler);
	}
}

function searchbtn() {  
			
			
			var keyword = document.search.keyword.value;
			if(keyword == '')
			{
				alert("Please type the word or words you wish to search for in the Search box. ");
				return;
			}
								
			
			var searchtype = document.search.SearchType.value; 
			var url="http://www.embiz.net/";
			if(searchtype == "1")
				url += "tradelist.aspx?tradetype=1&keyword=";
			else if(searchtype == "2")
				url += "tradelist.aspx?tradetype=2&keyword=";
			else if(searchtype == "3")
				url += "companylist.aspx?keyword=";
			else if(searchtype == "4")
				url += "productlist.aspx?keyword=";
			
			url += keyword;	
			
			
			document.location = url;
		
		}
	function DrawImage(ImgD,iwidth,iheight){

	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
		flag=true;
		if(image.width/image.height>= iwidth/iheight){
			if(image.width>iwidth){ 
				ImgD.width=iwidth;
				ImgD.height=(image.height*iwidth)/image.width;
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			}
		}else{
			if(image.height>iheight){ 
				ImgD.height=iheight;
				ImgD.width=(image.width*iheight)/image.height; 
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			}
		}
	}
}


	function displayMoreCountry(isMore){
		if(isMore == 1)
		{
			var div = document.getElementById("include_country_divb");
			div.style.display = "none";
		
			div = document.getElementById("include_country_more_divb");
			div.style.display = "";
		}
		else
		{
			var div = document.getElementById("include_country_divb");
			div.style.display = "";
		
			div = document.getElementById("include_country_more_divb");
			div.style.display = "none";
		}
		
	}










