if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = []; A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"12028", "zid":"317", "title":"推荐雅虎不限容量邮箱", "link":"http://cn.mail.yahoo.com/?id=40067", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false }]};A4page.Zone["H2"]={"zonecode":"H2",content:[{ "aid":"32539", "zid":"907", "title":"沪江网校,网师,网友,网资料", "link":"http://class.yeshj.com/course?source=351", "advtype":"T", "source":"", "adFormCode":"H2", "protected":false }]};A4page.Zone["Z1"]={"zonecode":"Z1",content:[{ "aid":"32535", "zid":"906", "title":"日语零基础一年达N2级的方法", "link":"http://jp.yeshj.com/new/p175799/", "advtype":"T", "source":"", "adFormCode":"Z1", "protected":false },{ "aid":"32534", "zid":"906", "title":"【大竞猜】沪江网第300万个用户会在何时产生?", "link":"http://www.hjbbs.com/thread2-55-574890.htm", "advtype":"T", "source":"", "adFormCode":"Z1", "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)); document.write(ConvertUbb2(A4page.Zone[zonecode].content[0].source,A4page.Zone[zonecode].content[0].aid)); } } 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; } function ConvertUbb2(Source,aid){ //定义ubb转换参数 var flash_ubb = /\[flash=(\d*),(\d*)\](\S*)\[\/flash\]/igm; var flash_html= "
" + "" + "" + "" + "" + "" + "" + "" + "
"; //执行转换 Source=Source.replace(flash_ubb, flash_html ); return Source; }