<!--

var akamaiImgs = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com';	
var akamaiTNW = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/SITE/I/S';
var akamaiBlank = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/SITE/I/0.GIF';	

// get data from jsp
function buildList(xml, tag, field) {
   if (xml.getElementsByTagName(tag)) {
      list = xml.getElementsByTagName(tag)[0].getElementsByTagName('option');
      for (i = 0; i < list.length; i++) {
         option = new Option(list[i].getAttribute('description'), list[i].getAttribute('code'));
         field.options[field.options.length] = option;
      }
   }
}

function buildPickList(xml, form) {
 /*  buildList(xml, 'countryList', form.country); 
   buildList(xml, 'industryList', form.industry); 
   buildList(xml, 'monthList', form.month); */
   
   buildList(xml, 'countryList', form.event_country); 
   buildList(xml, 'industryList', form.event_industry); 
   buildList(xml, 'monthList', form.event_month);   
   
}

function handler() {
 if(client.readyState == 4 && client.status == 200) {
  // so far so good
  if(client.responseXML != null && client.responseXML.getElementsByTagName('tsfindbox'))
   // success!
   //buildPickList(client.responseXML, document.theForm);
   buildPickList(client.responseXML, document.findashow);
   
  else
   buildPickList(null);
 } else if (client.readyState == 4 && client.status != 200) {
  // fetched the wrong page or network error...
  buildPickList(null);
 }
}

var client = null;

function getURL2(url) {
   if (window.XMLHttpRequest) {
      client = new XMLHttpRequest();
   } else if (window.ActiveXObject) {
     client = new ActiveXObject("Microsoft.XMLHTTP");
   }
   client.onreadystatechange = handler;
   client.open("GET", url, true);
   client.send(null);
}
// end get data from jsp

// picklist filter

function doSearch(form) {
	//reset the sorting, paging
	/*form['page'].value=1;
	form['doSort'].value="";
	form['reverse_sort'].value="";
	form['sorter'].value="";
	
	form.submit();
	*/
	if(form['inputkey'].value != "(Enter Keyword Optional)")
	{	form['keyword'].value = form['inputkey'].value;
	}
	form.submit();	
} 


 function doFilter(form, field) {
 var slectVal=field.options[field.selectedIndex].value;
	var sindex=field.selectedIndex;
	//alert(slectVal +"i="+sindex);
	blankSelected=false;
	if (sindex!=0 && slectVal=='') {    //items hardcoded into the page, or from xml if it uses < option CODE="" description=""  /> 
	//if (sindex!=0 && slectVal=='null') {    //get data from xml if it uses < option VALUE="" description=""  /> 
		field.options[0].selected=true;
		blankSelected=true;
	} 
	/*if (!blankSelected) {
		form.submit();
	} */
	
	if (!blankSelected) 
	{	if(form['inputkey'].value != "(Enter Keyword Optional)")
		{ form['keyword'].value = form['inputkey'].value; }
		form.submit()
	}	
 } 
// end picklist filter


var MacBrws = (navigator.appVersion.indexOf("Mac") != -1);
var brwSafari = (navigator.appVersion.indexOf("Safari") != -1);	
var brwsNets = (navigator.appName.indexOf("Netscape") != -1);
var brwFirefox = (navigator.userAgent.indexOf("Firefox") != -1);

	
//-->