﻿function TabSelected(obj)
{
    for (var i=0;i<topTabs.length;i++) 
    {
        if (topTabs[i] != obj)
        {
            var selectedTab = document.getElementById(topTabs[i] + "Tab");
            selectedTab.setAttribute("class", "");
            selectedTab.setAttribute("className", ""); 
            
        }
        else
        {
            var selectedTab = document.getElementById(obj + "Tab");
            selectedTab.setAttribute("class", "selected");
            selectedTab.setAttribute("className", "selected"); 
        }
    } 
}
function SwitchTopTab(obj)
{
    switch (obj)
    {
        case "hom":
            {               
            window.location='/default.aspx';
            break;
            }
        case "tra":
            {               
            window.location='/campaign/';
            break;
            }
        case "hel":
            {               
            window.location='/demo.aspx';
            break;
            }
        case "acc":
            {                
            if (anonymous=='yes')
            {
                window.location='/trial.aspx';
            }
            else
            {
                window.location='/member/default.aspx';
            }
            break;
            }
        case "pri":
            {                
            window.location='/signup.aspx';
            break;
            }
        default:
            {               
            window.location='/member/research.aspx';
            break;
            }
    }
}
function CheckNumericKeyInfo($char, $mozChar) 
{
    if($mozChar != null) 
    { // Look for a Mozilla-compatible browser
        if(($mozChar >= 48 && $mozChar <= 57)|| $mozChar == 0 || $mozChar == 8 || $mozChar == 13) 
            $RetVal = true;
        else 
        {
            
            $RetVal = false;
        }
    }
    else 
    { // Must be an IE-compatible Browser
        if(($char >= 48 && $char <= 57)|| $char == 13 || $char == 0 || $char == 8) 
            $RetVal = true;
        else 
        {
            $RetVal = false;
        }
    }
    return $RetVal;
} 