﻿function MoreInformation(MatchID) {
    if (document.getElementById("R" + MatchID).className == "hidden-result") {
        var list = document.getElementsByName("R" + MatchID);
        if (list != null) {
            for (i = 0; i < list.length; i++) {
                list[i].className = list[i].className.replace("hidden-result", "visible-result");
            }
        }
        document.getElementById("I" + MatchID).src = "/images/up_arrow.gif";
        document.getElementById("I" + MatchID).alt = "Hide Details";
        document.getElementById("I" + MatchID).title = document.getElementById("I" + MatchID).alt;
    } else {
        var list = document.getElementsByName("R" + MatchID);
        if (list != null) {
            for (i = 0; i < list.length; i++) {
                list[i].className = list[i].className.replace("visible-result", "hidden-result");
            }
        }
        document.getElementById("I" + MatchID).src = "/images/down_arrow.gif";
        document.getElementById("I" + MatchID).alt = "Match Details";
        document.getElementById("I" + MatchID).title = document.getElementById("I" + MatchID).alt;
    }
}

function CreateGuid() {
    var guid = "";
    for (var i = 0; i < 32; i++)
        guid += parseInt(Math.random() * 16).toString(16);
    return guid;
}

function sendRequest(category, page) {
    var url;
    if (document.getElementById('ctl00_ContentPlaceHolder1_PageHidden').value == "scores") {
        url = "/updaters/SoccerUpdater.aspx?tm=" + CreateGuid() + "&cat=" + escape(document.getElementById('ctl00_ContentPlaceHolder1_CategoryHidden').value);
    }
    jQuery(document.getElementById('ctl00_ContentPlaceHolder1_updateDiv')).load(url);
}
function moveAds() {
    $("#hidden-left_side_4-ads a").appendTo('#left_side_4_ads');
    $("#hidden-left_side_1-ads a").appendTo('#left_side_1_ads');
    $("#hidden-left_side_2-ads iframe").appendTo('#left_side_2_ads');
    $("#hidden-left_side_3-ads #google_ads_div_left_side_3").appendTo('#left_side_3_ads');
    $("#hidden-left_side_5-ads #google_ads_div_left_side_5").appendTo('#left_side_5_ads');
    $("#hidden-top_score-ads #google_ads_div_top_score").appendTo('#top_score_ads');
    $("#hidden-top_score-ads iframe").appendTo('#top_score_ads')
//    $("#hidden-top_score-ads iframe").appendTo('#top_score_ads')
//    $("#hidden-top_score-ads a").appendTo('#top_score_ads')
//    $("#google_ads_div_top_score").appendTo('#top_score_ads')
}
