function clearField(textFieldId){
	document.getElementById(textFieldId).value = "";
}


function jumpLink(toWhere){
	window.location.hash = toWhere;
}

(function(){
	function toggle(id, remove, add){
		if(id){
		$("#" + id).removeClass(remove);
		$("#" + id).addClass(add);
		}
	} 
	function rowHilite(rowId){
		toggle(rowId, "XDinactive","XDactive");
	};
	
	function unHilite(rowId){
		toggle(rowId, "XDactive","XDinactive");
	};
	function bindTooltips(){
		$('a[rel="tooltip"]').each(function(){
			
			var width = this.id == 'linkInstalledDetails'? 'auto' : 250;

			var text = $('#'+$(this).attr('href')).html();
			
			$(this).qtip({
				style: {name:'cream', width:width, border: { width: -5, radius: 5, color: '#ffe5b2' },background: '#ffe5b2', color:'#000'},
				position: { adjust: { screen: true} },
				content: text,
   				show: 'mouseover',
   				hide: {when:'mouseout', effect:'fade'}
			}).click(function(){return false;});
		});
	}
	
	$(DocumentHelper.getDocument()).ready(function(){
		$('#runReportTbh:vinId').select();
		$(".XDinactive").mouseover(function() {rowHilite(this.id)});
		$(".XDinactive").mouseout(function() {unHilite(this.id)});
		bindTooltips();
	});
})();
