if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = []; A4page.Zone["A1"]={"zonecode":"A1",content:[{ "aid":"41496", "zid":"116", "title":"网校寒假专题", "link":"http://class.yeshj.com/zt/2011winter/?source=351", "advtype":"P", "source":"http://a4.yeshj.com/upload/201111/pr25173104323.gif", "adFormCode":"A1", "protected":false }]};A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"39453", "zid":"115", "title":"0-N1", "link":"http://jp.yeshj.com/new/p158237/", "advtype":"P", "source":"http://a4.yeshj.com/upload/201104/pr18172230290.gif", "adFormCode":"B1", "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"38959", "zid":"117", "title":"日语菜鸟入门三步走攻略>>", "link":"http://jp.yeshj.com/new/p122741/", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"38957", "zid":"117", "title":"让菜鸟的日语口语不再纠结!", "link":"http://en.yeshj.com/new/p142574/", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"15907", "zid":"117", "title":"参加J.TEST考试必备书籍", "link":"http://www.hjbook.net/product/7054/?source=351", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"10204", "zid":"117", "title":"J.TEST2005-2008真题集(A-D) ", "link":"http://www.hjbook.net/p5776/?source=147", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"10200", "zid":"117", "title":"沪江推荐的J.TEST书籍", "link":"http://www.hjbook.net/cate/2202/?source=351", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false },{ "aid":"10199", "zid":"117", "title":"日企员工日语读本 ", "link":"http://www.hjbook.net/p1016/?source=147", "advtype":"T", "source":"", "adFormCode":"H1", "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; }