﻿//-------------------------------------------------------------------------------------------------------------------->
//  This JavaScript highlights the GridView Rows and provide Redirects upon request.
//-------------------------------------------------------------------------------------------------------------------->
var orgBackColor, orgForeColor, orgCursor;

function HighLightRow(state) {
    el = window.event.srcElement.parentElement;
    //    if (el.innerHTML.indexOf("<table>") == -1) { el = el.parentElement; }
    //    if (el.innerHTML.indexOf("<tr>") == -1) { el = el.parentElement; }
    //    if (el.innerHTML.indexOf("<td>") == -1) { el = el.parentElement; }

    if (state == 1) {
        // Save Original Colors
        orgBackColor = el.style.backgroundColor;
        orgForeColor = el.style.color;
        orgCursor = el.style.cursor;

        // Set New Colors
        el.style.backgroundColor = "#ffc775"; //"#f5ae36";
        el.style.cursor = "pointer";
    }
    else if (state == 2) {
        // Save Original Colors
        orgBackColor = el.style.backgroundColor;
        orgForeColor = el.style.color;
        orgCursor = el.style.cursor;

        // Set New Colors
        el.style.backgroundColor = "#ffdeae";
        el.style.cursor = "pointer";
    }
    else {
        // Restore Original Colors
        el.style.backgroundColor = orgBackColor;
        el.style.color = orgForeColor;
        el.style.cursor = orgCursor;
    }
}
//-------------------------------------------------------------------------------------------------------------------->
function SelectRow(sLink) { window.location = sLink; }
//-------------------------------------------------------------------------------------------------------------------->
//  Controls the MouseOver Effects on various parts.
//-------------------------------------------------------------------------------------------------------------------->
function IB_Over(id) { document.getElementById(id).style.display = 'block'; }
function IB_Out(id) { document.getElementById(id).style.display = 'none'; }
function IB_Redirect(id) { window.location = "/" + id.toLowerCase() + ".aspx"; }
//-------------------------------------------------------------------------------------------------------------------->
//function Feat_Over(id)
//{
//    for (i = 1; i < 9; i++)
//    { 
//        document.getElementById('Div' + i).style.display = 'none';
//        document.getElementById('T_Div' + i).style.display = 'none';
//    }

//    //var el = document.getElementById(id); el.style.display = 'block';
//    document.getElementById(id).style.display = 'block';
//    document.getElementById('T_' +id).style.display = 'block';
//}
////-------------------------------------------------------------------------------------------------------------------->
