// Change jQuery mode to avoid conflicts with prototype or scriptaculous
jQuery.noConflict();

function focusInput(ctrl, word) {
	if (ctrl.value == word) ctrl.value = '';
}
function blurInput(ctrl, word) {
	if (ctrl.value == '') ctrl.value = word;
}
function kp(e) {
	var characterCode = 0 //literal character code will be stored in this variable

	var evt = window.event || e;
	characterCode = evt.keyCode //character code is contained in IE's keyCode property


	if(characterCode == 13) { //if generated character code is equal to ascii 13 (if enter key)
		jQuery('#loginform').submit();
		return false
	}
	else{
		return true
	}

}

function sitemap(id) {
	var sitemap = '#sitemap'+id;

	if (jQuery(sitemap+">ul:first").is(":hidden")) {
		jQuery(sitemap+">img").attr("src","fileadmin/templates/images/minus.gif");
		jQuery(sitemap+">ul").slideDown("slow");
	} else {
		jQuery(sitemap+">img").attr("src","fileadmin/templates/images/plus.gif");
		jQuery(sitemap+">ul").slideUp("slow");
	}
}