var akamaiImgs = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com';	

// PREVIOUSLY footer_hp.js ---- start
// Get 13 digit time stamp plus 6 digit random number
today=new Date();
timetoday=today.getTime();
randm = getRandom(100000,999999);
timenow = timetoday + "" + randm;
function getRandom(min,max)
{return (Math.round(Math.random()*(max-min)))+min;}

// Get browser information
nets = (navigator.appName.indexOf("Netscape") != -1);
nseven = (navigator.userAgent.indexOf("Netscape/7") != -1);
bVer=parseInt(navigator.appVersion);
var isMSIE3 = false;

var name = "new_visited_us";
var path = "/";
var expDays = 365*20; // number of days the cookie should last
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); 
var value = timenow;

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>');
}

function openNew(link) {
	msg=window.open(link,"DisplayWindow2","HEIGHT=550,WIDTH=800,status=1,toolbar=0,directories=0,menubar=0,location=0,scrollbars=1,resizable=1,top=50,left=50");
	if (window.focus) {msg.focus()}
}

function newWinTrd(page,height,width) {
	params = "height=" + height + ",width=" + width + ",status=1,toolbar=0,directories=0,menubar=0,location=0,scrollbars=1,resizable=1,top=250,left=50,screenX=250,screenY=50";
	mypopup = window.open(page,"PopupWindow",params);
	mypopup.focus();
}

function GetCookie(name) {
   if ((bVer > 2) && !isMSIE3) {
      var arg  = name + "=";
      var alen = arg.length;
      var clen = document.cookie.length;
      var i    = 0;
      while(i < clen) {
         var offset = i + alen;
         if(document.cookie.substring(i, offset) == arg) {
            var iEnd  = document.cookie.indexOf(";", offset);
            if(iEnd == -1) {
               iEnd = document.cookie.length;
            }
            return unescape(document.cookie.substring(offset, iEnd));
         }
         i = document.cookie.indexOf(" ", i) + 1;
         if(i == 0) {
            break;
         }
      }
      return null;
   }
}
function SetCookie(name, value, expires, path) {
   if((bVer > 2) && !isMSIE3) {
      document.cookie = name + "=" + escape(value)
      + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ";domain=.globalsources.com"
      + ((path == null) ? "" : ("; path=" + path));
   } else {
      eval(name + " = '" + value + "'");
   }
}
function setUniqCookie() {
   if ((bVer > 2) && !isMSIE3) {
      snooky = GetCookie(name);
     // alert ("snooky : " + snooky);
	 if (snooky == null) {
	  SetCookie(name, value, exp, path);
	  }
   }
}

function writeBottom() {
	
	/* GLOBAL BOTTOM FUNCTIONS */
	writeBottomFunctions();
	/* GLOBAL BOTTOM FUNCTIONS */
	
	/* GLOBAL BOTTOM NAV */
	document.write(' <div class=srch style="margin-top: 25px;"> ');
		document.write(' <div class=ht5></div><div align=center><a href="http://www.corporate.globalsources.com/" class=srch>About Global Sources</a> &nbsp;|&nbsp; <a href="http://corporate.china.globalsources.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/ABOUTCN.GIF" style="vertical-align: bottom;" alt="About Global Sources - Chinese" title="About Global Sources - Chinese" border=0 width=48 height=14></a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/SITE/BUYER/MAIN.HTM" class=srch>Our Services</a> &nbsp;|&nbsp; <a href="http://investor.globalsources.com/phoenix.zhtml?c=121487&p=irol-IRHome" class=srch>Investor Relations</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/SITE/PARTNER.HTM" class=srch>Partner With Us</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/HELP/SITEHELP.HTM" class=srch>Help &amp; FAQ</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/SITE/SITEMAP.HTM" class=srch>Site Map</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/CUSTOMER/CONTACT.HTM" class=srch>Contact Global Sources</a></div> ');
		document.write(' <div class=ht5></div><div align=center><b>Our other sites: </b>&nbsp;<a href="http://www.globalsources.com/gsol/I/all-countries/c/2000000003844/3000000149681/-1.htm" class=srch>Country Sourcing</a> &nbsp;|&nbsp; <a href="http://www.eetasia.com/" class=srch>EE Times - Asia</a> &nbsp;|&nbsp; <a href="http://www.eetindia.co.in/" class=srch>EE Times - India</a> &nbsp;|&nbsp; <a href="http://www.smartchinasourcing.com/" class=srch>Smart China Sourcing</a> &nbsp;|&nbsp; <a href="http://www.cantonfair.com/" class=srch>Canton Fair</a></div> ');
		document.write(' <div class=ht5></div><div align=center><a href="http://www.b2b.globalsources.com.cn/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/SITE/I/B2B.GIF" style="vertical-align: middle;" border=0 width=83 height=15></a> &nbsp;|&nbsp; <a href="http://www.globalsources.com.cn/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/CGSOL.GIF" style="vertical-align: middle;" alt="globalsources.com.cn - manufacturers" title="globalsources.com.cn - manufacturers" border=0 width=85 height=15></a> &nbsp;|&nbsp; <a href="http://www.eet-china.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/EETC.GIF" style="vertical-align: middle;" alt="EE Times - China" title="EE Times - China" border=0 width=71 height=15></a> &nbsp;|&nbsp; <a href="http://www.esmchina.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/ESMC.GIF" style="vertical-align: middle;" alt="esmchina" title="esmchina" border=0 width=72 height=15></a> &nbsp;|&nbsp; <a href="http://www.eetkorea.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/EETK.GIF" style="vertical-align: middle;" alt="EE Times - Korea" title="EE Times - Korea" border=0 width=69 height=15></a> &nbsp;|&nbsp; <a href="http://www.eettaiwan.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/EETT.GIF" style="vertical-align: middle;" alt="EE Times - Taiwan" title="EE Times - Taiwan" border=0 width=72 height=15></a> &nbsp;|&nbsp; <a href="http://www.ceconline.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/CEC.GIF" style="vertical-align: middle;" alt="Chief Executive China online" title="Chief Executive China online" border=0 width=60 height=15></a> &nbsp;|&nbsp; <a href="http://www.elegantlivingchi	na.com"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/ELOL.GIF" style="vertical-align: middle;" alt="EL Online" title="EL Online" border=0 height=15 width=48></a> &nbsp;|&nbsp; <a href="http://www.ed-china.com/"><img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/SITE/I/EDC.GIF" style="vertical-align: middle;" alt="Electronic Design-China online" title="Electronic Design-China online" border=0 width=72 height=15></a></div> ');
		document.write(' <div class=ht5></div><div align=center><b>Browse by:</b> <a href="http://www.globalsources.com/SITE/topmanufacturers.html" class=srch>Top Products</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/new-products/NL0/Listing.htm" class=srch>New Products</a> &nbsp;|&nbsp; <a href="http://www.chinasuppliers.globalsources.com/SITE/top-china-suppliers.html" class=srch>China Suppliers</a> &nbsp;|&nbsp; <a href="http://www.globalsources.com/gsol/I/all-manufacturers/r/2000000003844/3000000149681/-1/1/master_rss.htm?referrer=RSS_Hp" class=srch>RSS<img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/gsol/en/clean/images/RSSICON.GIF" style="vertical-align: bottom; margin-left:5px" alt="RSS" title="RSS" border=0 width=14 height=14></a></div> ');
	document.write(' </div> ');
	/* GLOBAL BOTTOM NAV */
	
	/* Copyright footer table */
	document.write(' <div style="width:100%; padding: 20px 0px; text-align: center;"><div style="border-top: 1px solid #999;"></div><div class="ht5"></div><div class="sm2"> ');
	
	copyright=new Date();
	update=copyright.getFullYear();
	document.write('Copyright &copy; '+ update + ' Trade Media Holdings Ltd. Copyright &copy; '+ update + ' Trade Media Ltd. <a href="javascript:newWinTrd(\'http://www.globalsources.com/CUSTOMER/ALLRIGHTS.HTM\',\'130\',\'640\');">All rights reserved</a>.');
	
	//document.write('<br><a href="http://www.globalsources.com/SITE/TERMSOFUSE.HTM"><font color=#000066>Terms of Use</font></a> &nbsp;&nbsp; <a href="http://www.globalsources.com/HELP/PRIVACY.HTM"><font color=#000066>Privacy Policy</font></a> &nbsp;&nbsp; <a href="http://www.globalsources.com/CUSTOMER/SECMEASURES.HTM"><font color=#000066>Security Measures</font></a>. &nbsp;&nbsp;');
	document.write('&nbsp;&nbsp;&nbsp;<a href="http://www.globalsources.com/SITE/TERMSOFUSE.HTM">Terms of Use</a> &nbsp;&nbsp; <a href="http://www.globalsources.com/HELP/PRIVACY.HTM">Privacy Policy</a> &nbsp;&nbsp; <a href="http://www.globalsources.com/CUSTOMER/SECMEASURES.HTM">Security Measures</a> &nbsp;&nbsp; <a href="http://www.globalsources.com/CUSTOMER/IPPOLICY.HTM">IP Policy</a> &nbsp;&nbsp;');

	if(navigator.appName == "Microsoft Internet Explorer" && bVer == 2 )  isMSIE3 = true;
	setUniqCookie();
	
	document.write(' </div></div> ');
	/* Copyright footer table */
	
}	


	