
var currentDialog;

function showLoginDialog_Global(Row1Data, Row2Data, Row3Data) {
    if (currentDialog) {
        return;
    } // end of if
    var htmlDialog = new YAHOO.widget.SimpleDialog("loginDlg", {
        width: "350px",
        height: "auto",
        fixedcenter: true,
        modal: true,
        draggable: false,
        underlay: "shadow",
        close: false
    });
    currentDialog = htmlDialog;

    var heading = "&nbsp;";
    var innerHTML = '<form method="post" action="#" onsubmit="return false;">\n';
    innerHTML += '  <div style="width:350px; height:auto;">\n';
    innerHTML += '  <div style="clear:both; font-size:15px; color:red;">\n';
    innerHTML += "  " + Row1Data + "\n";
    innerHTML += '  </div>\n';
    if (Row2Data != "") {
        innerHTML += '  <div style="clear:both;">\n';
        innerHTML += "  " + Row2Data + "\n";
        innerHTML += '  </div>\n';
    }
    if (Row3Data != "") {
        innerHTML += '  <div style="clear:both;">\n';
        innerHTML += "  " + Row3Data + "\n";
        innerHTML += '  </div>\n';
    }
    innerHTML += '  </div>\n';
    innerHTML += '</form>\n';

    htmlDialog.setHeader(heading);
    htmlDialog.setBody(innerHTML);
    //htmlDialog.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_INFO);

    htmlDialog.render(document.body);
    htmlDialog.show();
} // end of function showLoginDialog

function TermsDialog(ztid) {
    if (currentDialog) {
        return;
    } // end of if
    var htmlDialog = new YAHOO.widget.SimpleDialog("loginDlg", {
        width: "400px",
        height: "auto",
        fixedcenter: true,
        modal: true,
        draggable: false,
        underlay: "shadow",
        close: false
    });
    currentDialog = htmlDialog;

    var heading = "&nbsp;";
    var innerHTML = '<form method="post" action="#" onsubmit="return false;">\n';
    innerHTML += '  <div style="width:55px; float:right; padding-bottom:7px; border:solid 0px red;"><a href="javascript:" class="terms-con" onclick="hideDialog();" style="color:#E84679">[ CLOSE ]</a></div>';
    innerHTML += '  <div style="width:400px; padding:0; margin:0; text-align:left; height:500px; overflow:auto;">\n';
    innerHTML += document.getElementById('yTerms').innerHTML;
    innerHTML += '  </div>\n';
    innerHTML += '</form>\n';

    htmlDialog.setHeader(heading);
    htmlDialog.setBody(innerHTML);
    //htmlDialog.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_INFO);

    htmlDialog.render(document.body);
    htmlDialog.show();
} // end of function showLoginDialog 

hideDialog = function() {
    if (currentDialog) {
        currentDialog.hide();
        currentDialog = null;
    } // end of if
    if (this.hide) {
        this.hide();
        currentDialog = null;
    } // end of else
    currentDialog = null;
} // end of function hideDialog

