actionYet = false;

//simulates original PostBack except the submit command
function doMyPostBack(eventTarget, eventArgument) {
	if (!actionYet) {
		var theform;
		theform = document.forms[0];
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
	}
}

//prevents the same form to be posted twice 
function checkIsValid() {
	if (!actionYet) {
		if (window.ValidatorOnSubmit) {
			ValidatorOnSubmit();
			if (Page_IsValid) {
				actionYet = true;
			}
		} else {
			actionYet = true;
		}
	}
}
// allow user input tab character into textarea field using ctrl-tab 
function cTab(elementID) {
	if (document.getElementById){
		if (document.getElementById(elementID)){
			element=document.getElementById(elementID);
			if ((9==event.keyCode) && (event.ctrlKey)) {
				element.selection = document.selection.createRange(); 
				element.selection.text=String.fromCharCode(9);
				setTimeout('element.focus()',0);
			}
		}
	}
}

