var divYrPading1 = "<TABLE width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><TR><TD colspan=\"3\"><IMG src=\"images/global/spacer.gif\" width=\"1\" height=\"15\"></TD></TR><TR><TD><IMG src=\"images/global/spacer.gif\" width=\"12\" height=\"1\"></TD><TD class=\"divYrTxt\">"
var divYrPading2 = "</TD><TD><IMG src=\"images/global/spacer.gif\" width=\"12\" height=\"1\"></TD></TR><TR><TD colspan=\"3\"><IMG src=\"images/global/spacer.gif\" width=\"1\" height=\"15\"></TD></TR></TABLE>"

txtArr = new Array()
txtArr[0] = ""
txtArr[1] = "Li & Fung was founded in Guangzhou as a traditional trading company dealing in Chinese export products."
txtArr[2] = "Li & Fung (1937) Limited was established in Hong Kong by Mr. Fung Hon Chu."
txtArr[3] = "Li & Fung's headquarters moved to Hong Kong."
txtArr[4] = "Li & Fung went public in April and the issue was 113 times oversubscribed."
txtArr[5] = "The first Circle K Convenience Store was opened in Hong Kong by Li & Fung (Retailing) Limited."
txtArr[6] = "The first Toys\"R\"Us store, another member of the Li & Fung Retailing Group, was opened at the Ocean Terminal in Hong Kong."
txtArr[7] = "In order to re-organize the family's shareholding and to focus on the core business, Li & Fung Limited was privatised."
txtArr[8] = "The export trading business of Li & Fung was re-listed on The Stock Exchange of Hong Kong in its present form as Li & Fung Limited."
txtArr[9] = "Li & Fung Limited acquired its then largest Hong Kong-based competitor in the export trading business, Inchcape Buying Services (also known as Dodwell)."
txtArr[10] = "In celebration of the 90th Anniversary, Li & Fung sponsored the 1996 Chinese New Year Fireworks Display in Hong Kong."
txtArr[11] = "Li & Fung Distribution Group was established as a provider of supply chain services with a Pan-Asia focus."
txtArr[12] = "Li & Fung Distribution Group completed the acquisition of the marketing services and the related business of Inchcape in Asia.<BR><BR>Export trading firms Swire & Maclaine and Camberley were acquired by Li & Fung Limited."
txtArr[13] = "Li & Fung Limited was added to the Morgan Stanley Hong Kong Country Index (MSCI) and the Hang Seng Index.<BR><BR>Li & Fung Limited Hong Kong buying agent Colby."
txtArr[14] = "The Circle K Business was listed on the GEM Board of the Hong Kong Exchange as Convenience Retail Asia Limited."
txtArr[15] = "The formation of IDS Group under Li & Fung Distribution Group.<BR><BR>Circle K opened its first store in Guangzhou, China."
txtArr[16] = "IDS Group was listed on the Main Board of the Hong Kong Exchange."
txtArr[17] = "Li & Fung Licensing was established to bring fashion and lifestyle brands into Asia."
txtArr[18] = "Li & Fung Group celebrates its 100th anniversary."

yArr = new Array() // y postion
yArr[0] = 0
yArr[1] = 44
yArr[2] = 85
yArr[3] = 126
yArr[4] = 166
yArr[5] = 207
yArr[6] = 247
yArr[7] = 287
yArr[8] = 327
yArr[9] = 365
yArr[10] = 406
yArr[11] = 446
yArr[12] = 487
yArr[13] = 527
yArr[14] = 567
yArr[15] = 606
yArr[16] = 647
yArr[17] = 688
yArr[18] = 728
/* min_left = getBrowserWidth()/2-765/2 */

function hoverYr(strIn) {
	var yrID = parseInt(strIn.substring(2, strIn.length))
	var intMinLeft = parseInt(getBrowserWidth()/2-765/2)
	var intMaxLeft = parseInt(intMinLeft + 765 - 179)
	var barLeft = parseInt(intMinLeft + yArr[yrID])
	var yrLeft = parseInt(barLeft - 90)
	if (yrLeft < intMinLeft)
		yrLeft = intMinLeft
	if (yrLeft > intMaxLeft)
		yrLeft = intMaxLeft
	if (parseInt(yrID)%2==1)
		getElement("divBar").style.height = 19
	else
		getElement("divBar").style.height = 35
	// height exceptions
	if (yrID==9||yrID==10||yrID==15) {
		getElement("divYr").style.top = 319
		getElement("divYr").style.height = 115
	}
	else if (yrID==12) {
		getElement("divYr").style.top = 263
		getElement("divYr").style.height = 171
	}
	else if (yrID==13) {
		getElement("divYr").style.top = 291
		getElement("divYr").style.height = 143
	}
	else {
		getElement("divYr").style.top = 331
		getElement("divYr").style.height = 103
	}
	getElement("divBar").style.left = barLeft
	getElement("divYr").style.left = yrLeft
	writeIt(divYrPading1+txtArr[yrID]+divYrPading2, "divYr")
	getElement("divBar").style.visibility = "visible"
	getElement("divYr").style.visibility = "visible"
}

function outYr() {
	getElement("divBar").style.visibility = "hidden"
	getElement("divYr").style.visibility = "hidden"
}

function getElement(id){
 if(document.all) return document.all(id);
 if(document.getElementById) return document.getElementById(id);
}

function writeIt(text, target) {
	if (document.getElementById)
	{
		x = document.getElementById(target);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[target];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[target];
		text2 = '<P>' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}

function getBrowserWidth(){
	if (window.innerWidth) return window.innerWidth;
	else if (document.documentElement && document.documentElement.clientWidth!=0)
		return document.documentElement.clientWidth;
	else if (document.body) return document.body.clientWidth;
	return 0;
}
