if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = [];
A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"10292", "zid":"150", "title":"好听在沪江", "link":"http://bulo.hjenglish.com/group/music8/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200802/TS-X-B1P-10292_68.jpg", "adFormCode":"B1", "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"32305", "zid":"449", "title":"沪江网校,让学习变成一种爱好", "link":"http://class.yeshj.com/zt/en/?source=147", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false }]};A4page.Zone["S1"]={"zonecode":"S1",content:[{ "aid":"27562", "zid":"611", "title":"夏令营", "link":"http://zt.yeshj.com/zt/2009/summer/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200904/TS-X-S1P-27562_96.jpg", "adFormCode":"S1", "protected":false }]};A4page.Zone["Z1"]={"zonecode":"Z1",content:[{ "aid":"25763", "zid":"762", "title":"60个单词拿下办公室英语", "link":"http://cnap.englishtown.com/Sp/Landing/default.aspx?ctr=cn&lng=cs&v=2&kwid=95024&cfid=82589&v=2&etag=A67000061FE", "advtype":"T", "source":"", "adFormCode":"Z1", "protected":false }]};A4page.Zone["Z2"]={"zonecode":"Z2",content:[{ "aid":"25764", "zid":"763", "title":"英语小测:一见钟情怎么说?", "link":"http://cnap.englishtown.com/Sp/Landing/default.aspx?ctr=cn&lng=cs&kwid=85341&cfid=84219&tyid=84223&etag=A67000024FE", "advtype":"T", "source":"", "adFormCode":"Z2", "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;
}