/*open Window */
/************************************************************************************************************************************************/
/*HTML Sample Code */

var LastWindowOpened = "";
	
var thisY=0;
var thisX=0;

function makePopUp(thiswidth,thisheight,thisDocument,thisWindowName,thisXPosition,thisYPosition,thisScrollbar,thisResize) {
	if (bw.ie) {
	  thisX = window.screenLeft + thisXPosition;
	  thisY = window.screenTop + thisYPosition;
	}
	else{
	  thisX = window.screenX +  thisXPosition + 10;
	  thisY = window.screenY + thisYPosition + 114;
	  if(bw.mac)
			thisY = window.screenY + thisYPosition + 90;
	}
	
	myProperty = 'toolbar=0,location=0,directories=0,status=0,scrollbars=' + thisScrollbar + ',resizable=' + thisResize + ',width=' + thiswidth + ',height=' + thisheight + ',top=' + thisY + ',left=' + thisX;
	
	
	if(self.myWindow == null){
		delete myWindow;
		myWindow = window.open(thisDocument,thisWindowName,myProperty);
		if(myWindow != null){
			myWindow.focus();
		}
	}
	else{
		if(!(myWindow.closed)){
			self.myWindow.close();
			myWindow  = window.open(thisDocument,thisWindowName,myProperty);
		}
		else{
			myWindow  = window.open(thisDocument,thisWindowName,myProperty);
		}
	}
}

