/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

// JavaScript Document
var delay_hide=500;
var activeid=1;

function gmobj(o){
    if(document.getElementById){
        m=document.getElementById(o);
    }
    else if(document.all){
        m=document.all[o];
    }
    else if(document.layers){
        m=document[o];
    }
    return m;
}

function resetit(){
    delayhide=setTimeout("writeCurrentMenu()",delay_hide);
}

function clear_delayhide(){
    if (window.delayhide)
        clearTimeout(delayhide)
}

function reWriteMenu() {
    delayhide=setTimeout("writeCurrentMenu()",delay_hide);
}

function writeBlank(i) {
    var strHTML = '';
    for(var j=1; j<=i; j++){
        strHTML = strHTML.concat('&nbsp;');
    }
    return strHTML;
}



// Introduction Menu////

function writeMenuBlank(dt,i){

    gmobj("qbv.menu"+activeid).style.color="#FFFFFF";
    dt.style.color = "#e7b64a";
    activeid = i;
    gmobj("parent-menu").innerHTML = "";
}

function writeBlank(){
    gmobj("parent-menu").innerHTML = "";
}

function writeParentMenuIntro(str) {

    var strTitle = '';
    strTitle = strTitle + '<div><ul>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/gioithieucongty.football">Giới thiệu công ty</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/gioithieuwebsite.football">Giới thiệu website</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/gioithieu_game.football">Giới thiệu trò chơi</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/dieukhoanthoathuansudungdichvu.football">Thỏa thuận sử dụng </a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/chinhsachdieuhanh.football">Chính sách điều hành</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/nguyentacdatten.football">Nguyên tắc đặt tên</a></li>';
    strTitle = strTitle + '</ul></div>';
    gmobj("parent-menu").innerHTML = strTitle;
}

function writeParentMenuNews(str) {

    var strTitle = '';
    strTitle = strTitle + '<div><ul>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/tintuc/tinPremierLeague.football">Tin Premier League</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/tintuc/tinLaLiga.football">Tin La Liga</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/tintuc/tinSerieA.football">Tin Serie A</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/tintuc/tinbongdatrongnuoc.football">Bóng đá trong nước</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/lichthidau.football">Lịch thi đấu</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/ketqua.football">Kết quả</a></li>';
    strTitle = strTitle + '</ul></div>';
    gmobj("parent-menu").innerHTML = strTitle;
}
function writeParentMenuGame(str) {

    var strTitle = '';
    strTitle = strTitle + '<div><ul>';    
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/luatchoi.football">Giới thiệu luật chơi</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/huongdandangky.football">Hướng dẫn đăng ký</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/huongdan.football">Hướng dẫn chơi</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/giaithuong.football">Giải thưởng</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/member/myteam/myteam.football">Đội bóng</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/gocchuyengia/gocchuyengia.football">Góc chuyên gia</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="' + str + '/quabongvang/general/faq.football">FAQs</a></li>';
    strTitle = strTitle + '</ul></div>';
    gmobj("parent-menu").innerHTML = strTitle;
}
function writeParentMenuLib(str) {

    var strTitle = '';
    strTitle = strTitle + '<div><ul>';
    strTitle = strTitle + '<li><a href="#">Hồ sơ cầu thủ</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="#">Hồ sơ đội bóng</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="#">Giải đấu-Giải thưởng</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="#">Các tổ chức</a></li><li class="sep">|</li>';
    strTitle = strTitle + '<li><a href="#">Huyền thoại bóng đá</a></li>';
    strTitle = strTitle + '</ul></div>';
    gmobj("parent-menu").innerHTML = strTitle;
}

function share_twitter() {
    u = location.href;t = document.title;window.open("http://twitter.com/home?status=" + encodeURIComponent(u));
}
function share_facebook() {
    u = location.href;t = document.title;window.open("http://www.facebook.com/share.php?u=" + encodeURIComponent(u) + "&t=" + encodeURIComponent(t));
}
function share_google() {
    u = location.href;t = document.title;window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + encodeURIComponent(u) + "&title=" + t + "&annotation=" + t);
}
function share_buzz() {
    u = location.href;t = document.title;window.open("http://buzz.yahoo.com/buzz?publisherurn=Phut91.vn&targetUrl=" + encodeURIComponent(u));
}
function share_myspace() {
    u = location.href;t = document.title;window.open("http://www.myspace.com/index.cfm?fuseaction=postto&amp;u=" + encodeURIComponent(u));
}