function getTextFromServer(plsqlfunction){
//	prompt('', plsqlfunction);
	try{
		var request;
		try{
			request = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			request = new XMLHttpRequest();
		}
		openstr = plsqlfunction;
		request.open("POST",openstr,false);
		request.send("");
		var ret = request.responseText;
		request = null;
	}catch(e){
		ret=0;
		alert(e)
	}
	return ret;
}

function taskGetParent() {
	var oParent = window.parent;
	var iCycles = 0;
	while (oParent != null && oParent != window && iCycles < 10) {
//		alert(oParent.location.href);
		if (oParent.location.href.indexOf('htm') == -1 ||  oParent.location.href.indexOf('index.htm') != -1)
			return oParent;
		oParent = oParent.parent;
		iCycles++;
	}
	return window;
}

function taskAddTask(sURL, bNoClid, bOffline) {
	var oRoot = taskGetParent();
	return oRoot.addTask(sURL, bNoClid, bOffline);
}

function taskRemoveTask(sURL) {
	var oRoot = taskGetParent();
	oRoot.removeTask(sURL);
}

function taskAbortAll(sURL) {
	var oRoot = taskGetParent();
	oRoot.abortAll(sURL);
}

