function moveHighlight() {
	var highlightElement = document.getElementById('highlight');
	if(highlightElement == null) {
		var bodyTextElement = document.getElementById('bodyText');
		if(bodyTextElement != null) {
			var element1 = bodyTextElement.firstChild;
			if(element1 != null) {
				element1.id = 'highlight';
			}
		}
	}
	else {
		highlightElement.id = null;
		highlightElement = highlightElement.nextSibling;
		if(highlightElement != null) {
			highlightElement.id = 'highlight';
		}
		else {
			var bodyTextElement = document.getElementById('bodyText');
			if(bodyTextElement != null) {
				var element1 = bodyTextElement.firstChild;
				if(element1 != null) {
					element1.id = 'highlight';
				}
			}
		}
	}
}

function fnSelect(obj) {
	fnDeSelect();
	if (document.selection) {
		var range = document.body.createTextRange();
        range.moveToElementText(obj);
		range.select();
	}
	else if (window.getSelection) {
		var range = document.createRange();
		range.setStart(obj.firstChild,0);
		range.setEndAfter(obj.lastChild);
		window.getSelection().removeAllRanges();
		window.getSelection().addRange(range);
	}
}
	
function fnDeSelect() {
	if (document.selection) document.selection.empty(); 
	else if (window.getSelection)
            window.getSelection().removeAllRanges();
}

function setCookie(name, value, exp_y, exp_m, exp_d, path, domain, secure) {
	var cookie_string = name + "=" + escape(value);

	if (exp_y) {
		var expires = new Date(exp_y, exp_m, exp_d);
		cookie_string += "; expires=" + expires.toGMTString();
	}

	if (path)
		cookie_string += "; path=" + escape(path);

	if (domain)
		cookie_string += "; domain=" + escape(domain);

	if (secure)
		cookie_string += "; secure";

	document.cookie = cookie_string;
}

function deleteCookie(cookie_name) {
	var cookie_date = new Date(); // current date & time
	cookie_date.setTime(cookie_date.getTime() - 1);
	document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

function getCookie(cookie_name) {
	var results = document.cookie
			.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');

	if (results)
		return (unescape(results[2]));
	else
		return null;
}
