﻿// JScript File
function tabMouseOver(objTab, iTab)
{
    if (objTab.className == 'tabUnselected')
    {
        //Change Mouse Pointer
       objTab.style.cursor = 'pointer';
       
       //Change Background
       objTab.className = 'tabOver';
    }
}

function tabMouseOut(objTab, iTab)
{
    if (objTab.className == 'tabOver')
    {
        //Change Mouse Pointer
       objTab.style.cursor = 'default';
       
       //Change Background
       objTab.className = 'tabUnselected';
    }
}

function tabMouseClick(objTab, iTab)
{
    var strOtherTab;
    var strThisContent;
    var strOtherContent;

    if (iTab == 1)
    {
        strThisContent = 'ctl00_ContentPlaceHolder1_divTabCn_1';
        strOtherContent = 'ctl00_ContentPlaceHolder1_divTabCn_2';
    }
    else
    {
        strThisContent = 'ctl00_ContentPlaceHolder1_divTabCn_2';
        strOtherContent = 'ctl00_ContentPlaceHolder1_divTabCn_1';
    }
    
    resetTabs(objTab); 

    //Hide Other Content
    var otherContent = document.getElementById(strOtherContent);
   
    if (otherContent != null)
    {
        otherContent.style.display = 'none';
    }
    
    //Show Our Content
    var currentContent = document.getElementById(strThisContent);
    
    if (currentContent != null)
    {
        currentContent.style.display = 'block';
    }
    
    //Reload iFrame
    if (window.onload != null)
    {
        window.onload();
    }
    
    //Change This Tab To Selected
    objTab.className = 'tabSelected';
}

function resetTabs(objTab)
{
    var objParent = objTab.parentNode;
    var children = objParent.childNodes;

     // Loop through the children
     for(var c=0; c < children.length; c++) {
      children[c].className = 'tabUnselected';
     }


}


