// This JavaScript code is from LCHE 
// Copyright 2007 by London College for Higher Education, London, UK
// Script Mouse Over/

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;

var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

if (nodyn) { event = "nope" }
var tipFollowMouse	= true;	
var tipWidth		= 330;
var offX		 	= 40;	// how far from mouse to show tip
var offY		 	= 15; 
var tipFontFamily 	= "Verdana, arial, helvetica, sans-serif";
var tipFontSize		= "8pt";
var tipFontColor	= "#000000";
var tipBgColor		= "#FEFBF3"; 
var origBgColor 	= tipBgColor; // in case no bgColor set in array
var tipBorderColor 	= "#000080";
var tipBorderWidth 	= 1;
var tipBorderStyle 	= "ridge";
var tipPadding	 	= 3;

var messages = new Array();
messages[0] = new Array('http://www.collegeoflondon.org/jpg/hkcerm08.jpg','<P ALIGN=justify><br><b>Hong Kong, 5th July 2008</b><br> The <i>London College for Higher Education</i>, Hong Kong Campus, International Graduation Ceremony was held on 5th July 2008, in Wan Chai (Hong Kong). Students from Hong Kong received diplomas in the fields of management and business economics.</p>',"#FEFBF3");
messages[1] = new Array('http://www.collegeoflondon.org/jpg/city4.jpg','<P ALIGN=justify><br>The <b><i>London College for Higher Education</i></b> is undergoing accreditation procedures by international state agencies. As an accredited transnational college for higher education, it will offer recognised qualification frameworks in the fields of economics and allied health sciences.</p>',"#FEFBF3");
messages[2] = new Array('http://www.collegeoflondon.org/jpg/hk_ferry.jpg','<P ALIGN=justify><br><b>Hong Kong, February 2008</b><br> In February 2008, <i>London College for Higher Education</i> was officially registered as an institution of higher education under the Chinese authority in Hong Kong for international distance learning. The new Hong Kong Campus of LCHE has all facilities for those study programs are offering at the campus. The new Faculty of Health Sciences of LCHE was established in co-operation with the Hong Kong Holistic Health Centre.</p>',"#FEFBF3");
messages[3] = new Array('http://www.collegeoflondon.org/jpg/Dubai5.jpg','<P ALIGN=justify><br><b>Dubai, March 2008</b><br> In March 2008, <i>London College for Higher Education</i> has opened its new Middle East Campus with registered branch of higher education in the United Arab Emirates. The new Dubai Campus of LCHE is offering all study programs with special focus on the new Faculty of Health Sciences for the Gulf Region and the Middle East. The new Faculty of Health Sciences at Dubai Campus is operating very close with our campus in Hong Kong, especially with focus on Holistic Health Treatments and Traditional Chinese Medicine (TCM).</p>',"#FEFBF3");
messages[4] = new Array('http://www.collegeoflondon.org/jpg/accreditation3.jpg','<P ALIGN=justify><br><b>U.S.A., May 2008</b><br> In May 2008, <i>London College for Higher Education</i> received the accreditation from the <i>Kentucky Board of Naturopathic</i> in Kentucky (U.S.A.) for professional studies in Naturopathy.<br><br>Further, LCHE received the educational accreditation from the <i>American Institute of Clinical Psychotherapists</i> in the U.S.A. as licensed institute for professional studies in Psychotherapy.</p>',"#FEFBF3");
messages[5] = new Array('http://www.collegeoflondon.org/jpg/accreditation2.jpg','<P ALIGN=justify><br><b>U.S.A., April 2008</b><br> In April 2008, <i>London College for Higher Education</i> received the accreditation from the <i>International Association of Psychologists</i> in the U.S.A. as licensed institute for certified studies in Psychology.  <br>Further, LCHE received the recognition and membership from the <i>International Institute of Parapsychology</i> in the U.S.A. as accredited institute for certified studies in Parapsychology.  <br>Further more, LCHE received the educational accreditation from the <i>International Association of Homeopathic Physicians and Surgeons Alliance</i> in the U.S.A. for professional studies in Homeopathy.</p>',"#FEFBF3");
messages[6] = new Array('http://www.collegeoflondon.org/jpg/accreditation.jpg','<P ALIGN=justify><br><b>U.S.A., March 2008</b><br> In March 2008, <i>London College for Higher Education</i> received the educational accreditation from the <i>American Holistic Medical Board</i> in the U.S.A. for professional studies in alternative and non-allopathic Holistic Medicine.   <br>Further, LCHE received the accreditation from the <i>American Board of Public Communication Counselors</i> in New York (U.S.A.) for professional studies and educational programs in Communications, Marketing, Public Relations, Media, Event Planning and Counseling. </p>',"#FEFBF3");
messages[7] = new Array('http://www.collegeoflondon.org/jpg/scut1.jpg','<P ALIGN=justify><b>China, July 2008</b><br> In July 2008, <i>London College for Higher Education</i> has signed a partnership agreement for joint degree programs with <i>South China University of Technology</i> in Guangzhou (China) for international studies. </p>',"#FEFBF3");
messages[8] = new Array('http://www.collegeoflondon.org/jpg/onstud.jpg','<P ALIGN=justify><b>New Generation of Online Study</b><br> In September 2008, <i>London College for Higher Education</i> has launched its new generation of Online Study for todays needs in the dynamic environment of business and management. Upon years of experiences in education we understand the importance of Online Study. </p>',"#FEFBF3");
messages[9] = new Array('http://www.collegeoflondon.org/jpg/accreditation2.jpg','<P ALIGN=justify><b>South America, January 2009</b><br> In January 2009, <i>London College for Higher Education</i> is undergoing state accreditation procedure by the Ministry of Education in South America (Merosur) as an accredited transnational university. LCHE is building a new campus in South America and will co-operate with a local university. The new campus will be funded by a governmental education program. As a full state accredited university and college, it will offer study programs in the fields of economics, education, social sciences and vocational school.</p>',"#FEFBF3");
messages[10] = new Array('http://www.collegeoflondon.org/jpg/gardner.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> MA in Education, Doctor of Education<br> <b>Professional Experience:</b><br>Professor of Education and Academic Dean, Professor Emeritus of University in England, Member of Academic Board and Trustee at several institutions <br> <b>LCHE Campus:</b> London, U.K.</p>',"#FEFBF3");
messages[11] = new Array('http://www.collegeoflondon.org/jpg/cammarano_c.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> Master of Arts, Doctor of Education<br> <b>Professional Experience:</b><br>Principal at College of Salerno, Professor of Education and Academic Dean<br> <b>LCHE Campus:</b> Salerno, Italy</p>',"#FEFBF3");
messages[12] = new Array('http://www.collegeoflondon.org/jpg/karczag_l.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> MSc in Engineering, MSc in Economics, Doctor of Science<br> <b>Professional Experience:</b><br>Managing Director of international asset trust company, Consultant and Advisor for international companies in finance and asset protection, Senior Professor, Academic Dean of Finance and Banking<br> <b>LCHE Campus:</b> London, U.K. and Budapest, Hungary</p>',"#FEFBF3");
messages[13] = new Array('http://www.collegeoflondon.org/jpg/gavalda_r.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> Master of Etiquette and Protocol, PhD in Social Sciences<br> <b>Professional Experience:</b><br>President of Academia Argentina de Etiqueta, Professor for Ceremonial and Protocol at Universidad Torcuato Di Tella in Buenos Aires, Profesor at Instituto Superior de Ceremonial y Relaciones Publicas de la Plata, Academic Director for Protocol of the Republic of Argentina, Associate Dean for Argentina<br> <b>LCHE Campus:</b> Buenos Aires, Argentina</p>',"#FEFBF3");
messages[14] = new Array('http://www.collegeoflondon.org/jpg/sahar_k.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> BA in Psychology, MA in Clinical Psychology, DSc in Health Sciences, PhD in Clinical Psychology<br> <b>Professional Experience:</b><br>Director of The Canadian Health Sciences Institute in Toronto (Canada), Director and Professor of Health Sciences in Dubai (UAE), Health Care, Clinical Hypnotherapy, Clinical Psychotherapy, Mental Health and Parapsychology, Academic Dean of Middle East Studies<br> <b>LCHE Campus:</b> Dubai, U.A.E.</p>',"#FEFBF3");
messages[15] = new Array('http://www.collegeoflondon.org/jpg/sahar_k.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> BA in Psychology, MA in Clinical Psychology, DSc in Health Sciences, PhD in Clinical Psychology<br> <b>Professional Experience:</b><br>Director of The Canadian Health Sciences Institute in Toronto (Canada), Director and Professor of Health Sciences in Dubai (UAE), Health Care, Clinical Hypnotherapy, Clinical Psychotherapy, Mental Health and Parapsychology, Academic Dean<br> <b>LCHE Campus:</b> Toronto, Canada</p>',"#FEFBF3");
messages[16] = new Array('http://www.collegeoflondon.org/jpg/chan_b.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> MD in Naturopathic, PhD in Health Sciences<br> <b>Professional Experience:</b><br>Professor at York University (Canada) and Xian Institute (China), Lecturer at Lingnan University (Hong Kong), Director of One Theory Holistic Health Centre in Hong Kong, Professor of Health Sciences in Hong Kong, Bio Cranial System Therapist, Craniosacral Therapist, Asian Cranial Practioner, Academic Dean<br> <b>LCHE Campus:</b> Hong Kong, S.A.R.</p>',"#FEFBF3");
messages[17] = new Array('http://www.collegeoflondon.org/jpg/ziegler_d.jpg','<P ALIGN=justify><b>Academic Experience:</b><br> BSc in Journalism and Music; MA in Radio and Television; PhD in Academic Administration<br> <b>Professional Experience:</b><br>Board of Trustees at Florida Virtual School; Professor of Journalism and Assistant Vice President for Instructional Technology and Academic Affairs; Acting Vice President for Research and Director of International Programs at Florida A&M University (Tallahassee). Professor of Broadcasting; Associate Director of Diversity Research and Educational Services, Office of the Chancellor;  President of the Faculty Senate at University of Tennessee (Knoxville)<br><b>LCHE Campus:</b> Florida, U.S.A.</p>',"#FEFBF3");
messages[18] = new Array('http://www.collegeoflondon.org/jpg/lche_ky2.jpg','<P ALIGN=justify>LCHE - Faculty of Health Sciences, Campus at Louisville Education Center, Kentucky (USA).</p>',"#FEFBF3");
messages[19] = new Array('http://planmagic.com/images/plmfinance.jpg','Financial calculations and projections made easy.',"#E9E9E9");

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];
  }
}

var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

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;

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);
}

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;
}
