var objHelpTip = null;
var t= null; //timeout
function hide(){
	objHelpTip.style.display='none';

}

function showHelp(objAnchor, theEvent, strText) {
	try{
		window.clearTimeout(t);
	}
	catch(e){
	}

	if (objAnchor.helpTip) {
		objAnchor.helpTip.style.visibility = "hidden";
		objAnchor.onblur = null;
		objAnchor.helpTip = null;
		return;
	}
	if (objHelpTip!=null)  objHelpTip.style.display='none';

	objHelpTip = document.createElement("div");
	objHelpTip.className = "help-tooltip";
	document.body.appendChild(objHelpTip);
	objHelpTip.innerHTML = strText;

	objHelpTip.style.top = (theEvent.clientY + 10) + (document.body.scrollTop) + "px";
	
	
	if ((theEvent.clientX + 275) > document.body.clientWidth) {
		objHelpTip.style.left = (document.body.clientWidth - 275) + "px";
	} else {
		objHelpTip.style.left = (theEvent.clientX - 8) + "px";	
	}
	
	objAnchor.helpTip = objHelpTip;
	
	objAnchor.onblur = function () {
		//document.body.removeChild(objHelpTip);
		var obj = objHelpTip;
		t = window.setTimeout('hide()',1000);
		objAnchor.onblur = null;
		objAnchor.helpTip = null;
	};	
	
}



function showHelpPreset(objAnchor, theEvent, message_name) {
	
var AMT_MES 	="Covers any number of trips up to 183 days abroad per annum. Maximum 50 days per trip up to age 65 (extendable to 100 days) or 35 days per trip up to age 80. <a href=javascript:void(window.open(\'amt.html\',\'\',\'toolbar=no,width=660,height=700\'))>See Other AMT Benefits<\/a>"; //index,instantquote,long,longqote
var GOLF_MES 	="Cover includes: Golf Equipment £1,000, Course Closure £150, Hole-in-One £150, Equipment Hire £100, plus trace & delivery assistance for lost sets of clubs. Excludes hired or loaned equipment and items over 3 years old, <a href=javascript:void(window.open(\'Staysure_Policy_Wording.pdf\',\'\',\'\'))>click here for more information<\/a>";//instant qouete,long qote
var WEDING_MES	="NOTE: Requires Personal Baggage upgrade also. Cover includes: Wedding Attire £1,500, Wedding Gifts £1,000, Wedding Photographs & Videos £750, Wedding Rings £250 (per ring). <a href=javascript:void(window.open(\'Staysure_Policy_Wording.pdf\',\'\',\'\'))>Click here for more information<\/a> and exclusions that apply.')";//instantqoote,long qoute
var SING_MES	="NOTE: Requires Personal Baggage upgrade also. This option provides cover beyond the maximum £300 ceiling allowed in the Personal Baggage section for one item of personal belongings. <a href=javascript:void(window.open(\'singleItem.html\',\'\',\'\'))>Click here for more information<\/a> and exclusions that apply.";//instantquote,long quote
var SING_MES2	="You have requested to insure an item (or set) valued above £300. If you have not already done so we suggest you read the  <a href=javascript:void(window.open(\'singleItem.html\',\'\',\'\'))>Increased Single Item Limit summary<\/a> before proceeding, then enter a description here that accurately identifies your item or set";//instquote,longqoute
var FREESPIRIT	="Please select the relevant condition you need to declare from the drop-down list below. There is no additional premium payable for conditions accepted by us and the latter shall be noted on your validation certificate under <b>Medical Reference</b>.<br>If your condition is not listed or if any person travelling has more than one condition to declare please <a href=javascript:void(window.open(\'freespirit.html\',\'\',\',,\'))>CLICK HERE<\/a>";//pd
var PREPOL		="If you do not have your current policy number to hand please enter 1234567 to continue. We will still honour the loyalty discount. Just contact us once within 7 days quoting both your new policy number and the previous one.";//
var MEDICAL		="Please select the relevant condition you need to declare from the drop-down list below. There is no additional premium payable for conditions accepted by us and the latter shall be noted on your validation certificate under <b>Medical Reference</b>.<br>If your condition is not listed or if any person travelling has more than one condition to declare please <a href=javascript:void(window.open(\'freespirit.html\',\'\',\',,\'))>CLICK HERE<\/a>"
var VERIF       ="The verification number is located on the signature strip on the back of your card. It is the last three digits.";
var BK          ="In recognition of increased safety we offer a reduction for joint travel.";
var BKGOLF_MES 	="Cover includes: Golf Equipment £1,000, Course Closure £150, Hole-in-One £150, Equipment Hire £100, plus trace & delivery assistance for lost sets of clubs. Excludes hired or loaned equipment and items over 3 years old, <a href=javascript:void(window.open(\'Backpacker_Policy_Wording.pdf\',\'\',\'\'))>click here for more information<\/a>";//instant qouete,long qote
var BKWEDING_MES="NOTE: Requires Personal Baggage upgrade also. Cover includes: Wedding Attire £1,500, Wedding Gifts £1,000, Wedding Photographs & Videos £750, Wedding Rings £250 (per ring). <a href=javascript:void(window.open(\'Backpacker_Policy_Wording.pdf\',\'\',\'\'))>Click here for more information<\/a> and exclusions that apply.')";//instantqoote,long qoute


	var text= "&nbsp;";
	
	if (message_name == 'wedding') 			text = WEDING_MES;
	else if (message_name == 'amt') 		text = AMT_MES;
	else if (message_name == 'golf') 		text = GOLF_MES;  
	else if (message_name == 'sin1') 		text = SING_MES;
	else if (message_name == 'sin2') 		text = SING_MES2;
	else if (message_name == 'freespirit') 	text = FREESPIRIT;
	else if (message_name == 'prePol') 		text = PREPOL;
	else if (message_name == 'medi') 		text = MEDICAL;
	else if (message_name == 'veri') 		text = VERIF;
	else if (message_name == 'bk') 			text = BK;
	else if (message_name == 'bkgolf')		text = BKGOLF_MES;
	else if (message_name == 'bkwed') 		text = BKWEDING_MES;
	
	showHelp(objAnchor, theEvent, text) ;

}

