if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = []; A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"14887", "zid":"175", "title":"乌龙", "link":"http://www.wulongonline.com/home.htm?coming=36", "advtype":"P", "source":"http://a4.yeshj.com/upload/200806/EN-B-B1P-14887_70.gif", "adFormCode":"B1", "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"15648", "zid":"176", "title":"英语资料免费下载", "link":"http://www.tjhongren.com", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"15486", "zid":"176", "title":"看电影,轻松学英语", "link":"http://www.optimatch.com.cn/redirect.php?dest=http%3A%2F%2Fwww.webi.com.cn%2Fshanghai%2F20080430%2Fam-d1.asp", "advtype":"T", "source":"", "adFormCode":"H1", "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; }