﻿
/*
Computer Science Group, LLC
225-766-2397 office
225-205-0263 cell
darrell@computersciencegroup.com
Copyright © 2011 Computer Science Group, LLC, All rights reserved.
*/

//helpDragAndDrop_getFilterSystemApplicationVersions()
//helpDragAndDrop_showFilterSystemApplicationVersions()
//07/28/20111
function helpDragAndDrop_getFilterSystemApplicationVersions() { return top.dragAndDrop_get("filterSystemApplicationVersions40", new Array("csgDatePicker40")); }
function helpDragAndDrop_showFilterSystemApplicationVersions() { top.dragAndDrop_show(helpDragAndDrop_getFilterSystemApplicationVersions); }

//helpDragAndDrop_getFilterPartialClientList()
//helpDragAndDrop_showFilterPartialClientList()
//07/28/20111
function helpDragAndDrop_getFilterPartialClientList() { return top.dragAndDrop_get("filterPartialClientList40"); }
function helpDragAndDrop_showFilterPartialClientList() { top.dragAndDrop_show(helpDragAndDrop_getFilterPartialClientList); }

//helpDragAndDrop_getContactUs()
//helpDragAndDrop_showContactUs()
//07/28/20111
function helpDragAndDrop_getContactUs() { return top.dragAndDrop_get("contactUs40", new Array("firstName", "lastName", "email", "phoneAreaCode", "phoneExchange", "phoneLastFour", "subject", "note")); }
function helpDragAndDrop_showContactUs(opClearSubjectAndNote)
{
    if (opClearSubjectAndNote)
    {
        //09/07/2011 use dragAndDrop_setElementValue()
        var odd = helpDragAndDrop_getContactUs();
        dragAndDrop_setElementValue(odd, "subject", "");
        dragAndDrop_setElementValue(odd, "note", "");
    }
    top.dragAndDrop_show(helpDragAndDrop_getContactUs);
}

//helpDragAndDrop_getAbout()
//helpDragAndDrop_showAbout()
//07/28/20111
function helpDragAndDrop_getAbout() { return top.dragAndDrop_get("about40"); }
function helpDragAndDrop_showAbout() { top.dragAndDrop_show(helpDragAndDrop_getAbout); }

//helpDragAndDrop_getDatePicker()
//helpDragAndDrop_showDatePicker(<event>, <opPageNameToUpdate>, <opElementIdToUpdate>)
//07/22/2011 show datepicker in floating iframe
//07/22/2011 - set the properties pageNameToUpdate and elementToUpdate in the datepicker window
//event is defined when the image button is clicked so move the drag and drop window to the location of the button
//07/28/20111
function helpDragAndDrop_getDatePicker() { return top.dragAndDrop_get("csgDatePicker40"); }
function helpDragAndDrop_showDatePicker(event, opPageNameToUpdate, opElementIdToUpdate)
{
    top.dragAndDrop_show(helpDragAndDrop_getDatePicker);
    var odd = top.helpDragAndDrop_getDatePicker();
    if (odd)
    {
        if ((opPageNameToUpdate) && (opElementIdToUpdate))
        {
            {
                if (odd.iFrame)
                {
                    if (odd.iFrame.contentWindow)
                    {
                        //07/22/2011 - set the properties pageNameToUpdate and elementToUpdate in the datepicker window
                        odd.iFrame.contentWindow.pageNameToUpdate = opPageNameToUpdate;
                        odd.iFrame.contentWindow.elementToUpdate = opElementIdToUpdate;
                    }
                }
            }
        }
        if (event)
        {
            //07/25/2011 for some reason event.screenY is below by about 100px
            var oAdjust = 100;
            odd.outerDiv.style.top = (event.screenY - oAdjust) + "px";
            odd.outerDiv.style.left = event.screenX + "px";
//            odd.saveOuterDivPropertiesToHiddenFields();
        }
    }
}

//helpDragAndDrop_showLogin()
//07/28/20111
function helpDragAndDrop_getLogin() { return top.dragAndDrop_get("LogIn40"); }
function helpDragAndDrop_showLogin() { top.dragAndDrop_show(helpDragAndDrop_getLogin, "__userName"); }


//helpDragAndDrop_getExplorer()
//helpDragAndDrop_showExplorer()
//07/28/2011
function helpDragAndDrop_getExplorer() { return top.dragAndDrop_get("explorer40"); }
function helpDragAndDrop_showExplorer()
{
    top.dragAndDrop_show(helpDragAndDrop_getExplorer);
    var odd = top.helpDragAndDrop_getExplorer();
    if (odd)
    {
        //12/10/2010 do this so or the explorer will only render correctly
        //in compatibility mode
        if (odd.iFrame)
        {
            if (odd.iFrame.contentWindow)
            {
                if (odd.iFrame.contentWindow.resize) { odd.iFrame.contentWindow.resize(); }
            }
        }
    }
}
