﻿function PartWin(theURL) {
    PartWinHeightWidth(theURL, 550, 720);
}
function PartWinHeightWidth(theURL, height, width){
    var pw;
    var scroll = 'no';

    var screenH = screen.height;
    if (screenH - 150 < height) {
        height = screenH - 150;
        scroll = 'yes';
    }
    
    pw = window.open(theURL,'PartWin','toolbar=no,menubar=no,resizable=no,scrollbars=' + scroll +',height='+height+',width='+width);
    pw.focus();
}
function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
    var cookie_string = name + "=" + escape( value );

    if ( exp_y )
    {
        var expires = new Date ( exp_y, exp_m, exp_d );
        cookie_string += "; expires=" + expires.toGMTString();
    }

    if ( path ) cookie_string += "; path=" + escape ( path );
    if ( domain ) cookie_string += "; domain=" + escape ( domain );
    if ( secure ) cookie_string += "; secure";
    
    document.cookie = cookie_string;
}
function get_cookie ( cookie_name )
{
    var results = document.cookie.match ('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');

    if (results) 
    {
        return unescape (results[2]);
    }
    else return '';
}
