//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 * @package Starweb Webshop System
 * @version See version-file
 * @copyright Copyright (c) 2000 - 2007, Ehandelslogik i Lund AB
 * 
 * @author Ehandelslogik i Lund AB, org.no 556696-9019  (Starweb)
 *  Country: Sweden
 *  Homepage: www.starweb.se
 *  E-mail: support@starweb.se
 * 
 * License:
 * This program is not "free" software and restrictions apply!
 * This file as well as all other files containing the code to our software may ONLY be used and/or redistributed with written permission from us.
 * You'll find information regarding our conditions and pricing on our homepage. Contact us immediately if any of these conditions are not clear.
 */
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 * @name Function: Open Popup Window
 * @access public
 *
 * @param string sUrl
 * @param int iWdtNo
 * @param int iHgtNo
 * @param boolean bIsResizable
 */
var oWnd = null;
function OpenPopupWnd(sUrl, iWdtNo, iHgtNo, bIsResizable)
{
   var iLeftNo = ((screen.width / 2) - (iWdtNo / 2));
   var iTopNo = ((screen.height / (2 - iHgtNo)) / (2 - (iHgtNo / 10)));
   
   var sFeatures = 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars='
      + bIsResizable + ', resizable=' + bIsResizable + ', width=' + iWdtNo + ', height=' + iHgtNo
			+ ',alwaysRaised=yes, left=' + iLeftNo + ', top=' + iTopNo + ',screenX=0, screenY=0';
   
   
   // Close opened window
   if(oWnd && !oWnd.closed)
   { oWnd.close(); }
   
   
   
   oWnd = window.open(sUrl, "OpenPopupWnd", sFeatures);
   oWnd.location.href = sUrl;
   if(!oWnd.opener){ oWnd.opener = self; }
   oWnd.focus();
}
