// MM_PopUp.js
//
// Popup window functions.
//
// Copyright (C) 2006-2007 Mixtur Interactive, Inc. All rights reserved.
// http://www.mixtur.com, 1-866-268-3994. Unlicensed use is prohibited.
//
// Mark Eissler, mark@mixtur.com
//
// $Id: MM_PopUp.js,v 1.1 2010/03/16 01:25:40 mark Exp $
//

/*
 IMPORTANT:  This Mixtur software is supplied to you by Mixtur Interactive, Inc. ("Mixtur")
 in consideration of your agreement to the following terms, and your use, installation, 
 or modification of this Mixtur software constitutes acceptance of these terms.  If you do
 not agree with these terms, please do not use, install, or modify this Mixtur software.
 
 In consideration of your agreement to abide by the following terms, and subject to these 
 terms, Mixtur grants you a personal, non-exclusive license, under MixturÕs copyrights in 
 this original Mixtur software (the "Mixtur Software"), to use, reproduce and modify the
 Mixtur Software.
 
 IMPORTANT:  THIS AGREEMENT DOES NOT PROVIDE FOR NOR DOES IT ALLOW REDISTRIBUTION OF THIS
 MIXTUR SOFTWARE. YOU MAY NOT REDISTRIBUTE THIS SOFTWARE WITH OR WITHOUT MODIFICATIONS.

 Neither the name, trademarks, service marks or logos of Mixtur Interactive, Inc. may be 
 used to endorse or promote products derived from the Mixtur Software without specific 
 prior written permission from Mixtur. Except as expressly stated in this notice, no other
 rights or licenses, express or implied, are granted by Mixtur herein, including but not
 limited to any patent rights that may be infringed by your derivative works or by other
 works in which the Mixtur Software may be incorporated.
 
 The Mixtur Software is provided by Mixtur on an "AS IS" basis.  MIXTUR MAKES NO WARRANTIES, 
 EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, 
 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE MIXTUR SOFTWARE OR ITS 
 USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
 
 IN NO EVENT SHALL MIXTUR BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL 
 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, 
 REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE MIXTUR SOFTWARE, HOWEVER CAUSED AND 
 WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR 
 OTHERWISE, EVEN IF MIXTUR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

function mmjs_popup(inTitle, inUrl, inWidth, inHeight) {

    var theWindow = null;
    thePointX = 0.0;
    thePointY = 0.0;

    // center the popup over the browser window
    if(bCode != "MSIE") {
        thePointX = window.screenX + ((window.innerWidth/2) - (inWidth/2));
        thePointY = window.screenY + ((window.innerHeight/2) - (inHeight/2));
    } else {
        if(document.documentElement && document.documentElement.clientHeight) {
            // Explorer 6 Strict Mode
            
            thePointX = window.screenLeft + ((document.documentElement.clientWidth/2) - (inWidth/2));
            thePointY = window.screenTop + ((document.documentElement.clientHeight/2) - (inHeight/2));
        } else {  
            thePointX = window.screenLeft + ((document.body.clientWidth/2) - (inWidth/2));
            thePointY = window.screenTop + ((document.body.clientHeight/2) - (inHeight/2));
        }                    
    }
    
    // no spaces in the window name!!
    theWindow = window.open(inUrl,
        inTitle,
        "location=0,status=1,scrollbars=1,width="+inWidth+",height="+inHeight
        );
    theWindow.moveTo(thePointX,thePointY);        

    return;
}


