var iCabFormFieldCompletionField;
var iCabFormFieldCompletionStart;
var iCabFormFieldCompletionEnd;

function iCabFormFieldCompletion(element, value, start, end) {
	element.value = value;
	iCabFormFieldCompletionField = element;
	iCabFormFieldCompletionStart = start;
	iCabFormFieldCompletionEnd = end;
	setTimeout("iCabFormFieldCompletionField.setSelectionRange(iCabFormFieldCompletionStart,iCabFormFieldCompletionEnd)",1);
}


var iCabAnchorHilightElement = 0;
var iCabAnchorHilightY;
var iCabAnchorHilightHeight;
var iCabAnchorHilightStep = 0;

function iCabAnchorHilightAnimation() {
	var opacity = iCabAnchorHilightStep;
	if (opacity > 10) opacity = 20 - opacity;
	iCabAnchorHilightElement.style.opacity = ""+opacity/10;
	iCabAnchorHilightStep--;
	if (iCabAnchorHilightStep > 0) {
		setTimeout("iCabAnchorHilightAnimation()",30);
	} else {
		var body = document.getElementsByTagName("body");
		if (body && body.length > 0) {
			body[0].removeChild(iCabAnchorHilightElement);
			iCabAnchorHilightElement = 0;
		}
	}
}

function iCabAnchorHilight(y, height, url) {
	iCabAnchorHilightY = y;
	iCabAnchorHilightHeight = height;
	iCabAnchorHilightStep = 20;
	if (iCabAnchorHilightElement == 0) {
		iCabAnchorHilightElement = document.createElement("img");
	}
	iCabAnchorHilightElement.src = url;
	iCabAnchorHilightElement.style.position = "absolute";
	iCabAnchorHilightElement.style.zIndex = "10000";
	iCabAnchorHilightElement.style.width = "99%";
	iCabAnchorHilightElement.style.height = height+"px";
	iCabAnchorHilightElement.style.left = "0px";
	iCabAnchorHilightElement.style.top = y+"px";
	iCabAnchorHilightElement.style.opacity = "0";

	var body = document.getElementsByTagName("body");
	if (body && body.length > 0) {
		body[0].appendChild(iCabAnchorHilightElement);
		setTimeout("iCabAnchorHilightAnimation()",1);
	}
}


