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":"16108", "zid":"373", "title":"", "link":"http://disneyenglish.disney.com.cn/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200808/EN-A-B2P-16108_58.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["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; }