﻿// JScript File

// This is for cascading window code -- counts the number of times a window was
// opened using openWin.
var open_window_count = 0; 

function openWin(id)
{
    
    // Cascading windows
    open_window_count = open_window_count + 1;
    var window_left = (20 + (open_window_count*6));
    var window_top = (20 + (open_window_count*25));
    
    // Open the window up.
    window.open('photo_popup.aspx?ID=' + id,'mywin'+ open_window_count, 'left=' + window_left + ',top=' + window_top + ',width=100,height=100,toolbar=0,resizable=1');
}

function OpenPrintPreview()
{
    var strOpenMe = "";
    strOpenMe = window.location + "";
    idx = strOpenMe.indexOf("?");
    if (idx == -1)
    {
        strOpenMe+="?Print=True";    
    }
    else
    {
        strOpenMe+="&Print=True";
    }
    features =  'toolbar=no,location=no,directories=no' +
                ',status=no,menubar=yes,' +
                'scrollbars=yes,resizable=yes,' +
                'width=500,height=465' ;

    dlg = window.open (strOpenMe,"",features)

}
