// LDCC_Tabs.js

// ==============================================================================
// Copyright © 2001-2009, LDC Consulting (LDCC). All rights reserved.
// No part of this document may be reproduced, stored in a retrieval system, or
// transmitted in any form or by any means, electronic, mechanical, photocopying,
// recording, or otherwise, without the prior permission of LDCC.
// ==============================================================================

var blnResizeFrame;
var intChildHeight;

// ============================================================================

function LDCC_BodyResize () {

    if (blnFrame) intChildHeight = parent.intChildHeight - 20;
    else {
        if (typeof(window.innerWidth) == 'number') // Non-IE
          var WindowHeight = window.innerHeight + 11;
        else if (document.documentElement &&
          (document.documentElement.clientWidth ||
          document.documentElement.clientHeight))// IE 6+ standard compliant mode
            var WindowHeight = document.documentElement.clientHeight;
        else if (document.body && (document.body.clientWidth ||
          document.body.clientHeight)) // IE 4 compatible
             var WindowHeight = document.body.clientHeight;
        intChildHeight =
          WindowHeight - 95 - parseInt($('#FrameLogin').css('height'));
        }
    $('.TabLevel1').css('height', intChildHeight);
    $('.TabLevel2').css('height', (intChildHeight - 8));
    }

// ============================================================================

function LDCC_FrameShow (strFunctionName, strFunctionSource, blnShowDivider) {

alert('frame show');
/*
    if (strFunctionName != strActiveFunction) {
        $('#Tab' + strActiveFunction)
          .css({'color':'#000000', 'background-color':'#FFFFFF'});
        $('#Tab' + strFunctionName)
          .css({'color':'#FF8000', 'background-color':'#000000'});
        var objElement = document.getElementById('Frame' + strActiveFunction);
        objElement.style.visibility = 'hidden';
        objElement.style.height = '0';
        var objElement = document.getElementById('Frame' + strFunctionName);
        if (objElement.src == '') objElement.src = strFunctionSource;
        objElement.style.visibility = 'visible';
        strActiveFunction = strFunctionName;
        var blnShow = (arguments.length < 3) ? true : blnShowDivider;
        document.getElementById('buttonline').style.visibility =
          (blnShow == true) ? 'visible' : 'hidden';
        LDCC_BodyResize ();
        }
*/
    }

// ============================================================================

function LDCC_Tabs_Initialize () {

/*
    $('ul.TabButton').css({'margin':'0px 0px 3px'});
    $('ul.TabButton li a')
      .css({'color':'#000000', 'background-color':'#FFFFFF'})
      .mouseover(function() {LDCC_ReverseColor (this);})
      .mouseout(function() {LDCC_ReverseColor (this);});
    $('#Tab' + strActiveFunction)
      .css({'color':'#000000', 'background-color':'#FF8000'});
*/
    $('ul.ui-tabs li a')
      .mouseover(function() {LDCC_ReverseColor (this);})
      .mouseout(function() {LDCC_ReverseColor (this);});
/*
    $('ul.ui-tabs li')
      .mouseover(function() {LDCC_ReverseColor (this);})
      .mouseout(function() {LDCC_ReverseColor (this);});
*/
/*
    $('.ui-state-default')
      .mouseover(function() {LDCC_ReverseColor (this);})
      .mouseout(function() {LDCC_ReverseColor (this);});
*/
    }

// ============================================================================

function LDCC_ReverseColor (objColor) {

    var strColor = objColor.style.color;
    objColor.style.color = objColor.style.backgroundColor;
    objColor.style.backgroundColor = strColor;
    }