show_bse_52_week_high = function(){
    $('bse52weekhigh').style.display = "inline";
    $('bse52weeklow').style.display = "none";
}
show_bse_52_week_low = function(){
    $('bse52weeklow').style.display = "inline";
    $('bse52weekhigh').style.display = "none";
}
show_bse_volume_shockers = function(){
    $('bse_volume_shockers').style.display = "inline";
    $('bse_price_shockers').style.display = "none";
}
show_bse_price_shockers = function(){
    $('bse_volume_shockers').style.display = "none";
    $('bse_price_shockers').style.display = "inline";
}
show_tab_nse = function(){
    $('tab_nse').style.display = "inline";
    $('nse_tab_container').style.display = "inline";
    $('tab_bse').style.display = "none";
    $('bse_tab_container').style.display = "none";
}
show_tab_bse = function(){
    $('tab_nse').style.display = "none";
    $('nse_tab_container').style.display = "none";
    $('tab_bse').style.display = "inline";
    $('bse_tab_container').style.display = "inline";
}
// NSE
show_nse_52_week_high = function(){
    $('nse52weekhigh').style.display = "inline";
    $('nse52weeklow').style.display = "none";
}
show_nse_52_week_low = function(){
    $('nse52weeklow').style.display = "inline";
    $('nse52weekhigh').style.display = "none";
}
show_nse_volume_shockers = function(){
    $('nse_volume_shockers').style.display = "inline";
    $('nse_price_shockers').style.display = "none";
}
show_nse_price_shockers = function(){
    $('nse_volume_shockers').style.display = "none";
    $('nse_price_shockers').style.display = "inline";
}
topgainers = function(sType){
    if(sType == 'bse') {
        $('link_topgainer').className = "button_current";
        $('link_toplooser').className = "button";
        $('link_mostavtivevol').className = "button";

        $('id_bse_topgainers').style.display = "inline";
        $('id_bse_toplooser').style.display = "none";
        $('id_bse_mostactivevol').style.display = "none";
    }else{
        $('link_topgainer_nse').className = "button_current";
        $('link_toplooser_nse').className = "button";
        $('link_mostavtivevol_nse').className = "button";

        $('id_nse_topgainers').style.display = "inline";
        $('id_nse_toplooser').style.display = "none";
        $('id_nse_mostactivevol').style.display = "none";
    }
    $('id_myportfolio').style.display = 'none';
}
toplooser = function(sType){
    if(sType == 'bse') {
        $('link_topgainer').className = "button";
        $('link_toplooser').className = "button_current";
        $('link_mostavtivevol').className = "button";

        $('id_bse_topgainers').style.display = "none";
        $('id_bse_toplooser').style.display = "inline";
        $('id_bse_mostactivevol').style.display = "none";
    }else{
        $('link_topgainer_nse').className = "button";
        $('link_toplooser_nse').className = "button_current";
        $('link_mostavtivevol_nse').className = "button";

        $('id_nse_topgainers').style.display = "none";
        $('id_nse_toplooser').style.display = "inline";
        $('id_nse_mostactivevol').style.display = "none";
    }
$('id_myportfolio').style.display = 'none';
}
mostavtivevol = function(sType){
    if(sType == 'bse') {
        $('link_topgainer').className = "button";
        $('link_toplooser').className = "button";
        $('link_mostavtivevol').className = "button_current";

        $('id_bse_topgainers').style.display = "none";
        $('id_bse_toplooser').style.display = "none";
        $('id_bse_mostactivevol').style.display = "inline";
    }else{
        $('link_topgainer_nse').className = "button";
        $('link_toplooser_nse').className = "button";
        $('link_mostavtivevol_nse').className = "button_current";

        $('id_nse_topgainers').style.display = "none";
        $('id_nse_toplooser').style.display = "none";
        $('id_nse_mostactivevol').style.display = "inline";
    }
    $('id_myportfolio').style.display = 'none';
}
show_top_perfrm_nse = function(){
    $('id_top_perfrm_bse').style.display = "none";
    $('id_top_perfrm_nse').style.display = "inline";

    $('top_performar_bse_tab').style.display = "none";
    $('top_performar_nse_tab').style.display = "inline";
}
show_top_perfrm_bse = function(){
    $('id_top_perfrm_bse').style.display = "inline";
    $('id_top_perfrm_nse').style.display = "none";
    $('top_performar_bse_tab').style.display = "inline";
    $('top_performar_nse_tab').style.display = "none";
}
market_commentary = function(){
    $('commentary_market').style.display = 'inline';
    $('commentary_mf').style.display = 'none';
    $('commentary_commodities').style.display = 'none';
}
mf_commentary = function(){
    $('commentary_market').style.display = 'none';
    $('commentary_mf').style.display = 'inline';
    $('commentary_commodities').style.display = 'none';
}
commodities_commentary = function(){
    $('commentary_market').style.display = 'none';
    $('commentary_mf').style.display = 'none';
    $('commentary_commodities').style.display = 'inline';
}
lateststory = function(){
    $('id_latest_story').style.display = 'inline';
    $('id_corp_announce').style.display = 'none';

}
corp_announcements = function(){
    $('id_latest_story').style.display = 'none';
    $('id_corp_announce').style.display = 'inline';
}
myportfolio = function(){
    $('id_myportfolio').style.display = 'inline';

    $('id_bse_topgainers').style.display = "none";
    $('id_bse_toplooser').style.display = "none";
    $('id_bse_mostactivevol').style.display = "none";

    $('id_nse_topgainers').style.display = "none";
    $('id_nse_toplooser').style.display = "none";
    $('id_nse_mostactivevol').style.display = "none";

}
getStock = function(sUrl, sStockType){
    $('head_cnx500').className = "inactive";
    $('head_cnxit').className = "inactive";
    $('head_nifty').className = "inactive";
    $('head_sensex').className = "inactive";
    $('head_bse_smallcap').className = "inactive";
    $('head_bse_midcap').className = "inactive";

    if(sStockType == "SENSEX") {
        $('head_sensex').className = "currentli";
    }else if (sStockType == "BANK_NIFTY"){
        $('head_nifty').className = "currentli";
    }else if(sStockType == "CNX500") {
        $('head_cnx500').className = "currentli";
    }else if(sStockType == "CNXIT") {
        $('head_cnxit').className = "currentli";
    }else if(sStockType == "BSE_SMALLCAP") {
        $('head_bse_smallcap').className = "currentli";
    }else if(sStockType == "BSE_MIDCAP") {
        $('head_bse_midcap').className = "currentli";
    }
    new Ajax.Updater('stock_container', sUrl+'stock_type.php?stocktype='+sStockType+'', { method: 'get' });
}
