﻿// JScript File

function ShowCmaSubjectPropertyPhotoManagementPage(titleBlock)
{
    if (titleBlock == undefined) titleBlock = "&lt;Subj. Property&gt;";
	var windowArgs = 
		"dialogHeight: 719px; dialogWidth: 745px;  " +
		"edge: Raised; center: Yes; help: No; " +
		"resizable: no; status: yes; scroll: no";

	var dialogArguments = 
		{
		    ID : 0,
		    OpenMode  : "cmasubjectproperty",
		    TitleBlock : titleBlock 
		};
		
	returnValue = window.showModalDialog
		("/MLS/PhotoUpload/ImageWizardFrame.aspx?OpenMode=cmasubjectproperty",
		dialogArguments,
		windowArgs);
		
	return returnValue; 	
}

function ShowCmaFlyerPhotoManagementPage(titleBlock)
{
    if (titleBlock == undefined) titleBlock = ""; // Defect 2266: do not show any title if not named, or no contact attached.
	var windowArgs = 
		"dialogHeight: 719px; dialogWidth: 745px;  " +
		"edge: Raised; center: Yes; help: No; " +
		"resizable: no; status: yes; scroll: no";

	var dialogArguments = 
		{
		    ID : 0,
		    OpenMode  : "cmaflyer",
		    TitleBlock : titleBlock
		};
		
	returnValue = window.showModalDialog
		("/MLS/PhotoUpload/ImageWizardFrame.aspx?OpenMode=cmaflyer",
		dialogArguments,
		windowArgs); 	


	return returnValue; 	
}


function ShowImageWizardSessionPhotoManagementPage(label1Value, label2Value) {
    return ShowImageWizardSessionPhotoManagementPage("", label1Value, "", label2Value);
}

function ShowImageWizardSessionPhotoManagementPage(label1, label1Value, label2, label2Value) {
    if (label1 == undefined) label1 = ""; // Defect 2266: do not show any title if not named, or no contact attached.
    if (label1Value == undefined) label1Value = ""; // Defect 2266: do not show any title if not named, or no contact attached.
    if (label1 == undefined) label1 = ""; // Defect 2266: do not show any title if not named, or no contact attached.
    if (label2Value == undefined) label2Value = ""; // Defect 2266: do not show any title if not named, or no contact attached.
    var windowArgs =
		"dialogHeight: 719px; dialogWidth: 745px;  " +
		"edge: Raised; center: Yes; help: No; " +
		"resizable: no; status: yes; scroll: no";

    var dialogArguments =
		{
		    ID: 0,
		    OpenMode: "ImageWizardSession",
		    Label1: label1,
		    Label1Value: label1Value,
		    Label2: label2,
		    Label2Value: label2Value
		};

    returnValue = window.showModalDialog
		("/MLS/PhotoUpload/ImageWizard.aspx?OpenMode=ImageWizardSession&Label1=" + label1 + "&Label1Value=" + label1Value + "&Label2=" + label2 + "&Label2Value=" + label2Value,
		dialogArguments,
		windowArgs);

    return returnValue;
}
