var akamaiImgs = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com';	

function addToFavorite(){
  var pagetitle = document.title.toString();
  if (pagetitle=="") {
     pagetitle = "Global Sources: The Largest Base of Suppliers";
  }  
  var urlstr2 = document.location.toString();  //added oct24,2005 - to detect if nav is from tradeshowcalendar
  /*if (urlstr2.indexOf("tradeshowcalendar") > 0)
  	{window.external.AddFavorite(document.location+"/?ref=bmk",pagetitle)
	} else 
	{window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
	} */
	
	/*if (urlstr2.indexOf("HONGKONG-ELECTRONICS") > 0) // to diff static from dynamic
  	{window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
	} else  
	{ */ //window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)
	//window.external.AddFavorite(document.location,pagetitle)
	//}
	
  // start addFavorite conditions	
  if ((urlstr2.indexOf(".htm") > 0) || (urlstr2.indexOf(".HTM") > 0))  //.htm uses ?ref=bmk -- except for exhibitor-list w/ uses &ref=bmk
  { if (urlstr2.indexOf("exhibitor-list") > 0) 
  	{window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)}
    else if (urlstr2.indexOf("tradeshowcalendar") > 0)
  	{window.external.AddFavorite(document.location+"/?ref=bmk",pagetitle)}	
  	else
  	{window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)} 	
  }
  
  else if (urlstr2.indexOf(".jsp") > 0)
  	{window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)}
	
  else 
    {window.external.AddFavorite(document.location,pagetitle)}	

  // end addFavorite conditions
  	
} // end addToFavorite

function addToFavoriteNS(){
alert("Please press ^D (CTRL-D) to bookmark this page");
}

function writeBottomFunctions() {
	document.write('<table align="center" border="0" cellpadding="2" cellspacing="0">');
    //document.write('<tr><td><span class=srch><img src="'+akamaiImgs+'/SITE/I/ARROW.GIF" width="22" height="18" align="absmiddle"><a href="#top">Go to Top</a> </span></td>');
	//document.write('<td>&nbsp;&nbsp;&nbsp;</td>');
	document.write('<tr><td><span class=srch><img src="'+akamaiImgs+'/SITE/I/BOOK.GIF" width="21" height="19" align="absmiddle"> ');
		
			if 	(navigator.appName=="Netscape") {
			//(navigator.userAgent.indexOf("Netscape")!= -1) {   // this is to differentiate Firefox from Netscape
			document.write('&nbsp;<a href="javascript:addToFavoriteNS()">Bookmark this page</a><br>');
			}
			else if (parseInt(navigator.appVersion)>3) {
			document.write('&nbsp;<a href="javascript:addToFavorite()">Bookmark this page</a><br>');
			}
		
		document.write('</span>	');
	document.write('</td>');
    document.write('</tr>');
    document.write('</table>');
}	
	