<!--
// jQuery functions:
$(function() {
	var $focus;
	$('div[id*="hint_"]').each (function() {
		$(this).hide();
	});
	$('td.slider').focusin (function() {
		if ($focus != this)
			$(this).children('div[id*="hint_"]').slideDown(500);
		$focus = this;
	});
	$('td.slider').focusout (function() {
		$(this).children('div[id*="hint_"]').slideUp(500);
	});
});

function addText(id, str, str2) {
	var e = document.getElementById(id);
	//MSIE
	if (navigator.userAgent.indexOf('MSIE') !=-1) {
		e.focus();
		sel = document.selection.createRange();
		sel.text = str + sel.text + str2;
	}
	//MOZILLA/NETSCAPE
	else if (navigator.userAgent.indexOf('Mozilla') !=-1) {
		var startPos = e.selectionStart;
		var endPos = e.selectionEnd;
		e.value = e.value.substring(0, startPos)
		+ str
		+ e.value.substring(startPos, endPos)
		+ str2
		+ e.value.substring(endPos, e.value.length);
		e.selectionStart = startPos + str.length + (endPos - startPos) + str2.length;
		e.selectionEnd = startPos + str.length + (endPos - startPos) + str2.length;
		e.focus();
	}
	//OTHER
	else {
		e.value = e.value + str + str2;
		e.focus();
	}
}

// http://www.ultramegatech.com/blog/2008/12/reloading-images-using-javascript/ (thanks!!)
function refreshCaptcha() {
   var obj = document.getElementById('captcha');
   var src = 'captcha/image.php';
   obj.src = src + '?' + Math.round(new Date().getTime() / 3000);
   return false;
}
//-->
