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

var WindowObjectReferenceOfRequestedPopup;
// links
function OpenRequestedPopup(strUrl, strTarget) {
	var windowWidth, windowHeight, windowLeft, windowTop;
	windowWidth = 900;
	windowHeight = 585;
	windowLeft = 15;
	windowTop = 5;
	if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed) {
		WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,resizable,scrollbars,status");
	} else {
		WindowObjectReferenceOfRequestedPopup.focus();
	} // end if else
} //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
