/*
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Project Name        - UFCW227 WEB
'Class/Form Name	 - JavaScript Functions to display customize alert
'Copyright           - 2009 by Health Plan Systems Inc.
'Purpose             - To display alert window with yes/no/cancel option
'
'Revision History:
'Ver   Date     Time  Developer
'-------------------------------
'$Log: /FINDADR/Development/FindADoctor_V3.1/WebUI/Scripts/Dialog.js $
'
'10    9/12/11 1:05p Ravi
'Changes Updated as per CR
'
'8     9/10/11 7:29p Saravanan
'Updated the main function
'
'6     9/02/11 2:27p Saravanan
'Zip popup validation
'
'4     8/24/11 9:20p Mrajkapoor
'ICR_FADQC_082411_01  - Completed
'
'2     4/11/11 8:00p Ravi
'Button Style Updated and Images and Unnecessory Codes are removed from
'.aspx  and .cs files
'
'1     3/17/11 10:49a Jayaraj
'Converted Source 2010 added
'
'4     6/04/10 12:50p Ravi
'Script updated
'
'2     6/03/10 1:10p Ravi
'Code and function Changed
'
'1     6/02/10 2:21p Jayaraj
'new file added
'
'1     12/01/09 5:27p Jayaraj
'Javascript file of Dialog added.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

var ModalDialogWindow;
var ModalDialogShowChild;
var ModalDialogInterval;
var ModalDialog = new Object;
var ModalMessage = "";

ModalDialog.value = '';
ModalDialog.eventhandler = '';
ModalMessage = '- Click "From Form" to submit the details from Form. <br><br>  - Click "From Grid" to submit the details from Grid. <br><br>  - Click "Cancel" for no changes.';

function ModalDialogRemoveWatch() {
    ModalDialog.value = '';
    ModalDialog.eventhandler = '';
}

function ModalDialogShow(Title, BodyText, Buttons, EventHandler) {
    ModalDialogRemoveWatch();
    ModalDialog.eventhandler = EventHandler;

    var args = 'width=400,height=200,left=325,top=300,toolbar=0,';
    args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';

    ModalDialogWindow = window.open("", "", args);
    ModalDialogWindow.document.open();
    ModalDialogWindow.document.write('<html>');
    ModalDialogWindow.document.write('<head>');
    ModalDialogWindow.document.write('<title>' + Title + '</title>');
    ModalDialogWindow.document.write('<link rel="stylesheet" href="Styles/Style.css">');
    ModalDialogWindow.document.write('<script' + ' language=JavaScript>');
    ModalDialogWindow.document.write('function CloseForm(Response) ');
    ModalDialogWindow.document.write('{ ');
    ModalDialogWindow.document.write(' window.opener.ModalDialog.value = Response; ');
    ModalDialogWindow.document.write(' window.close(); ');
    ModalDialogWindow.document.write('} ');
    ModalDialogWindow.document.write('</script' + '>');
    ModalDialogWindow.document.write('</head>');
    ModalDialogWindow.document.write('<body onblur="window.focus();" style="background-color:ButtonFace">');
    ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2>');
    ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/ConfirmIcon.gif" />&nbsp;&nbsp;</td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogWindow.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogWindow.document.write('</body>');
    ModalDialogWindow.document.write('</html>');
    ModalDialogWindow.document.close();
    ModalDialogWindow.focus();
    ModalDialogInterval = window.setInterval("ModalDialogMaintainFocus()", 5);
}
//YesNoCancel
function efnShowMessage(BodyText, EventHandler) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    Buttons = '<input type=button class="text" value="From Form" onClick=CloseForm("Yes") width="10px" style="width:80" />&nbsp;&nbsp;';
    Buttons += '<input type=button class="text" value="From Grid" onClick=CloseForm("No") style="width:80" />&nbsp;&nbsp;';
    Buttons += '<input type=button class="text" value=Cancel onClick=CloseForm("Cancel") style="width:80"/>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    ModalDialogShow("Dialog", BodyText, Buttons, EventHandler);
}

function efnShowZipDetailsMessage(BodyText, EventHandler, ZipCount) {
    var Buttons = '';
    Buttons = '<input type=button Class="cmdbutton" value="Yes" onClick=SelectOK("Yes")  />&nbsp;&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="No" onClick="CloseWindow();" />&nbsp;';

    ModalZipDialogShow("Zip", BodyText, Buttons, EventHandler, ZipCount);
}

function ModalZipDialogShow(Title, BodyText, Buttons, EventHandler, ZipCount) {
    ModalDialogRemoveWatch();

    ModalDialog.eventhandler = EventHandler;

    var height = parseInt(ZipCount * 100) + 125;

    var args = 'width=450,height=240,left=325,top=300,toolbar=0,';
    args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';

    ModalFocus = "Y";

    ModalDialogWindow = window.open("", "Zip", args);

    ModalDialogWindow.document.open();
    ModalDialogWindow.document.write('<html>');
    ModalDialogWindow.document.write('<head>');
    ModalDialogWindow.document.write('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />');
    ModalDialogWindow.document.write('<title>' + Title + '</title>');
    ModalDialogWindow.document.write('<link rel="stylesheet" href="App_Themes/FADTheme/StyleSheet.css">');
    ModalDialogWindow.document.write('<script' + ' language=javaScript>');
    //ModalDialogWindow.document.write(' var sFocus=Y; ');
    //ModalDialogWindow.document.write('       ');

    ModalDialogWindow.document.write('function SelectRadio(val){var cnt=document.getElementById("reccount").value;for(var i=0;i<cnt;i++){if(val!=i){document.getElementById("rdSelect_"+i).checked=false}} }');
    ModalDialogWindow.document.write('function SelectOK(val){var cnt=document.getElementById("reccount").value;var tCity="";var tState="";var tCounty="";for(var i=0;i<cnt;i++){if (document.getElementById("rdSelect_" + i).checked) {');
    ModalDialogWindow.document.write('var Zipval="";Zipval=document.getElementById("hidDataRow_"+i).value;window.opener.SetZipValues(Zipval);window.opener.ModalFocus="N";window.close(); }}}');
    ModalDialogWindow.document.write('function CloseWindow(){ window.opener.SetZipEmpty();window.opener.ModalFocus="N";window.close();}');
    ModalDialogWindow.document.write('</script>');
    ModalDialogWindow.document.write('</head>');
    ModalDialogWindow.document.write('<body onblur="window.focus();" onUnload="CloseWindow();" bgcolor="white"; style="padding:5px; align:center">');
    ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2 bgcolor="White">');
    //ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/pagehead-icon-2.gif" /><span class="heading-message">Zip Information</span><img src="Images/pagehead-pic.gif" width="30" height="6"/></td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr class="text"><td valign="top" ></td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogWindow.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogWindow.document.write('</body>');
    ModalDialogWindow.document.write('</html>');
    ModalDialogWindow.document.close();
    ModalDialogWindow.focus();
    ModalDialogInterval = window.setInterval("ModalDialogZipMaintainFocus()", 5);
}

/*
function YesNoMaybe(BodyText,EventHandler)
{
var Buttons='';
Buttons = '<input type="button" onClick="javascript:CloseForm("Yes");" style="width:90" >Yes</a>&nbsp;&nbsp;';
Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';

//Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
//Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
//Buttons += '<a href=javascript:CloseForm("Maybe");>Maybe</a>&nbsp;&nbsp;';
ModalDialogShow("Dialog",BodyText,Buttons,EventHandler);
}

function YesNoMaybeReturnMethod()
{
document.getElementById('modalreturn2').value = ModalDialog.value;
ModalDialogRemoveWatch();
alert('YesNoMaybeReturnMethod has just executed.');
}
*/

function efnShowPatientMessage(BodyText, EventHandler) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    Buttons = '<input type=button Class="cmdbutton"  value="Replace" onClick=CloseForm("Edit")  />&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="Add as New Patient" onClick=CloseForm("New")  />&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="Cancel" onClick=CloseForm("Cancel") />&nbsp;&nbsp;';
    BodyText = '<font size=2 face="Arial, Helvetica, sans-serif">' + BodyText + '</font>';
    ModalPatientDialogShow("Dialog", BodyText, Buttons, EventHandler, '');
}

function ModalPatientDialogShow(Title, BodyText, Buttons, EventHandler, IsEnc) {
    ModalDialogRemoveWatch();

    ModalDialog.eventhandler = EventHandler;

    if (IsEnc != "Y") {
        var args = 'width=475,height=180,left=325,top=300,toolbar=0,';
        args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';
    }
    else {
        var args = 'width=475,height=150,left=325,top=300,toolbar=0,';
        args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';
    }
    ModalDialogWindow = window.open("", "", args);
    ModalDialogWindow.document.open();
    ModalDialogWindow.document.write('<html>');
    ModalDialogWindow.document.write('<head>');
    ModalDialogWindow.document.write('<title>' + Title + '</title>');
    ModalDialogWindow.document.write('<link rel="stylesheet" href="Styles/Style.css">');
    ModalDialogWindow.document.write('<script' + ' language=JavaScript>');
    ModalDialogWindow.document.write('function CloseForm(Response) ');
    ModalDialogWindow.document.write('{ ');
    ModalDialogWindow.document.write(' window.opener.ModalDialog.value = Response; ');
    ModalDialogWindow.document.write(' window.close(); ');
    ModalDialogWindow.document.write('} ');
    ModalDialogWindow.document.write('</script' + '>');
    ModalDialogWindow.document.write('</head>');
    ModalDialogWindow.document.write('<body onblur="window.focus();" class="windowbody">');
    ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2>');
    ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/ConfirmIcon.gif" />&nbsp;&nbsp;</td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogWindow.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogWindow.document.write('</body>');
    ModalDialogWindow.document.write('</html>');
    ModalDialogWindow.document.close();
    ModalDialogWindow.focus();
    ModalDialogInterval = window.setInterval((IsEnc != "Y" ? 'ModalDialogFocus()' : 'ModalDialogEncFocus()'), 5);
}

function efnShowEncounterMessage(BodyText, EventHandler) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';

    Buttons = '<input type=button Class="cmdbutton"  value="Yes" onClick=CloseForm("Update")  />&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="No" onClick=CloseForm("No")  />&nbsp;&nbsp;';
    //   Buttons += '<input type=button class="text" value="Cancel" onClick=CloseForm("Cancel") style="width:70px"/>&nbsp;&nbsp;';
    BodyText = '<font size=2 face="Arial, Helvetica, sans-serif">' + BodyText + '</font>';
    ModalPatientDialogShow("Dialog", BodyText, Buttons, EventHandler, 'Y');
}

function efnShowPatientSelfMessage(BodyText, EventHandler) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    Buttons = '<input type=button class="text"  value="Replace" onClick=CloseForm("Edit") width="10px" style="width:70;height:20" />&nbsp;&nbsp;';
    Buttons += '<input type=button class="text" value="Cancel" onClick=CloseForm("Cancel") style="width:70;height:20"/>&nbsp;&nbsp;';
    BodyText = '<font size=2 face="Arial, Helvetica, sans-serif">' + BodyText + '</font>';
    ModalPatientDialogShow("Dialog", BodyText, Buttons, EventHandler, '');
}

function efnShowYesNoMessage(BodyText, EventHandler, returnfunc) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    Buttons = '<input type=button Class="cmdbutton" value="Yes" onClick=CloseForm("Yes") />&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="No" onClick=CloseForm("No")  />&nbsp;&nbsp;';
    BodyText = '<font size=2 face="Arial, Helvetica, sans-serif">' + BodyText + '</font>';
    ModalDialogYesNoShow("Dialog", BodyText, Buttons, EventHandler, '', returnfunc);
}
function ModalDialogYesNoShow(Title, BodyText, Buttons, EventHandler, IsSetup, returnFunc) {
    ModalDialogRemoveWatch();
    ModalDialog.eventhandler = EventHandler;

    var args = 'width=400,height=150,left=325,top=300,toolbar=0,';
    args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';

    ModalDialogWindow = window.open("", "Confirmation", args);
    ModalDialogWindow.document.open();
    ModalDialogWindow.document.write('<html>');
    ModalDialogWindow.document.write('<head>');
    ModalDialogWindow.document.write('<title>' + Title + '</title>');
    ModalDialogWindow.document.write('<link rel="stylesheet" href="Styles/Style.css">');
    ModalDialogWindow.document.write('<script' + ' language=JavaScript>');
    ModalDialogWindow.document.write('function CloseForm(Response) ');
    ModalDialogWindow.document.write('{ ');
    ModalDialogWindow.document.write(' window.opener.ModalDialog.value = Response; ');
    ModalDialogWindow.document.write(' window.close(); ');
    ModalDialogWindow.document.write('} ');
    ModalDialogWindow.document.write('</script' + '>');
    ModalDialogWindow.document.write('</head>');
    ModalDialogWindow.document.write('<body onblur="window.focus();" class="windowbody">');
    ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2>');
    ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/ConfirmIcon.gif" />&nbsp;&nbsp;</td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogWindow.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogWindow.document.write('</body>');
    ModalDialogWindow.document.write('</html>');
    ModalDialogWindow.document.close();
    ModalDialogWindow.focus();
    ModalDialogInterval = window.setInterval(returnFunc, 5);
}

function ModalOtherEncDialogShow(Title, BodyText, Buttons, EventHandler, IsEnc) {
    ModalDialogRemoveWatch();

    ModalDialog.eventhandler = EventHandler;

    if (IsEnc != "Y") {
        var args = 'width=475,height=180,left=325,top=300,toolbar=0,';
        args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';
    }
    else {
        var args = 'width=500,height=170,left=325,top=300,toolbar=0,';
        args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';
    }
    ModalDialogWindow = window.open("", "", args);
    ModalDialogWindow.document.open();
    ModalDialogWindow.document.write('<html>');
    ModalDialogWindow.document.write('<head>');
    ModalDialogWindow.document.write('<title>' + Title + '</title>');
    ModalDialogWindow.document.write('<link rel="stylesheet" href="Styles/Style.css">');
    ModalDialogWindow.document.write('<script' + ' language=JavaScript>');
    ModalDialogWindow.document.write('function CloseForm(Response) ');
    ModalDialogWindow.document.write('{ ');
    ModalDialogWindow.document.write(' window.opener.ModalDialog.value = Response; ');
    ModalDialogWindow.document.write(' window.close(); ');
    ModalDialogWindow.document.write('} ');
    ModalDialogWindow.document.write('</script' + '>');
    ModalDialogWindow.document.write('</head>');
    ModalDialogWindow.document.write('<body onblur="window.focus();" style="background-color:ButtonFace">');
    ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2>');
    ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/ConfirmIcon.gif" />&nbsp;&nbsp;</td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogWindow.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogWindow.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogWindow.document.write('</body>');
    ModalDialogWindow.document.write('</html>');
    ModalDialogWindow.document.close();
    ModalDialogWindow.focus();
    //ModalDialogInterval = window.setInterval("ModalDialogMaintainFocus()",5);
    ModalDialogInterval = window.setInterval('ModalDialogOtherEncFocus()', 5);
}
function efnShowOtherEncounterMessage(BodyText, EventHandler) {
    var Buttons = '';
    //Buttons = '<a href=javascript:CloseForm("Yes");>Yes</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("No");>No</a>&nbsp;&nbsp;';
    //Buttons += '<a href=javascript:CloseForm("Cancel");>Cancel</a>&nbsp;&nbsp;';
    Buttons = '<input type=button class="text"  value="Yes" onClick=CloseForm("Update") style="width:70px" />&nbsp;&nbsp;';
    Buttons += '<input type=button class="text" value="No" onClick=CloseForm("No") style="width:70px" />&nbsp;&nbsp;';
    //   Buttons += '<input type=button class="text" value="Cancel" onClick=CloseForm("Cancel") style="width:70px"/>&nbsp;&nbsp;';
    BodyText = '<font size=2 face="Arial, Helvetica, sans-serif">' + BodyText + '</font>';
    ModalOtherEncDialogShow("Dialog", BodyText, Buttons, EventHandler, 'Y');
}

// Added by Saravanan for the Calling the Zip popup function from the child folders windows

function efnShowZipDetailsMessageChild(BodyText, EventHandler, ZipCount) {
    
    var Buttons = '';
    Buttons = '<input type=button Class="cmdbutton" value="Yes" onClick=SelectOK("Yes")  />&nbsp;&nbsp;&nbsp;';
    Buttons += '<input type=button Class="cmdbutton" value="No" onClick="CloseWindow();" />&nbsp;';

    ModalZipDialogShowChild("Zip", BodyText, Buttons, EventHandler, ZipCount);
}

function ModalZipDialogShowChild(Title, BodyText, Buttons, EventHandler, ZipCount) {
  
    ModalDialogRemoveWatch();

    ModalDialog.eventhandler = EventHandler;

    var height = parseInt(ZipCount * 100) + 125;

    var args = 'width=450,height=240,left=325,top=300,toolbar=0,';
    args += 'location=0,status=0,menubar=0,scrollbars=0,resizable=0';

    ModalFocus = "Y";

    ModalDialogShowChild = window.open("", "Zip", args);

    ModalDialogShowChild.document.open();
    ModalDialogShowChild.document.write('<html>');
    ModalDialogShowChild.document.write('<head>');

    ModalDialogShowChild.document.write('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />');
    ModalDialogShowChild.document.write('<title>' + Title + '</title>');
    ModalDialogShowChild.document.write('<link rel="stylesheet" href="../App_Themes/FADTheme/StyleSheet.css">');
    ModalDialogShowChild.document.write('<script' + ' language=javaScript>');
    
    //ModalDialogWindow.document.write(' var sFocus=Y; ');
    //ModalDialogWindow.document.write('       ');
    // <reference path="../App_Themes/FADTheme/StyleSheet.css" />

    ModalDialogShowChild.document.write('function SelectRadio(val){var cnt=document.getElementById("reccount").value;for(var i=0;i<cnt;i++){if(val!=i){document.getElementById("rdSelect_"+i).checked=false}} }');
    ModalDialogShowChild.document.write('function SelectOK(val){var cnt=document.getElementById("reccount").value;var tCity="";var tState="";var tCounty="";for(var i=0;i<cnt;i++){if(document.getElementById("rdSelect_"+i).checked){');
    ModalDialogShowChild.document.write('var Zipval="";Zipval=document.getElementById("hidDataRow_"+i).value;window.opener.SetZipValues(Zipval);window.opener.ModalFocus="N";window.close(); }}}');
    ModalDialogShowChild.document.write('function CloseWindow(){ window.opener.SetZipEmpty();window.opener.ModalFocus="N";window.close();}');
    ModalDialogShowChild.document.write('</script>');
    ModalDialogShowChild.document.write('</head>');
    ModalDialogShowChild.document.write('<body onblur="window.focus();" onUnload="CloseWindow();" bgcolor="white"; style="padding:5px; align:center">');
    ModalDialogShowChild.document.write('<link rel="stylesheet" href="../App_Themes/FADTheme/StyleSheet.css">');
    ModalDialogShowChild.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2 bgcolor="White">');
    //ModalDialogWindow.document.write('<tr class="text"><td valign="top" ><img src="Images/pagehead-icon-2.gif" /><span class="heading-message">Zip Information</span><img src="Images/pagehead-pic.gif" width="30" height="6"/></td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogShowChild.document.write('<tr class="text"><td valign="top" ></td><td align=left valign="top">' + BodyText + '</td></tr>');
    ModalDialogShowChild.document.write('<tr><td>&nbsp;</td><td align=left><br></td></tr>');
    ModalDialogShowChild.document.write('<tr><td colspan="2"  align="center" >' + Buttons + '</td></tr>');
    ModalDialogShowChild.document.write('</body>');
    ModalDialogShowChild.document.write('</html>');
    ModalDialogShowChild.document.close();
    ModalDialogShowChild.focus();
    ModalDialogInterval = window.setInterval("ModalDialogZipMaintainFocusChild()", 5);
}


