﻿//6070 Set UP-->
function Door6070Status() {
    //Clear common properties
    $get('rhtMidBar').style.visibility = 'hidden';
    $get('sliderIndicatorMidRht').style.visibility = 'hidden';
    $get(currCtlDepth + 'chBxmidRailRht1').checked = false;
    $get(currCtlDepth + 'doorMidRailRht').innerHTML = 'NONE';
    $get(currCtlDepth + 'boundMidRht1').style.visibility = 'hidden';
    $get(currCtlDepth + 'lblFractsliderExtDoorWidthValue').innerHTML = '';
    var currHeight = $get(sliderDoorHeightClientID).innerHTML;
    var currWidth = $get(sliderDoorWidthClientID).innerHTML;
    var doorFractHeight = $get(currCtlDepth + 'lblDoorFracHeight').innerHTML;
    var doorFractWidth = $get(currCtlDepth + 'lblFractsliderExtDoorWidthValue').innerHTML;
    //Reset the door swing to start origional 
    //values when door is being updated
    ResetDoorSwing();
    //

    var ddlCurrTransPos = $get(currCtlDepth + 'ddlTransPos');
    var currTransPosIndex = ddlCurrTransPos.selectedIndex;

    if (currDoorIs6070) {
        //
        if (currTransPosIndex == 3) {
            $get('tranSomeWrap').style.width = '91px';
            $get('rhtTransImg').style.marginLeft = '-5.4em';
            $get('rhtTransImg').style.marginRight = '5.4em';
        }
        //
        $get('rightSideSwingH').style.visibility = 'hidden';
        $get('leftSideSwingH').style.visibility = 'hidden';
        //$get('imgCurrDoorType').src = '../images/siteparts/gen/39x75-3070.png';
        $get(currCtlDepth + 'doorType').innerHTML = 'Standard 3070';
        $get(currCtlDepth + 'hdnDoorType').value = 'Standard 3070';
        $get(sliderDoorWidthClientID).innerHTML = currWidth;
        $get(sliderDoorHeightClientID).innerHTML = currHeight;
        $get(currCtlDepth + 'lblDoorFracHeight').innerHTML = doorFractHeight;
        $get(sliderDoorFractWidthValue).innerHTML = doorFractWidth;
        $get(currCtlDepth + 'frameWidth').innerHTML = currWidth;
        $get(currCtlDepth + 'frameHeight').innerHTML = currHeight + ' ' + doorFractHeight;
        $get(currCtlDepth + 'hdnFrameWidth').value = currWidth;
        $get(currCtlDepth + 'hdnFrameHeight').value = currHeight + ' ' + doorFractHeight;
        $get('door3070Mask').style.visibility = 'visible';
        $get('midLblRht6070Door').style.visibility = 'hidden';
        $get(currCtlDepth + 'chBxmidRailRht1').style.visibility = 'hidden';
        $get('midLblLft6070Door').innerHTML = 'Add';
        $get('divBtmDoorMeasureExtWrap').style.width = '9em';
        $get('btmDoorMesCtlWrap').style.width = '9em';
        $get('doorSwingRhtWrapp').style.visibility = 'hidden';
        $get('doorSwingLftTxt').innerHTML = 'Door Swing';
        //$get('btnChageDoorType').value = 'Make Door Exactly 6070';
        //$get('currExactDoor').innerHTML = 'Door is exactly 3070';
        //$get('currExactDoor').style.visibility = 'visible';
        //

        var sliderDoorWidth = $find('sliderExtDoorWidth');
        sliderDoorWidth._railElement.style.width = '49px';
        sliderDoorWidth._length = '50px';


        var sliderDoorFractWidth = $find('sliderExtDoorFractWidth');
        sliderDoorFractWidth._railElement.style.width = '30px';
        //
        sliderDoorFractWidth._maxium = 30;
        sliderDoorWidth._maximum = 49;

        currDoorIs6070 = false;
    } else {
        //
        if (currTransPosIndex == 3) {
            $get('tranSomeWrap').style.width = '185px';
            $get('rhtTransImg').style.marginLeft = '-2em';
            $get('rhtTransImg').style.marginRight = '2em';
        }    //
        if (currWidth == '49') {

            $get('rightSideSwingH').style.visibility = 'visible';
            $get('leftSideSwingH').style.visibility = 'visible';
            //$get('imgCurrDoorType').src = '../images/siteparts/gen/65x75-6070.png';
            $get(currCtlDepth + 'doorType').innerHTML = 'Standard 6070';
            $get(currCtlDepth + 'hdnDoorType').value = 'Standard 6070';
            $get(sliderDoorWidthClientID).innerHTML = currWidth;
            $get(sliderDoorHeightClientID).innerHTML = currHeight;
            $get(currCtlDepth + 'lblDoorFracHeight').innerHTML = doorFractHeight;
            $get(sliderDoorFractWidthValue).innerHTML = doorFractWidth;
            $get(currCtlDepth + 'frameWidth').innerHTML = currWidth;
            $get(currCtlDepth + 'frameHeight').innerHTML = currHeight + ' ' + doorFractHeight;
            $get(currCtlDepth + 'hdnFrameWidth').value = currWidth;
            $get(currCtlDepth + 'hdnFrameHeight').value = currHeight + ' ' + doorFractHeight;
            $get('door3070Mask').style.visibility = 'hidden';
            $get('midLblRht6070Door').style.visibility = 'visible';
            $get(currCtlDepth + 'chBxmidRailRht1').style.visibility = 'visible';
            $get('midLblLft6070Door').innerHTML = 'Left';
            $get('divBtmDoorMeasureExtWrap').style.width = '18em';
            $get('btmDoorMesCtlWrap').style.width = '18em';
            $get('doorSwingRhtWrapp').style.visibility = 'visible';
            $get('doorSwingLftTxt').innerHTML = 'Left Swing';
            //$get('btnChageDoorType').value = 'Make Door Exactly 3070'
            //$get('currExactDoor').innerHTML = 'Door is exactly 6070';
            //$get('currExactDoor').style.visibility = 'visible';
            //

            var sliderDoorWidth = $find
                ('sliderExtDoorWidth');
            sliderDoorWidth._railElement.style.width = '150px';

            var sliderDoorFractWidth = $find('sliderExtDoorFractWidth');
            sliderDoorFractWidth._railElement.style.width = '100px';

            sliderDoorFractWidth._maxium = 50;
            sliderDoorWidth._maximum = 49;
            //
            sliderDoorWidth._maximum = 108;

            currDoorIs6070 = true;
        }
        //
    }
    //Transom

    var tranPos0 = $get(currCtlDepth + 'ddlTransPos').selectedIndex == 0;
    if (tranPos0) {
        if (currDoorIs6070) {
            $get('tranSomeWrap').style.width = '190px';
            $get('rhtTransImg').style.marginLeft = '-2.1em';
            $get('rhtTransImg').style.marginRight = '2em';
        }
        else {
            $get('tranSomeWrap').style.width = '90px';
            $get('rhtTransImg').style.marginLeft = '-5.5em';
            $get('rhtTransImg').style.marginRight = '5.4em';
        }
    }
}