		var ns = (document.layers)	? true:false;

		function popupWindow(tmpURL, tmpName, tmpWidth, tmpHeight){
			parent.winWait = window.open(tmpURL, tmpName, "top=" + getTopPosition(tmpHeight) + ", left=" + getLeftPosition(tmpWidth) + ", width=" + tmpWidth + ", height=" + tmpHeight + ", toolbar=no, menubar=no, status=no, scrollbars=yes, resizable=no");
			parent.winWait.focus();
		}
		
		function popupWindowResizeable(tmpURL, tmpName, tmpWidth, tmpHeight){
			parent.winWait = window.open(tmpURL, tmpName, "top=" + getTopPosition(tmpHeight) + ", left=" + getLeftPosition(tmpWidth) + ", width=" + tmpWidth + ", height=" + tmpHeight + ", toolbar=no, menubar=no, status=no, scrollbars=yes, resizable=yes");
			parent.winWait.focus();
		}
		
		function popupWindowNoScroll(tmpURL, tmpName, tmpWidth, tmpHeight){
			parent.winWait = window.open(tmpURL, tmpName, "top=" + getTopPosition(tmpHeight) + ", left=" + getLeftPosition(tmpWidth) + ", width=" + tmpWidth + ", height=" + tmpHeight + ", toolbar=no, menubar=no, status=no, scrollbars=no, resizable=no");
			parent.winWait.focus();
		}

		function popupWindowAdv(tmpURL, tmpName, tmpWidth, tmpHeight, tmpToolbar, tmpMenubar, tmpStatus, tmpScrollbars, tmpResizable){
			parent.winWait = window.open(tmpURL, tmpName, "top=" + getTopPosition(tmpHeight) + ", left=" + getLeftPosition(tmpWidth) + ", width=" + tmpWidth + ", height=" + tmpHeight + ", toolbar=" + tmpToolbar + ", menubar=" + tmpMenubar + ", status=" + tmpStatus + ", scrollbars=" + tmpScrollbars + ", resizable=" + tmpResizable);
			parent.winWait.focus();
		}

		function getLeftPosition(objWidth){
			centreWidth = (ns) ? (top.innerWidth)/2 : (screen.width)/2 ;
			leftPosition = Math.floor(centreWidth - (objWidth/2));
			return leftPosition;
		}

		function getTopPosition(objHeight){
			centreHeight = (ns) ? (top.innerHeight)/2 : (screen.height)/2 ;
			topPosition = Math.floor(centreHeight - (objHeight/2));
			return topPosition;
		}
		
		function getFrameLeftPosition(objWidth){
			centreWidth = (ns) ? (window.innerWidth)/2 : (document.body.clientWidth)/2 ;
			leftPosition = Math.floor(centreWidth - (objWidth/2));
			return leftPosition;
		}

		function getFrameTopPosition(objHeight){
			centreHeight = (ns) ? (window.innerHeight)/2 : (document.body.clientHeight)/2 ;
			topPosition = Math.floor(centreHeight - (objHeight/2));
			return topPosition;
		}
