// JS Util :: Smart Focus v.1.4.1
// Allow webpages to Raise or lower windows
// GET | POST

var WindowObjectReferenceOfRequestedPopup;
// links
function OpenRequestedPopup(strUrl, strTarget) {
	var windowWidth, windowHeight, windowLeft, windowTop;
	//--
	windowWidth = 900;
	windowHeight = 625;
	windowLeft = 15;
	windowTop = 5;
	//-- events
	// WindowObjectReferenceOfRequestedPopup == null
	// WindowObjectReferenceOfRequestedPopup.closed
	//--
	WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,resizable,scrollbars,status");
	WindowObjectReferenceOfRequestedPopup.focus();
	//--
} //end function

// this function must be called by a form button
function OpenRequestedPostForm(objForm, strTarget) {
	objForm.target = strTarget;
	OpenRequestedPopup(objForm.action, strTarget);
	objForm.submit();
} //end function

// END
