	function Lighter(wer, color) {
		wer.style.background = color;
	}

	function Darker(wer, color) {
		wer.style.background = color;
	}

	function confirmation(ConfirmationText,Url) {
		bCheck = confirm(ConfirmationText)
		if (bCheck==true) {
			document.location.href=Url;
		}
	}

	function formconfirmation(ConfirmationText) {
		bCheck = confirm(ConfirmationText)
		if (bCheck==true) {
			return true;
		}
		return false;
	}	

	function getActiveText(msg) { 
	 selectedText = (document.all) ? document.selection.createRange().text : document.getSelection();
	 if (msg.createTextRange) msg.caretPos = document.selection.createRange().duplicate();
	 return true;
	}

	function addcode(NewCode) {
	var theform = document.template;
	 if (theform.template_content.createTextRange && theform.template_content.caretPos) {
	  var caretPos = theform.template_content.caretPos;
	  caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? '[[[' + NewCode + ']]] ' : '[[[' + NewCode + ']]] ';
	 } else theform.template_content.value+='[[[' + NewCode + ']]] '
	 AddTxt = "";
		template.template_content.focus();
	}

	function MarkAll() {
		for(var x=0;x<document.form1x.elements.length;x++)
		{ var y=document.form1x.elements[x];
		if(y.name!='MARKALL') y.checked=document.form1x.MARKALL.checked;
		}
	}	
	
    function openmore(which)
    {
        if(document.getElementById(which).style.display == "none")
        {
            document.getElementById(which).style.display = "";
        }
        else
        {
            document.getElementById(which).style.display = "none";
        }
    }
	
    function folderklapp(which_img, which_div)
    {
        if(document.getElementById(which_div).style.display == "none")
        {
			document.getElementById(which_img).src='images/treeminus.gif'
            document.getElementById(which_div).style.display = "";
        }
        else
        {
			document.getElementById(which_img).src='images/treeplus.gif'
            document.getElementById(which_div).style.display = "none";
        }
    }
	
