﻿// JScript File
//Send Private Message 
var ThePMWin;
var ThePMWinSubmitParent;

function SendMessage_UserName(username, submit)
{
    // Set height and width
    var NewWinHeight=530;
    var NewWinWidth=700;

    // Place the window
    var NewWinPutX=10;
    var NewWinPutY=10;

    var lsURL = "../Communications/Private_Message_Post.aspx?username=" + username;
    ThePMWinSubmitParent = submit;
    
    //Get what is below onto one line
    ThePMWin = window.open(lsURL,'TheNewpop', 'toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=no'); 

    //Get what is above onto one line

    ThePMWin.resizeTo(NewWinWidth,NewWinHeight);
    ThePMWin.moveTo(NewWinPutX,NewWinPutY);
}
function SendMessage(quote, PrivateID, submit)
{
    // Set height and width
    var NewWinHeight=530;
    var NewWinWidth=700;

    // Place the window
    var NewWinPutX=10;
    var NewWinPutY=10;

    //Get what is below onto one line
    var lsURL;
    if (PrivateID == undefined)
        lsURL = "Private_Message_Post.aspx?quote=" + quote;
    else
        lsURL = "Private_Message_Post.aspx?quote=" + quote + "&PrivateID=" + PrivateID;
    
    ThePMWinSubmitParent = submit;
    ThePMWin = window.open(lsURL,'TheNewpop', 'toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=no'); 

    //Get what is above onto one line

    ThePMWin.resizeTo(NewWinWidth,NewWinHeight);
    ThePMWin.moveTo(NewWinPutX,NewWinPutY);
}
function ClosePMWindow()
{
    ThePMWin.close();
    if (ThePMWinSubmitParent)
        document.forms.item(0).submit();
}
// - End of Send Private Message

