
	function prDelCheck(url){
		if(confirm('Are you sure you want to delete this PR?')){ 
			window.location= url;
		}
		return false;
	}
	
	function pageDelCheck(url){
		if(confirm('Are you sure you want to delete this Page?')){ 
			window.location= url;
		}
		return false;
	}
	
	function insertAtCursor(myField, myValue) {
		//IE support
		if (document.selection) {
			myField.focus();
			sel = document.selection.createRange();
			sel.text = myValue;
		}
		//MOZILLA/NETSCAPE support
		else if (myField.selectionStart || myField.selectionStart == "0") {
			var startPos = myField.selectionStart;
			var endPos = myField.selectionEnd;
			myField.value = myField.value.substring(0, startPos)
			+ myValue
			+ myField.value.substring(endPos, myField.value.length);
		} else {
			myField.value += myValue;
		}
	}
	
	function textCounter(field, countfield, maxlimit) {
		if (field.value.length > maxlimit) // if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
		else 
			countfield.value = maxlimit - field.value.length;
	}
	
	function substr_count (haystack, needle, offset, length) {
		var pos = 0, cnt = 0;
	 
		haystack += '';
		needle += '';
		if (isNaN(offset)) {offset = 0;}
		if (isNaN(length)) {length = 0;}
		offset--;
	 
		while ((offset = haystack.indexOf(needle, offset+1)) != -1){
			if (length > 0 && (offset+needle.length) > length){
				return false;
			} else{
				cnt++;
			}
		}
	 
		return cnt;
	}
	function isBlank(Var1,Label1)
	{
		if(Var1.value == "")
		{
			alert(" Insert Value in "+Label1);
			Var1.focus();
			return false;
		}
		return true;
	}
