if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = [];
A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"16101", "zid":"372", "title":"少儿英语flash", "link":"###", "advtype":"F", "source":"[flash=1002,160]http://a4.yeshj.com/upload/200808/EN-A-B1F-16101_87.swf[/flash]", "adFormCode":"B1", "protected":false }]};A4page.Zone["B2"]={"zonecode":"B2",content:[{ "aid":"33455", "zid":"373", "title":"新世界新贝", "link":"http://www.neworldbaby.com/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200911/EN-A-B2P-33455_13.jpg", "adFormCode":"B2", "protected":false }]};A4page.Zone["B3"]={"zonecode":"B3",content:[{ "aid":"24904", "zid":"374", "title":"新概念少儿", "link":"http://www.neworldbaby.com/jnce/index.html", "advtype":"P", "source":"http://a4.yeshj.com/upload/200903/EN-A-B3P-24904_73.jpg", "adFormCode":"B3", "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"34214", "zid":"924", "title":"免费赠送青少儿英语课程", "link":"http://a8.yeshj.com/zt/efkids/spring.aspx", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"34211", "zid":"924", "title":"来参加我们的少儿活动吧>>", "link":"http://brand.hjenglish.com/1788/", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"34210", "zid":"924", "title":"好学又好玩的少儿英语乐园:)", "link":"http://brand.hjenglish.com/1788/", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"34209", "zid":"924", "title":"免费!少儿英语综合能力测评", "link":"http://brand.hjenglish.com/1788/", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false }]};A4page.Zone["S1"]={"zonecode":"S1",content:[{ "aid":"27119", "zid":"375", "title":"英孚少儿", "link":"http://a8.yeshj.com/zt/efkids/spring.aspx", "advtype":"P", "source":"http://a4.yeshj.com/upload/200904/EN-A-S1P-27119_51.gif", "adFormCode":"S1", "protected":false }]};A4page.Zone["S2"]={"zonecode":"S2",content:[{ "aid":"16105", "zid":"376", "title":"色拉英语", "link":"http://www.hjbook.net/tag/色拉英语/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200808/EN-A-S1P-16104_63.jpg", "adFormCode":"S2", "protected":false }]};
function show_a4_zone(zonecode)
{
if( typeof(A4page.Zone[zonecode]) == "undefined" ) return;
if(A4page.Zone[zonecode].content[0].advtype == "T"){
for (var i=0, post; post = A4page.Zone[zonecode].content[i]; i++) {
if(zonecode.substring(0,1) == "H")
document.write("" + post.title +" ");
else
document.write("" + post.title +"
");
}
} else if (A4page.Zone[zonecode].content[0].advtype == "P"){
if( A4page.Zone[zonecode].content.length == 1 ){
document.write("
");
}else{
for (var i=0, post; post = A4page.Zone[zonecode].content[i]; i++) {
document.write("
");
}
}
}else if (A4page.Zone[zonecode].content[0].advtype == "F"){
document.write(ConvertUbb(A4page.Zone[zonecode].content[0].source));
}
}
function ConvertUbb(Source){
//定义ubb转换参数
var flash_ubb = /\[flash=(\d*),(\d*)\](\S*)\[\/flash\]/igm;
var flash_html= "";
//执行转换
Source=Source.replace(flash_ubb, flash_html );
return Source;
}