﻿//head ad
function getHeadAd_750x70() {
	getRadioLogoFlash();
    //document.write("<a href='/Special/2008Car.aspx'><img src='/Themes/Images/20089/2008Car-750x70.jpg' alt='点击进入' /></a>");
    //</script language="javascript" type="text/javascript" src="/Themes/Js/Index_ad_750x70.js"></script>
}

function getAd_750x70() {
     document.write("<a href='/Special/Text/1140/default.aspx'><img src='/Themes/Images/20091/yldtjsgz-750x70.jpg' alt='点击进入玉林电台技术改造' /></a>");
 }

//head ad
function getHeadAd_200x70() {
    document.write("<a href='/AudioOnDemand/default.aspx'><img src='/Themes/Images/AudioOnDemand/aod.gif' alt='节目点播' /></a>");

}

//body ad
function getBodyAd_200x70() {
    document.write("<a href='Details/101/1162/default.aspx'><img src='/Themes/Images/200810/rss.jpg' alt='RSS订阅' /></a>");
}

//body ad

//图片自动切换开始
//注释下一行即可取消
var imageId = 1;

function getBodyAd_428x120() {    
    var obj = document.getElementById("BodyAd_428x120");
    
    if (imageId >= 3)//2个
        imageId = 1;

    if (imageId == 1) {
        obj.innerHTML = "<a href='/Special/Static2009SpringFestival.aspx' target='_blank'><img src='/Themes/Images/20091/2009-Spring-Festival.jpg' alt='2009恭贺新春' /></a>";
        imageId += 1;
    }
    else if (imageId == 2) {
        obj.innerHTML = "<a href='/Special/Text/1145/default.aspx' target='_blank'><img src='/Themes/Images/20091/ds-428x120.jpg' alt='抵制低俗之风' /></a>";
        imageId += 1;
    }
    else if (imageId == 3) {
        //obj.innerHTML = "<a href='http://www.yldt.com/Details/103/1272/default.aspx' target='_blank'><img src='/Themes/Images/200811/wwjxxyy.jpg' alt='CCTV—4《直播广西》网络征集活动' /></a>";
        imageId += 1;
    }
    //注释下一行即可取消
    //setTimeout('getBodyAd_428x120()', 6000);
}

function getBodyAd_428x120_11() {

    var imageNum = 2;

    if (imageNum == 1) return;

    if (imageId > imageNum)//3个
        imageId = 1;

    for (var id = 1; id <= imageNum; id++) {
        var divId = 'BodyAd_428x120_' + id.toString();

        if (id == imageId) {
            try { document.getElementById(divId).style.display = "block" }
            catch (e) { };

        } else {
            try { document.getElementById(divId).style.display = "none" }
            catch (e) { };
        }
    }
    imageId += 1;

    setTimeout('getBodyAd_428x120_11()', 6000);
}

//foot ad
function getFootAd()
{ }


//中秋节
function getBodyAd_200x70_1() {
    document.write("<a href='/Details/121/778/default.aspx'><img src='/Themes/Images/20089/mid-autumn.jpg' alt='中秋节日快乐' /></a>");
}

//国庆节
function getBodyAd_200x70_2() {
    document.write("<a href='/Details/121/777/default.aspx'><img src='/Themes/Images/20089/2008101.jpg' alt='国庆节节日快乐' /></a>");
}

//神舟七号
function getBodyAd_428x120_1() {
    document.write("<a href='/More/1105/default.aspx'><img src='/Themes/Images/20089/shen7-428x120.jpg' alt='神舟七号' /></a>");
    document.write("<a href='/More/1110/default.aspx'><img src='/Themes/Images/200810/sme-expo-428x120.jpg' alt='2008玉博会' /></a>");
}

//广州第六届车展
function getAd_750x70_1() {
     document.write("<a href='/Special/Gz6thCarShow.aspx?cid=1120'><img src='/Themes/Images/200811/gx6thcarshow.jpg' alt='点击进入' /></a>");
}

//你的故事我演绎
function getYouPlayer() {
    document.write("<!--[if !IE]> <-->");
    document.write(" <object data='/Themes/Flash/20089/you_player_400x72.swf' width='400' height='72'");
    document.write(" type='application/x-shockwave-flash'>");
    document.write("<param name='quality' value='high' />");
    document.write("<param name='bgcolor' value='#ffffff' />");
    document.write("<param name='pluginurl' value='http://www.adobe.com/go/getflashplayer/' />");
    document.write(" FAIL (the browser should render some flash content, not this).");
    document.write("</object>");
    document.write(" <!--> <![endif]-->");
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9.0.124.0'");
    document.write("width='400' height='72'>");
    document.write("<param name='movie' value='/Themes/Flash/20089/you_player_400x72.swf' />");
    document.write("<param name='quality' value='high' />");
    document.write("<param name='bgcolor' value='#FFFFFF' />");
    document.write("</object>");
}

//办看得见的广播，做有声有色的电台
function getRadioLogoFlash() {
    document.write("<!--[if !IE]> <-->");
    document.write(" <object data='/Themes/Flash/20089/radio_logo_960x70.swf' width='750' height='70'");
    document.write(" type='application/x-shockwave-flash'>");
    document.write("<param name='quality' value='high' />");
    document.write("<param name='bgcolor' value='#ffffff' />");
    document.write("<param name='pluginurl' value='http://www.adobe.com/go/getflashplayer/' />");
    document.write(" FAIL (the browser should render some flash content, not this).");
    document.write("</object>");
    document.write(" <!--> <![endif]-->");
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9.0.124.0'");
    document.write("width='750' height='70'>");
    document.write("<param name='movie' value='/Themes/Flash/20089/radio_logo_960x70.swf' />");
    document.write("<param name='quality' value='high' />");
    document.write("<param name='bgcolor' value='#FFFFFF' />");
    document.write("</object>");
}

//图片出错处理
function imageOnerror(theImage) {
    theImage.src = "/Themes/Images/General/imageonerror.gif";
}

function getToday() {
    var date = new Date();
    var day = date.getDay();
    var dayToString = "";

    if (day == 0)
        dayToString = "日";
    if (day == 1)
        dayToString = "一";
    if (day == 2)
        dayToString = "二";
    if (day == 3)
        dayToString = "三";
    if (day == 4)
        dayToString = "四";
    if (day == 5)
        dayToString = "五";
    if (day == 6)
        dayToString = "六";

    document.write("今天是：" + date.toLocaleDateString() + " 星期" + dayToString);
}

function getAodNews() {
    var date = new Date();
    var openUrl = "/AudioOnDemand/Program/1/";
    openUrl += date.getFullYear().toString() + "-" + (date.getMonth() + 1).toString() +
         "-" + date.getDate().toString() + "/";
    openUrl += date.getFullYear().toString() + "-" + (date.getMonth() + 1).toString() +
         "-" + (date.getDate() - 7).toString() + "/";
    openUrl += "default.aspx";
    window.open(openUrl);

}