if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = []; A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"10215", "zid":"123", "title":"快易典日语_日语电台专题", "link":"http://www.hwapu.com.cn/products/ProDetail.asp?machineid=74", "advtype":"F", "source":"[flash=460,60]http://a4.hjenglish.com/YesHJ/jp/JP-Z-B1P-10215.swf[/flash]", "adFormCode":"B1", "protected":false }]};A4page.Zone["Z1"]={"zonecode":"Z1",content:[{ "aid":"10217", "zid":"124", "title":"日企员工日语读本", "link":"http://www.hjbook.net/product/1016/", "advtype":"T", "source":"", "adFormCode":"Z1", "protected":false },{ "aid":"10216", "zid":"124", "title":"新编日语口译丛书", "link":"http://www.hjbook.net/tag/%E6%97%A5%E8%AF%AD%E5%8F%A3%E8%AF%91/", "advtype":"T", "source":"", "adFormCode":"Z1", "protected":false }]}; function show_a4_zone(zonecode) { 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; }