//History			:
//
//Name:					Date:		    Description:
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//Masoud Key            Mar 05 2009     Wordign fixed for Tooltip as DRE-44
//******************************************************************************************************************************************************************************
//required reference to tooltip.js file
var rolling_counter = 0
var rolling_text_0 = '<strong>Hun</strong> to select <strong>Hunter Valley</strong>'
var rolling_text_1 = '<strong>Kow</strong> to select <strong>Kowloon Hong Kong</strong>'
var rolling_text_2 = '<strong>Lou</strong> to select <strong>Louvre Paris</strong>'
var sArr = new Array(rolling_text_0,rolling_text_1,rolling_text_2)
var rolling_timer
function DREshowTT(evt, browserType) {

	if (typeof(tooltip) == "undefined") return
	var x = evt.x ? evt.x : evt.pageX
	var y = evt.y ? evt.y : evt.pageY
	
	var ttl1 = '<div class=\'mrgALT\' style="padding:1px 1px 0px 1px;">Enter the first few letters of your destination and select from the recommended list. </div>'
	var ttl2 = '<div class=\'mrgALT\' style="padding:0px 1px 0px 1px;">Example :</div>'
	var ttl3 = '<div class=\'mrgALT\' style="padding:0px 1px 1px 1px;">Enter <span id="dynamicText"></span></div>'
	var ttl1_IE = '<div class=\'mrgALT\' style="float:left;width:216px;margin-left:2px;margin-top:2px;">Enter the first few letters of your destination and select from the recommended list. </div>'
	var ttl2_IE = '<div class=\'mrgALT\' style="float:left;width:216px;margin-left:2px;margin-top:0px;">Example :</div>'
	var ttl3_IE = '<div class=\'mrgALT\' style="float:left;width:216px;padding-bottom:4px;margin-left:2px;margin-top:0px;">Enter <span id="dynamicText"></span></div>'
	if (browserType=='IE'){	
		//var ttText = ttl1_IE + '\r' + ttl2_IE + '\r' + ttl3_IE
		var ttText = ttl1_IE + ttl2_IE + ttl3_IE
	}else{
		//var ttText = ttl1 + '\r' + ttl2 + '\r' + ttl3
		var ttText = ttl1 + ttl2 + ttl3
	}
	
	var tt_MaxWidth = 240	
	var tt_Font = "Arial"	//font 
	var tt_FontSize = 10		//font size
	
	if (document.layers) {
		tooltip.document.write('<span style="border:1px solid; font-size:' + tt_FontSize + 'pt; font-family:' + tt_Font + '>' + ttText + '</span>')
		tooltip.document.close()
		positionTT(tooltip, x, y, tooltip.clip.width, tooltip.clip.height)
		tooltip.visibility = "show"
	} else if (document.all || document.getElementById) {
		tooltip.style.left = ""
		tooltip.style.top = ""
		tooltip.style.noWrap = true
		tooltip.innerHTML = ttText
		if (tooltip.offsetWidth > tt_MaxWidth) {
			tooltip.style.noWrap = false
			tooltip.style.width = tt_MaxWidth + "px"
		} else {
			tooltip.style.width = tooltip.offsetWidth
		}
		positionTT(tooltip.style, x, y, tooltip.offsetWidth, tooltip.offsetHeight)
		tooltip.style.display = "none"  //this removes blinking in NN6
		tooltip.style.visibility = "visible"
		tooltip.style.display = "block"
		tooltip.style.zIndex = 100
	}
	
	timedCount();
}

function DREhideTT() {
	rolling_counter = 0
	clearTimeout(rolling_timer);
	if (typeof(tooltip) == "undefined") return
	if (document.layers) {
		tooltip.visibility = "hide"
	} else if (document.all || document.getElementById) {
		tooltip.style.visibility = "hidden"
		tooltip.style.width = ""
	}
}

function timedCount()
{
	document.getElementById('dynamicText').innerHTML = sArr[rolling_counter];
	rolling_counter = rolling_counter+1;
	if (rolling_counter > 2) {
		rolling_counter=0
	}
	rolling_timer = setTimeout("timedCount()",1000);
}
