﻿// JScript File
var selTab = 0;

function gmobj(e) { return document.getElementById(e); }
function toTab(i)
{
    if (i == selTab) return;
    gmobj("tab" + selTab).className = "Title";
    gmobj("tab" + i).className = "Selected";
    gmobj("imgTabs").src = (i == 0) ? "Images/tab_lt.gif" : "Images/tab_bt.gif";
    gmobj("tblTabs" + selTab).style.display = "none";
    gmobj("tblTabs" + i).style.display = "";
    selTab = i;
}
//function LoadFrame(i)
//{
//             switch (i) {
//		            case 1: 
//		                return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Default.aspx?IdMenu=home";
//		            case 2: 
//		                return window.top.document.getElementById("Frame").contentWindow.document.location.href = "TipToday.aspx?IdMenu=today";
//                    case 3:
//                        return window.top.document.getElementById("Frame").contentWindow.document.location.href = "ViewTipPayment.aspx?IdMenu=chuyengia";
//		            case 4:  
//		                return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Schedule.aspx?IdMenu=Schedule";
//	                case 5:  
//	                   return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Result.aspx?IdMenu=Result";
//	                case 6:  
//	                    return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Cauvang.aspx?IdMenu=Tiptonghop";
//	                case 7:  
//	                    return window.top.document.getElementById("Frame").contentWindow.document.location.href = "MatchToday.aspx?IdMenu=Matchtoday";
//	                case 8:  
//	                    return window.top.document.getElementById("Frame").contentWindow.document.location.href = "FAQ.aspx?IdMenu=FAQ";
//                    case 9:  
//	                    return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Help.aspx?IdMenu=Help";
//	                    case 10:  
//	                    return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Feeback.aspx?IdMenu=Feeback";
// 		            default:   return window.top.document.getElementById("Frame").contentWindow.document.location.href = "Default.aspx";
//	            }
//}
function LoadFrame(i)
{
             switch (i) {
		            case 1: 
		                return window.top.document.location.href = "Default.aspx?IdMenu=home";
		            case 2: 
		                return window.top.document.location.href = "TipToday.aspx?IdMenu=today";
                    case 3:
                        return window.top.document.location.href = "ViewTipPayment.aspx?IdMenu=chuyengia";
		            case 4:  
		                return window.top.document.location.href = "Schedule.aspx?IdMenu=Schedule";
	                case 5:  
	                   return window.top.document.location.href = "Result.aspx?IdMenu=Result";
	                case 6:  
	                    return window.top.document.location.href = "Cauvang.aspx?IdMenu=Tiptonghop";
	                case 7:  
	                    return window.top.document.location.href = "Rule.aspx?IdMenu=Rule";
	                case 8:  
	                    return window.top.document.location.href = "FAQ.aspx?IdMenu=FAQ";
                    case 9:  
	                    return window.top.document.location.href = "Help.aspx?IdMenu=Help";
	                    case 10:  
	                    return window.top.document.location.href = "Feeback.aspx?IdMenu=Feeback";
 		            default:   return window.top.document.location.href = "Default.aspx";
	            }
}


function MenuInit(){    
    var menu = document.getElementById('nav');
    var currentSelected = document.getElementById("currentSelected");
   
    for (var i = 0 ; i < menu.length; i++)
    {
        if(i!=0 && i!= menu.length-1 && menu[i].id != currentSelected.value)
        {
            menu[i].className="";
        }
        else 
        {
            if(i!=0 && i!= menu.length-1)
            {
                menu[i].className="MenuHeaderSelect";                
            }
        }
    }
  
}