/**
 * A JsHelper osztályban használt javascript függvények
 */

/**
 * Megváltoztatja a megadott form akcióját, hogy egy másik controller hajtsa végre.
 */
function changeFormAction(formName,newAction) {
	document.forms[formName].action=newAction;
	return true;
}

/**
 * A feltoltes folyamatat jelzo ablakot inditja el
 */
function startProgress(uploadIdentifier) {
	if (document.forms["kuldes"].elements["postbackValidationGroupName"].value=="back") {
		return true;
	} else {
		var progressUrl='./?window=upload_progress&UPLOAD_IDENTIFIER='+uploadIdentifier;
		var windowName='UploadMeter';
		popUp(progressUrl,windowName,460,165,false,false); // 460,262
		return true;
	}
}


function popUp(mypage, myname, w, h, scroll, titlebar) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
	win = window.open(mypage, myname, winprops, true);
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

