﻿// JScript File
var g_oPopup;
 
function OpenInNewWindow(sImage,iWidth,iHeight)
{ 
  ShowDialog(sImage,iWidth,iHeight);
}
function ShowDialog(sURL,iWidth,iHeight)
{
	// NSModal.js must be included in the file using this method.
   if (navigator.appName == "Microsoft Internet Explorer")          
      return window.showModalDialog(sURL, [window], 'dialogWidth:' + iWidth + 'px; dialogHeight:' + iHeight + 'px; status:0; help:0');
   else
   {
      openPopUp(sURL, null, iWidth, iHeight, 0, g_oPopup);
   }
		//NSOpenModalDialog(sURL, iWidth, iHeight, null);
}
function openPopUp (url, sName, sWidth, sHeight, scrollbars, oPopup, pi_sResizeable)
{
	if ((pi_sResizeable == '') || (pi_sResizeable == null)) pi_sResizeable = 'no';
	
	if (!oPopup || oPopup.closed)
		oPopup = window.open(url, sName, "fullscreen=no,titlebar=no,menubar=no,location=no,status=no,resizable=" + pi_sResizeable + ",top=50,left=50,width=" + sWidth + ",height=" + sHeight + ",toolbar=no,scrollbars=" + scrollbars);
	else
	   oPopup.location.href = url;
	oPopup.focus();
}
