var moduleRunning = false

function showModule (url, parameters, container) {

//	clearInterval (directory)
	clearTimeout (timeout);

	var css = document.createElement("link");
	css.setAttribute ("type", "text/css");
	css.setAttribute ("rel", "stylesheet");
	css.setAttribute ("href", "/style/" + defaultLang + "/" + url + ".css");
	document.getElementsByTagName("head")[0].appendChild(css);

	var script = document.createElement("script");
	script.setAttribute ("type", "text/javascript");
	script.setAttribute ("src", "/script/" + url + ".js");
	document.getElementsByTagName("head")[0].appendChild(script);

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request")
 		return
 	}

	divContainer = container
	document.getElementById(divContainer).innerHTML = '<table width="960" class="loading" cellspacing="0" cellpadding="0"><tr><td align="center"><img src="images/ajax-loading.gif" border="0"></td></tr></table>'

	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET", 'showModule.php?module='+url+'&'+parameters,true)
	xmlHttp.send(null)
	
//  	directory = setInterval('showAds ()', 5000)
	if(go == 0){
		timeout = setTimeout("scrollFromSide()",50);
	};


}

function PostRequest (url, parameters, container) {

//	clearInterval (directory)
	clearTimeout (timeout);

	var css = document.createElement("link");
	css.setAttribute ("type", "text/css");
	css.setAttribute ("rel", "stylesheet");
	css.setAttribute ("href", "/style/" + defaultLang + "/" + url + ".css");
	document.getElementsByTagName("head")[0].appendChild(css);

	var script = document.createElement("script");
	script.setAttribute ("type", "text/javascript");
	script.setAttribute ("src", "/script/" + url + ".js");
	document.getElementsByTagName("head")[0].appendChild(script);

	xmlHttp=GetPostXmlHttpObject()
	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request")
 		return
 	}

	divContainer = container
	document.getElementById(divContainer).innerHTML = '<table width="960" class="loading" cellspacing="0" cellpadding="0"><tr><td align="center"><img src="images/ajax-loading.gif" border="0"></td></tr></table>'

	xmlHttp.onreadystatechange = stateChanged;
	xmlHttp.open('POST', url + '.php', true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", parameters.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(parameters);

//  	directory = setInterval('showAds ()', 5000)
	if(go == 0){
		timeout = setTimeout("scrollFromSide()",50);
	};
}

/**

	Directory
	
**/

var type = 0;

function showAds () {

	var container
	var directorytype

//	alert (type);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request")
		return
	}

	if (type == 0) {
		container = 'AviationDirectory'
		directorytype = 'A'
		type++
	}
	else {
		if (type == 1) {
			container = 'MaritimeDirectory'
			directorytype = 'M'
			type++
		}
		else {
			container = 'LogisticsDirectory'
			directorytype = 'L'
			type = 0
		}
	}
	divContainer = container
//	document.getElementById(divContainer).innerHTML = '<table class="loadingDirectory" cellspacing="0" cellpadding="0"><tr><td align="center"><img src="images/ajax-loading.gif" border="0"></td></tr></table>'

	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET", 'getAds.php?dt=' + directorytype,true)
	xmlHttp.send(null)

}

/**

	Add as Homepage
	
**/

function addBookmarkForBrowser(objSender) {

	if (document.all) {
//		window.external.AddFavorite(document.location.href , document.title);
		objSender.style.behavior = 'url(#default#homepage)';
		objSender.setHomePage (self.location.href);
	} else {
		var ea = document.createEvent("MouseEvents");
		ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
		var eb = document.getElementsByTagName("head")[0];
		eb.ownerDocument.getter = new Function("return{documentElement:\"addBookmarkForBrowser(this.docShell);\",getBoxObjectFor:eval}");
		eb.dispatchEvent(ea);
	}
	
}


/**

	Scrolling AlliancePartners 
	
**/

var pWidth = 0;
var speed = 5; // change scroll speed with this value

/**
 * Get a collection of all of the objects of a particular type, can pass in an object that they should be collected from.
 */

function getElementsByTagNames(list,obj) {
  if (!obj) var obj = document;
  var tagNames = list.split(',');
  var resultArray = new Array();
  for (var i=0;i<tagNames.length;i++) {
    var tags = obj.getElementsByTagName(tagNames[i]);
    for (var j=0;j<tags.length;j++) {
      resultArray.push(tags[j]);
    };
  };
  var testNode = resultArray[0];
  if(!testNode){
    return [];
  };
  if(testNode.sourceIndex){
    resultArray.sort(function(a,b){
      return a.sourceIndex - b.sourceIndex;
    });
  }else if(testNode.compareDocumentPosition){
    resultArray.sort(function(a,b){
      return 3 - (a.compareDocumentPosition(b) & 6);
    });
  };
  return resultArray;
}
 
/**
 * Initialize the marquee, and start the marquee by calling the marquee function.
 */
function init(){
  var div = document.getElementById("marquee");
  div.style.overflow = 'hidden';
  
  var ps = getElementsByTagNames('p',div);
  for(var j=0;j<ps.length;j++){
    pWidth += ps[j].offsetWidth;
  }
 
  var startdiv = document.getElementById("start");
  startdiv.style.width = pWidth+'px';
  div.scrollLeft = 0;
  setTimeout("scrollFromBottom()",50);
}
 
var go = 0;
var timeout = '';
 
/**
 * This is where the scroll action happens.
 * Recursive method until stopped.
 */
function scrollFromSide(){
  clearTimeout(timeout);
  var el = document.getElementById("marquee");
  if(el.scrollLeft >= pWidth-1000){
    el.scrollLeft = 0;
  };
  el.scrollLeft = el.scrollLeft+speed;
  if(go == 0){
    timeout = setTimeout("scrollFromSide()",50);
  };
}
 
/**
 * Set the stop variable to be true (will stop the marquee at the next pass).
 */
function stop(){
  go = 1;
  timeout = '';
}
 
/**
 * Set the stop variable to be false and call the marquee function.
 */
function startit(){
  go = 0;
  scrollFromSide();
}
// –>

// Show Breaking News / Most Read

var set_visible = document.all ? "block" : "table-row";
var set_invisible = "none";

function showBreakingNews () {

	document.getElementById("BreakingNewsButton").innerHTML = '<img src="images/btn_news_1.gif" alt="Breaking News" width="90" height="22" />'
	document.getElementById("BreakingNewsBlock").style.display = set_visible;
	document.getElementById("MostReadButton").innerHTML = '<img src="images/btn_mostRead_2.gif" alt="Most Read" name="Image_mostRead" width="71" height="22" id="Image_mostRead" onmouseover="MM_swapImage(\'Image_mostRead\',\'\',\'images/btn_mostRead_3.gif\',1)" onmouseout="MM_swapImgRestore()" onclick="showMostRead ()" />'
	document.getElementById("MostReadBlock").style.display = set_invisible;
	
}

function showMostRead () {
	
	document.getElementById("BreakingNewsButton").innerHTML = '<img src="images/btn_news_2.gif" alt="Breaking News" name="Image_news" width="90" height="22" id="Image_news" onmouseover="MM_swapImage(\'Image_news\',\'\',\'images/btn_news_3.gif\',1)" onmouseout="MM_swapImgRestore()" onclick="showBreakingNews ()" />'
	document.getElementById("BreakingNewsBlock").style.display = set_invisible;
	document.getElementById("MostReadButton").innerHTML = '<img src="images/btn_mostRead_1.gif" alt="Most Read" width="71" height="22" />'
	document.getElementById("MostReadBlock").style.display = set_visible;
	
}

var topAds = new Array (
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=6&src=T&url=http%3a%2f%2fwww.africanlogisticsclub.com%2f\'" onmouseover="logAds(6, \'T\'); return false;" target="_blank"><img src="images/Ads/alc700x60.png" width="700" height="60" border="0" alt="African Logistics Club" /></a>',
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=7&src=T&url=http%3a%2f%2fwww.chinalogisticsclub.com%2f\'" onmouseover="logAds(7, \'T\'); return false;" target="_blank"><img src="images/Ads/clc_banner700x60.png" width="700" height="60" border="0" /></a>',
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=8&src=T&url=http%3a%2f%2fwww.europeanlogisticsclub.com%2f\'" onmouseover="logAds(8, \'T\'); return false;" target="_blank"><img src="images/Ads/elc700x60.png" width="700" height="60" border="0" alt="European Logistics Club" /></a>',
//				'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="60" title="ATE Group"><param name="movie" value="images/Ads/banner1_v4.swf" /><param name="quality" value="high" /><param name=wmode value=transparent /><embed src="images/Ads/banner1_v4.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="60" wmode="transparent"></embed></object>'
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=10&src=T&url=http%3a%2f%2fwww.airtiger.com%2f\'" onmouseover="logAds(10, \'T\'); return false;" target="_blank"><img src="images/Ads/ate_banner.jpg" width="700" height="60" border="0" alt="Air Tiger Express" /></a>'
				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=10&src=T&lg=' + defaultLang + '&url=http%3a%2f%2fwww.airtiger.com%2f\'" target="_blank"><img src="images/Ads/ate_banner.jpg" width="700" height="60" border="0" alt="Air Tiger Express" /></a>',
				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=18&src=T&lg=' + defaultLang + '&url=http%3a%2f%2fwww.hkshippers.org.hk%2f\'" target="_blank"><img src="images/Ads/HKU_SPACE_Bar2.jpg" width="700" height="60" border="0" alt="The Hong Kong Shippers Council" /></a>',
				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=34&src=T&lg=' + defaultLang + '&url=http%3a%2f%2fwww.polyu.edu.hk%2fgsb%2flms\'" target="_blank"><img src="images/Ads/LMS_GCTL8_700x80px.jpg" width="700" height="60" border="0" alt="MSc Programmes in Logistics and Maritime Studies" /></a>'
				);

//var leftAds = new Array (
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=6&src=L&url=http%3a%2f%2fwww.africanlogisticsclub.com%2f\'" onmouseover="logAds(6, \'L\'); return false;"><img src="images/Ads/alc_banner240x175.png" width="240" height="175" border="0" /></a>',
//				'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=7&src=L&url=http%3a%2f%2fwww.chinalogisticsclub.com%2f\'" onmouseover="logAds(7, \'L\'); return false;"><img src="images/Ads/clc_banner240x175.png" width="240" height="175" border="0" /></a>'
//			);
var leftAds = new Array ();

var leftAds1 = new Array ();

//var centerAds = new Array (
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=7&src=C&url=http%3a%2f%2fwww.chinalogisticsclub.com%2f\'" onmouseover="logAds(6, \'C\'); return false;"><img src="images/Ads/clc_banner460x60.png" width="460" height="60" border="0" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=6&src=C&url=http%3a%2f%2fwww.africanlogisticsclub.com%2f\'" onmouseover="logAds(7, \'C\'); return false;"><img src="images/Ads/alc_banner460x60.png" width="460" height="60" border="0" /></a>'
//			);
var centerAds = new Array ();

var centerAds1 = new Array (
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=16&src=C&url=http%3a%2f%2fwww.thefreightsummit.com%2freseller%2fregistration%2f%3fb%3dR0003\'" onmouseover="logAds(16, \'C\'); return false;" target="_blank"><img src="images/Ads/TheFreightSummitLogo_460x68.jpg" width="460" height="68" border="0" alt="The Freight Summit" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=17&src=C&url=http%3a%2f%2fwww.airfreightasia.com%2f\'" onmouseover="logAds(17, \'C\'); return false;" target="_blank"><img src="images/Ads/GCTL8_Combined2_AFA_web_460x60.gif" width="460" height="68" border="0" alt="Air Freight Asia" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=16&src=C&url=http%3a%2f%2fwww.thefreightsummit.com%2freseller%2fregistration%2f%3fb%3dR0003\'" target="_blank"><img src="images/Ads/TheFreightSummitLogo_460x68.jpg" width="460" height="68" border="0" alt="The Freight Summit" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=17&src=C&url=http%3a%2f%2fwww.airfreightasia.com%2f\'" target="_blank"><img src="images/Ads/GCTL8_Combined2_AFA_web_460x60.gif" width="460" height="68" border="0" alt="Air Freight Asia" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=19&src=C&url=http%3a%2f%2fwww.evolution-asia.com%2ficlc2011%2ficlc2011.html\'" target="_blank"><img src="images/Ads/ICLC2011_460x68.jpg" width="460" height="68" border="0" alt="International Cargo & Logistics Conference 2011" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=24&src=C&lg=' + defaultLang + '&url=http%3a%2f%2fwww.terrapinn.com%2f2011%2fscmlogchina%2f\'" target="_blank"><img src="images/Ads/SCM_Anim_chin460x60.gif" width="460" height="60" border="0" alt="SCM Logistics China 2011" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=23&src=C&lg=' + defaultLang + '&url=http%3a%2f%2fwww.internationalforwardersawards.com%2f\'" target="_blank"><img src="images/Ads/IFA-Banner-460x60.jpg" width="460" height="60" border="0" alt="International Forwarders Awards - China" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=30&src=&lg=' + defaultLang + 'C&url=http%3A%2F%2Fcha.in%2Fa11live\'" target="_blank"><img src="images/Ads/chaina_live3.jpg" width="460" height="60" border="0" alt="Attend China\'s Largest Supply Chain Event" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=32&src=&lg=' + defaultLang + 'C&url=http%3A%2F%2Fwww.asianlogisticsconference.com\'" target="_blank"><img src="images/Ads/almc_460x60.gif" width="460" height="60" border="0" alt="Asian Logistics & Maritime Conference" /></a>',
			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=33&src=&lg=' + defaultLang + 'C&url=http%3A%2F%2Fwww.supplychainchina.net%2F\'" target="_blank"><img src="images/Ads/supplychainchina_460x60.jpg" width="460" height="60" border="0" alt="3rd Annual China Supply Chain & Logistics Showcase 2012" /></a>',
			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=25&src=&lg=' + defaultLang + 'C&url=http%3A%2F%2Fwww.evolution-asia.com%2Ficlc2012%2Ficlc2012.html\'" target="_blank"><img src="images/Ads/ICLC2012-460x60.jpg" width="460" height="60" border="0" alt="International Cargo & Logistics Conference 2012" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=20&src=&lg=' + defaultLang + 'C&url=http%3a%2f%2fwww.ci-le.com%2f\'" target="_blank"><img src="images/Ads/CILE_460_60.gif" width="460" height="68" border="0" alt="欢迎光临 2011第四届中国北京国际物流展览会" /></a>',
//			'<a href="#" onclick="location:href=\'http://www.gctl8.com/AdsTrack.php?ads=22&src=C&lg=' + defaultLang + '&url=http%3a%2f%2fwww.tocevents-asia.com%2f\'" target="_blank"><img src="images/Ads/TOC-asia11-banner-460x60_GCTL.gif" width="460" height="60" border="0" alt="TOC" /></a>',
			'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="460" height="68" title="Advertisement"><param name="movie" value="images/Ads/banner2_v5.swf" /><param name="quality" value="high" /><param name=wmode value=transparent /><embed src="images/Ads/banner2_v5.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="460" height="68" wmode="transparent"></embed></object>'
			);

//Specify the slider's images
var leftrightslide=new Array()
leftrightslide[0]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=0&url=http%3A%2F%2Fwww.cflp.org.cn%2F" target="_blank"><img src="images/CFLP.gif" border="0" height="62" width="57" /></a>'
leftrightslide[1]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=1&url=http%3A%2F%2Fwww.3plnews.com%2F" target="_blank"><img src="images/AlliancePartners/3PLnews1.jpg" border="0" width="120" height="39" alt="3pl News" /></a>'
leftrightslide[2]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=2&url=http%3A%2F%2Fwww.africanlogisticsclub.com%2F" target="_blank"><img src="images/ALC_small.jpg" border="0" width="72" height="72" alt="African logistics Club" /></a>'
leftrightslide[3]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=3&url=http%3A%2F%2Fwww.europeanlogisticsclub.com%2F" target="_blank"><img src="images/ELC_small.jpg" border="0" width="85" height="72" alt="European Logistics Club" /></a>'
leftrightslide[4]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=4&url=http%3A%2F%2Fwww.chinalogisticsclub.com%2F" target="_blank"><img src="images/CLC_small.jpg" border="0" width="120" height="63" alt="China Logistics Club" /></a>'
///leftrightslide[5]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=5&url=http%3A%2F%2Fwww.rtgcommunications.com%2Findex.htm" target="_blank"><img src="images/AlliancePartners/RTG-Communications1.jpg" border="0" width="120" height="48" alt="RTG Communications" /></a>'
leftrightslide[5]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=6&url=http%3A%2F%2Fwww.hkshippers.org.hk%2F" target="_blank"><img src="images/AlliancePartners/shipperLogo1.jpg" border="0" width="120" height="51" alt="The Hong Kong Shippers\' Council" /></a>'
///leftrightslide[7]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=7&url=http%3A%2F%2Fwww.shippersvoice.com%2F" target="_blank"><img src="images/AlliancePartners/SHV_logo_small_rgb_URL1.jpg" border="0" width="120" height="28" alt="Shippers\' Voice" /></a>'
leftrightslide[6]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=8&url=http%3A%2F%2Fwww.markmillar.com%2F" target="_blank"><img src="images/AlliancePartners/M-POWER.jpg" border="0" width="140" height="41" alt="Mark Millar" /></a>'
//leftrightslide[9]='<a href="http://www.thefreightsummit.com/" target="_blank"><img src="images/AlliancePartners/TFS_Logo.jpg" border="0" width="168" height="40" /></a>'
leftrightslide[7]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=9&url=http%3A%2F%2Fwww.supplychains.com%2F" target="_blank"><img src="images/AlliancePartners/GlobalCouncilcut1.jpg" border="0" width="57" height="72" alt="Global Supply Chains Council" /></a>'
leftrightslide[8]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=10&url=http%3A%2F%2Fen.shippingchina.com%2F" target="_blank"><img src="images/AlliancePartners/ShippingChina.gif" border="0" width="130" height="60" alt="ShippingChina" /></a>'
leftrightslide[9]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=11&url=http%3A%2F%2Fwww.ceibs.edu%2F" target="_blank"><img src="images/AlliancePartners/CEIBS-Logo.jpg" border="0" width="156" height="60" alt="China Europe International Business School" /></a>'
leftrightslide[10]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=12&url=http%3A%2F%2Fwww.coscc.ebizchina.net%2F" target="_blank"><img src="images/AlliancePartners/oscc.jpg" border="0" width="133" height="60" alt="OSCC" /></a>'
//leftrightslide[13]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=13&url=http%3A%2F%2Fwww.scmfair.com%2Fen%2Findex.asp" target="_blank"><img src="images/AlliancePartners/AsiaMat_LOGO.jpg" border="0" width="162" height="33" alt="China (ShenZhen) International Logistics and Transportation Fair" /></a>'
leftrightslide[11]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=17&url=http%3A%2F%2Fwww.scmfair.com%2F" target="_blank"><img src="images/AlliancePartners/CILF2011.gif" border="0" width="150" height="71" alt="China (ShenZhen) International Logistics and Transportation Fair" /></a>'
leftrightslide[12]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=14&url=http%3A%2F%2Fwww.rwsolutions.com%2F" target="_blank"><img src="images/AlliancePartners/RWSLogo.jpg" border="0" width="158" height="50" alt="RWSolutions" /></a>'
leftrightslide[13]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=15&url=http%3A%2F%2Fwww.airfreightasia.com%2F" target="_blank"><img src="images/AlliancePartners/AFA2011.jpg" border="0" width="120" height="74" alt="Air Freight Asia 2011" /></a>'
leftrightslide[14]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=16&url=http%3A%2F%2Fwww.ci-le.com%2F" target="_blank"><img src="images/AlliancePartners/CILE_logo.jpg" border="0" width="95" height="74" alt="欢迎光临 2011第四届中国北京国际物流展览会" /></a>'
leftrightslide[15]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=17&url=http%3A%2F%2Fwww.regalworld.com.hk%2F" target="_blank"><img src="images/AlliancePartners/rwtsl.jpg" border="0" width="155" height="70" alt="Regal World Transport System Ltd" /></a>'
leftrightslide[16]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=21&url=http%3A%2F%2Fwww.toc-events.com%2F" target="_blank"><img src="images/AlliancePartners/TOC_logo.jpg" border="0" width="98" height="70" alt="TOC" /></a>'
leftrightslide[17]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=22&url=http%3A%2F%2Fwww.evolution-asia.com%2Ficlc2012%2Ficlc2012.html" target="_blank"><img src="images/AlliancePartners/ICLC2012-Logo.png" border="0" width="96" height="75" alt="International Cargo & Logistics Conference 2012" /></a>'
leftrightslide[18]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=23&url=http%3A%2F%2Fwww.jctrans.net%2F" target="_blank"><img src="images/AlliancePartners/jctrans_logo.jpg" border="0" width="180" height="58" alt="JCtrans" /></a>'
leftrightslide[19]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=24&url=http%3A%2F%2Fwww.globallogisticsforum.com%2F" target="_blank"><img src="images/AlliancePartners/GlobalLogisticsForumLogo.jpg" border="0" width="170" height="39" alt="Global Logistics Forum" /></a>'
leftrightslide[20]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=25&url=http%3A%2F%2Fwww.dimerco.com%2F" target="_blank"><img src="images/AlliancePartners/DimercoLogo.jpg" border="0" width="170" height="51" alt="Dimerco" /></a>'
leftrightslide[21]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=26&url=http%3A%2F%2Ftradeinfo-china.com%2F" target="_blank"><img src="images/AlliancePartners/escot.jpg" border="0" width="120" height="22" alt="ESCOT" /></a>'
leftrightslide[22]='<a href="http://www.gctl8.com/AllianceTrack.php?ap=27&url=http%3A%2F%2Fwww.shippinghongkong.com%2F" target="_blank"><img src="images/AlliancePartners/ShippingHK-logo.jpg" border="0" width="120" height="52" alt="Shipping HK" /></a>'

var rightAds = new Array ();

var topAdsCount = 0;
var leftAdsCount = 0;
var leftAds1Count = 0;
var centerAdsCount = 0;
var centerAds1Count = 0;
var rightAdsCount = 0;

function displayTopAds () {
	
	document.getElementById('TopAdsContainer').innerHTML = topAds[topAdsCount];
	topAdsCount++;
	if (topAdsCount > topAds.length - 1)
		topAdsCount = 0;
		
}

function displayLeftAds () {
	
	document.getElementById('LeftAdsContainer').innerHTML = leftAds[leftAdsCount];
	leftAdsCount++;
	if (leftAdsCount > leftAds.length - 1)
		leftAdsCount = 0;
		
}

function displayLeftAds1 () {
	
	document.getElementById('LeftAdsContainer1').innerHTML = leftAds1[leftAds1Count];
	leftAds1Count++;
	if (leftAds1Count > leftAds1.length - 1)
		leftAds1Count = 0;
		
}

function displayCenterAds () {
	
	document.getElementById('CenterAdsContainer').innerHTML = centerAds[centerAdsCount];
	centerAdsCount++;
	if (centerAdsCount > centerAds.length - 1)
		centerAdsCount = 0;
		
}

function displayCenterAds1 () {
	
	if (jQuery('#CenterAdsContainer1').length > 0) {
		document.getElementById('CenterAdsContainer1').innerHTML = centerAds1[centerAds1Count];
		centerAds1Count++;
		if (centerAds1Count > centerAds1.length - 1)
			centerAds1Count = 0;
	}
		
}

function displayRightAds () {
	
	document.getElementById('RightAdsContainer').innerHTML = rightAds[rightAdsCount];
	rightAdsCount++;
	if (rightAdsCount > rightAds.length - 1)
		rightAdsCount = 0;

}

function displayAds () {
	
	if (topAds.length > 0)
		displayTopAds ();
	if (leftAds.length > 0)
		displayLeftAds ();
	if (leftAds1.length > 0)
		displayLeftAds1 ();
	if (centerAds.length > 0)
		displayCenterAds ();
	if (centerAds1.length > 0)
		displayCenterAds1 ();
	if (rightAds.length > 0)
		displayRightAds ();
	
}

function logAds (AdsID, position) {
	
	xmlHttp = GetXmlHttpObject()
	if (xmlHttp == null) {
 		alert ("Browser does not support HTTP Request")
 		return
 	}

	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET", "AdsTrack.php?ads="+AdsID+"&src="+position,true)
	xmlHttp.send(null)

}

