
/*
Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
Copyright 2002 by Sharon Paine
Visit http://www.dynamicdrive.com for this script
*/

/* IMPORTANT: Put script after tooltip div or 
	 put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= true;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 350;
var offX= 15;	// how far from mouse to show tip
var offY= 15; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "7pt";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays)
// but don't have to
var tipFontColor= "#333333";
var tipBgColor= "#FFFFFF"; 
var tipBorderColor= "#FF9900";
var tipBorderWidth= 1;
var tipBorderStyle= "ridge";
var tipPadding= 3;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('../media/px_WongchinTong.jpg','<font color="#CC3300"><b>Wong Chin Tong | Vice President, Sales & Marketing</b></font><ul><li>Joined the Group in January 1990</li><li>Held management positions in Hewlett-Packard Company, Essex Circuits and AT&T Corporation prior to joining Venture</li><li>Holds a Bachelor&rsquo;s degree in Industrial Engineering from Louisiana State University, USA</li></ul>','#FFFFFF');
messages[1] = new Array('../media/px_PayCherWee.jpg','<font color="#CC3300"><b>Pay Cher Wee | Chief Financial Officer</b></font><ul><li>Joined the Group in June 1997</li><li>Previously worked in Deloitte & Touche Certified Public Accountants</li><li>Holds a Bachelor of Accountancy (Honours) degree from the Nanyang Technological University, Singapore</li><li>Member of the Institute of Certified Public Accountants of Singapore</li></ul>','#FFFFFF');
messages[2] = new Array('../media/px_BenardTsai.jpg','<font color="#CC3300"><b>Bernard Tsai | Senior Vice President, EMS</b></font><ul><li>Joined the Group in June 1996</li><li>Previously worked in Hewlett-Packard Company as Engineering Manager in the USA and Singapore</li><li>Holds a Bachelor of Science in Electrical Engineering from the Massachusetts Institute of Technology, USA</li></ul>','#FFFFFF');
messages[3] = new Array('../media/px_Thian.jpg','<font color="#CC3300"><b>Thian Nie Khian | Chief Technology Officer</b></font><ul><li>Joined the Group in November 1994</li><li>Previously worked in Plessey Corporation Limited, and subsequently in Hewlett-Packard Company as R&D Manager, Semiconductor Components</li><li>Holds a Bachelor of Engineering (Honours) in Electrical Engineering from the University of Liverpool, UK</li></ul>','#FFFFFF');
messages[4] = new Array('../media/px_TanKianSeng.jpg','<font color="#CC3300"><b>Tan Kian Seng | Chief Financial Officer</b></font><ul><li>Joined the Group in April 2001</li><li>Held senior management positions in Iomega Asia Manufacturing Operations, and Quantum Storage (M) Sdn Bhd prior to joining Venture</li><li>Holds a Diploma in Accounting from Leeds Polytechnic, UK</li><li>Associate member of the Institute of Chartered Accountants in England and Wales</li></ul>','#FFFFFF');
messages[5] = new Array('../media/px_Tanchinsien.jpg','<font color="#CC3300"><b>Tan Chin Sien | Group HR Director</b></font><ul><li>Joined the Group in January 2003</li><li>Previously worked in Hewlett-Packard Company, and subsequently held management positions in public listed companies such as Wing Tai Holdings Ltd, Asia Food & Properties Ltd and Viz Branz Ltd</li><li>Holds a Bachelor of Arts and and Social Science degree from the Singapore University</li></ul>','#FFFFFF');
messages[6] = new Array('../media/px_Adams.jpg','<font color="#CC3300"><b>Joseph J. Adams | Vice President, Marketing - Design Services</b></font><ul><li>Joined the Group in November 2002</li><li>Previously held senior management positions in Seagate Technology, SyQuest Technology Inc., Tandon Associates Lanka Pvt Ltd, and Iomega Corporation in Malaysia</li><li>Holds a Bachelor of Arts in Philosophy from St. Albert&rsquo;s College, Graduate Theological Union, Berkeley, California, USA</li></ul>','#FFFFFF');
messages[7] = new Array('../media/px_AmosLeong.jpg','<font color="#CC3300"><b>Amos Leong | President, Component Technology Business</b></font><ul><li>Joined the Group in November 2004</li> <li>Held various management positions in Hewlett-Packard Company and Agilent Technologies prior to joining Venture</li> <li>Holds a Bachelor of Engineering (Honours) in Electrical Engineering from the National University of Singapore</li></ul>','#FFFFFF');
messages[8] = new Array('../media/px_LeesweeKang.jpg','<font color="#CC3300"><b>Lim Swee Kwang | Vice President, Product Technology Business</b></font><ul><li>Joined the Group in February 2002</li><li>Prior to joining Venture, was an R&D Director in Hewlett-Packard Company</li><li>Holds a Bachelor of Science in Mechanical Engineering from the University of Michigan, and a Master of Science degree in Industrial and Systems Engineering from the National University of Singapore</li></ul>','#FFFFFF');
messages[9] = new Array('../media/px_Leeghaikeen.jpg','<font color="#CC3300"><b>Lee Ghai Keen | Vice President, ESP Business, Design Services</b></font><ul><li>Joined the Group in March 1998</li><li>Previously worked in Hewlett-Packard Company in various R&D positions</li><li>Holds a Bachelor of Science in Mechanical Engineering from the University of Glasgow, UK, and a Masters of Business in IT from the Royal Melbourne Institute of Technology, Australia</li><li>Holds seven US design patents</li></ul>','#FFFFFF');
messages[10] = new Array('../media/px_WongNgitLiong.jpg','<font color="#CC3300"><b>Wong Ngit Liong | Chairman & CEO</b></font><ul><li>Started his career with Hewlett-Packard Company and held various management positions in its offices in the USA, Singapore and Malaysia prior to Venture</li><li>Holds a 1st Class (Honours) degree in Electrical Engineering from the University of Malaya, and a Masters degree in Electronics Engineering from the University of California, Berkeley where he was a Fulbright Scholar</li><li>Also holds an MBA degree with distinction from McGill University, under the Canadian Commonwealth Fellowship</li></ul>','#FFFFFF');
messages[11] = new Array('../media/px_Tanchoonhuat.jpg','<font color="#CC3300"><b>Tan Choon Huat | Executive Director</b></font><ul><li>Joined the Group in November 1989</li><li>Previously worked with Hewlett-Packard Company and assumed management positions in its offices in the USA, Singapore and Malaysia</li><li>Holds a degree in Electrical Engineering from the University of Liverpool, UK and an MBA from the University of Santa Clara in California, USA</li></ul>','#FFFFFF');
messages[12] = new Array('../media/px_SooEnghiong.jpg','<font color="#CC3300"><b>Soo Eng Hiong | Executive Director</b></font><ul><li>Joined the Group in October 1988</li><li>Prior to joining Venture, was an Engineer with Hewlett-Packard Company and was also in a sales/marketing management and technical support position in the field of data communication</li><li>Holds a degree in Electronics from the University of Southampton, UK</li></ul>','#FFFFFF');
messages[13] = new Array('../media/px_hanjokkwang.jpg','<font color="#CC3300"><b>Han Jok Kwang | Chief Information Officer</b></font><ul><li>Joined the Group in January 2006</li><li>Held management positions in several companies including Hewlett-Packard and Raffles Medical Group, prior to joining Venture</li><li>Holds a Bachelor of Science (Combined Honours) in Control Engineering and Computer Science from the University of Aston, Birmingham, UK</li></ul>','#FFFFFF');


////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '"><tr><td align="LEFT" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles for all but ns4. 
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

