var selectedCount = 1;

function colorRow(clickObj, cpeBehaviorId) {
    $find(cpeBehaviorId).togglePanel();
    var row;
    var checkboxObj = clickObj;
    if (checkboxObj == null) {
        return;
    }
    //Row click
    if (clickObj.getAttribute('type') != 'checkbox') {
        var elements = clickObj.getElementsByTagName("input");
        checkboxObj = elements[0];
        if (checkBox == null) {
            checkboxObj.checked = !checkboxObj.checked;
        }
    }
    //Netscape does not implement parentElement
    row = checkboxObj.parentNode.parentNode.parentNode || checkboxObj.parentElement.parentElement.parentElement;
    if (checkboxObj.checked == true) {
        row.className += ' TravelPlannerResultsSelectedRow';

        //Show detailed generated area
        $get('DetailedGeneratedArea').style.display = '';
        
        //Increase selected number of rows
        selectedCount++;

        //Show detail area title
        $get('DetailedTitleArea').style.display = '';
    }
    else
    {
        var classArray=row.className.split(" ");
        row.className = classArray[0];
        
        //Hide detailed generated area
        $get('DetailedGeneratedArea').style.display = 'none';

        //Decrease selected number of rows
        selectedCount--;
        
        //Hide detail area title if no rows selected
        if (selectedCount == 0) {
            $get('DetailedTitleArea').style.display = 'none';
        }
    }
    checkBox = null;
}

checkBox = null;


function colorRowCheckBox(checkBoxObj)
{
    checkBox = checkBoxObj;
}


function iFrameHeight()
{
  h = document.body.scrollHeight;
  
  if(window.parent.document.all["IFR"]!=null)
  {
        window.parent.document.all["IFR"].height = h+20;
  }

}
