if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = []; A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"10346", "zid":"169", "title":"考研真题", "link":"http://www.hjbbs.com/thread-20-482153.htm", "advtype":"P", "source":"http://a4.yeshj.com/upload/200804/KY-D-B1P-10346_67.jpg", "adFormCode":"B1", "protected":false }]};A4page.Zone["B2"]={"zonecode":"B2",content:[{ "aid":"10347", "zid":"170", "title":"风中劲草考研政治", "link":"http://bulo.yeshj.com/menu/903/", "advtype":"P", "source":"http://a4.yeshj.com/upload/200803/KY-D-B2P-10347_54.jpg", "adFormCode":"B2", "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"17474", "zid":"172", "title":"考研之:朱泰祺信息资料大全", "link":"http://so.yeshj.com/searcher.aspx?key=%E6%9C%B1%E6%B3%B0%E7%A5%BA", "advtype":"T", "source":"", "adFormCode":"H1", "protected":false }]};A4page.Zone["Z1"]={"zonecode":"Z1",content:[{ "aid":"15155", "zid":"171", "title":"周末加油,祝你考研成功", "link":"http://brand.yeshj.com/haiwen/course?page=2", "advtype":"T", "source":"", "adFormCode":"Z1", "protected":false },{ "aid":"10349", "zid":"171", "title":"考研网络报名全攻略(详细截图为你指明方向)", "link":"http://kaoyan.yeshj.com/page/13077/", "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; }