function DoConfirm(message, url) {
	if(confirm(message)) location.href = url;
}

function WhichClicked(ww) {
	window.document.postmodify.waction.value = ww;
}

function submitonce(theform) {
	// if IE 4+ or NS 6+
	if (document.all || document.getElementById) {
		// hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++) {
			var tempobj=theform.elements[i];
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") {
				//disable it
				tempobj.disabled=true;
			}
		}
	}
}

function storeCaret(text) { 
	if (text.createTextRange) {
		text.caretPos = document.selection.createRange().duplicate();
	}
}

function isEmptyText(theField)
{
	while (theField.value.length > 0 && (theField.value.charAt(0)==' ' || theField.value.charAt(0)=='\t'))
		theField.value = theField.value.substring(1,theField.value.length);
	while (theField.value.length > 0 && (theField.value.charAt(theField.value.length-1)==' ' || theField.value.charAt(theField.value.length-1)=='\t'))
		theField.value = theField.value.substring(0,theField.value.length-1);

	if (theField.value=='')
		return true;
	else
		return false;
}



	//coded by con-f-use@gmx.net - be fair and do not remove this
	function surrTxt(strTag,strTag2) {
		var	objEditor = document.postmodify.message,
			blnIe = document.selection,
			intStart = objEditor.selectionStart;

		objEditor.focus();
		if(blnIe) {
			var sel = blnIe.createRange();
			sel.text = insertBB(sel.text,strTag,strTag2);
		} else if (intStart) {
			intEnd = objEditor.selectionEnd;
			objEditor.value =
				objEditor.value.substring(0,intStart) +
				insertBB( objEditor.value.substring(intStart,intEnd), strTag, strTag2 ) +
				objEditor.value.substring(intEnd,objEditor.value.length);
		} else
			objEditor.value += insertBB('',strTag,strTag2);
	}

	function insTxt(strTag) {
		var	objEditor = document.postmodify.message,
			blnIe = document.selection,
			intStart = objEditor.selectionStart;

		objEditor.focus();
		strTag = ' ' + strTag + ' ';
		if(blnIe) {
			var sel = blnIe.createRange();
			sel.text = insertBB(sel.text,strTag,'');
		} else if (intStart) {
			intEnd = objEditor.selectionEnd;
			objEditor.value =
				objEditor.value.substring(0,intStart) +
				insertBB( objEditor.value.substring(intStart,intEnd), strTag, '' ) +
				objEditor.value.substring(intEnd,objEditor.value.length);
		} else
			objEditor.value += insertBB('',strTag,'');
	}
	
	function insertBB(strTxt,strTag,strTag2) {
		var row = false;
		
		if( strTxt=='http://' || null ) return '';
		return strTag + (row ? '='+ strTxt : '') + (row ? row : strTxt) + strTag2;
	}
	
	

	


