﻿if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = [];
A4page.Zone["A1"]={"zonecode":"A1",content:[{ "aid":"31065", "zid":"64",	"title":"乌龙学院",	"link":"http://cet.hjenglish.com/wulongonline",	"advtype":"P",	"source":"http://mis.hjenglish.com/upload/200910/bug_首页2屏-574-60133.gif",	"adFormCode":"A1",  "protected":false }]};A4page.Zone["A2"]={"zonecode":"A2",content:[{ "aid":"34282", "zid":"65",	"title":"BEC网校春季班",	"link":"http://www.hjenglish.com/subject/bec/page/94789/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201001/CE-A-A2P-34282_95.gif",	"adFormCode":"A2",  "protected":false }]};A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"33834", "zid":"63",	"title":"新部落",	"link":"http://bulo.hjenglish.com/app/home/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/200912/CE-A-B1P-33834_68.gif",	"adFormCode":"B1",  "protected":false }]};A4page.Zone["B3"]={"zonecode":"B3",content:[{ "aid":"34389", "zid":"935",	"title":"春季班",	"link":"http://www.hjenglish.com/subject/bec/page/94789/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201002/CE-A-B3P-34389_62.gif",	"adFormCode":"B3",  "protected":false }]};A4page.Zone["D1"]={"zonecode":"D1",content:[{ "aid":"10266", "zid":"69",	"title":"新东方四六级对联_左",	"link":"http://shanghai.neworiental.org",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/200812/CE-A-D1P-10266_48.gif",	"adFormCode":"D1",  "protected":false }]};A4page.Zone["D2"]={"zonecode":"D2",content:[{ "aid":"10267", "zid":"70",	"title":"新东方四六级对联_左侧",	"link":"http://shanghai.neworiental.org",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/200812/CE-A-D2P-10267_19.gif",	"adFormCode":"D2",  "protected":false }]};A4page.Zone["H1"]={"zonecode":"H1",content:[{ "aid":"33837", "zid":"140",	"title":"全面汇总精华CET资料",	"link":"http://www.hjenglish.com/new/c1021/",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false },{ "aid":"33154", "zid":"140",	"title":"<font color=red>现金悬赏CET高分牛人！</font>",	"link":"http://cet.hjenglish.com/wulongonline",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false },{ "aid":"28020", "zid":"140",	"title":"考完咯~专心准备中高级口译",	"link":"http://tr.hjenglish.com/page/89137",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false },{ "aid":"21588", "zid":"140",	"title":"每天10分钟，轻松学英语",	"link":"http://bulo.hjenglish.com/app/home/source/hjenglish ",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false }]};A4page.Zone["H2"]={"zonecode":"H2",content:[{ "aid":"29665", "zid":"141",	"title":"<font color=blue>四六级在线学习全面启动，保过！</font>",	"link":"http://cet.hjenglish.com/netlesson/?source=151",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"29664", "zid":"141",	"title":"免费英语水平测试",	"link":"http://super.yeshj.com/en/WordsResult.aspx",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"26516", "zid":"141",	"title":"口译，选择在线课程",	"link":"http://tr.hjenglish.com/page/70003/",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"14882", "zid":"141",	"title":"四六级历年真题和资料下载",	"link":"http://cet.hjenglish.com/2008/quiz.htm",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false }]};A4page.Zone["H3"]={"zonecode":"H3",content:[{ "aid":"10278", "zid":"142",	"title":"<b>考完四六级，当然学商务英语咯</b>",	"link":"http://www.hjenglish.com/subject/bec/page/88641",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10277", "zid":"142",	"title":"挑战四级710分",	"link":"http://cet.hjenglish.com/page/42378/",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10276", "zid":"142",	"title":"四六级奖学金获奖学员",	"link":"http://cet.hjenglish.com/subject/07award/exp2.htm",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10270", "zid":"142",	"title":"在线词典翻译，快速准确",	"link":"http://dict.hjenglish.com",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false }]};A4page.Zone["S1"]={"zonecode":"S1",content:[{ "aid":"10263", "zid":"66",	"title":"乌龙学院",	"link":"http://cet.hjenglish.com/wulongonline/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/200802/CE-A-S1P-10263_10.gif",	"adFormCode":"S1",  "protected":false }]};A4page.Zone["S3"]={"zonecode":"S3",content:[{ "aid":"10265", "zid":"68",	"title":"四六级许愿墙",	"link":"http://cet.hjenglish.com/2007/wish.htm",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/200802/CE-A-S3P-10265_76.gif",	"adFormCode":"S3",  "protected":false }]};A4page.Zone["W1"]={"zonecode":"W1",content:[{ "aid":"32743", "zid":"288",	"title":"BEC名师评点网友作文",	"link":"http://www.hjenglish.com/subject/bec/page/85526/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32742", "zid":"288",	"title":"BEC实用商务英语口语",	"link":"http://class.yeshj.com/super/super_bec_001",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32741", "zid":"288",	"title":"沪江网校体验班（多语种多课程）",	"link":"http://class.yeshj.com/10022/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32740", "zid":"288",	"title":"2010考研英语强化班【研英强化班】",	"link":"http://class.yeshj.com/10021/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32739", "zid":"288",	"title":"BEC商务英语【中级加强班】",	"link":"http://class.yeshj.com/10023/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32738", "zid":"288",	"title":"2010年3月英语口译【高口备考班】",	"link":"http://class.yeshj.com/10030/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32737", "zid":"288",	"title":"2010年3月英语口译【中口备考班】",	"link":"http://class.yeshj.com/10029/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32634", "zid":"639",	"title":"<font color=red>2010日语入门至中级【0-N2直达班】</font>",	"link":"http://class.yeshj.com/10028/intro?source=2 ",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32633", "zid":"639",	"title":"2010.7日语新一级【N1强化班】",	"link":"http://class.yeshj.com/10041/intro?source=147",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32632", "zid":"639",	"title":"09年12月日语能力考【二级冲刺班】",	"link":"http://class.yeshj.com/10026/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32631", "zid":"639",	"title":"09年12月日语能力考【三级冲刺班】",	"link":"http://class.yeshj.com/10024/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32630", "zid":"639",	"title":"09年12月日语能力考【二级强化班】",	"link":"http://class.yeshj.com/10020/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32629", "zid":"639",	"title":"09年12月日语能力考【一级强化班】",	"link":"http://class.yeshj.com/10019/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"32628", "zid":"639",	"title":"日语零基础入门【五十音图班】",	"link":"http://class.yeshj.com/10016/intro?source=2",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"25175", "zid":"639",	"title":"日语二手原版书清仓处理（有更新）",	"link":"http://www.hjbook.net/product/1135",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11514", "zid":"295",	"title":"<font color=red><b>2008年职称英语等级考试必背词汇(最新版)</b></font>",	"link":"http://www.hjenglish.com/down/11323/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11477", "zid":"295",	"title":"<b>各地职称外语考试准考证打印时间汇总</b>",	"link":"http://www.hjenglish.com/zcyy/page/34673/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11476", "zid":"295",	"title":"<font color=green><b>全国职称英语考试历年真题及答案（卫生类）</b></font>",	"link":"http://www.hjenglish.com/down/11251/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11360", "zid":"288",	"title":"<font color=red><b>精华汇总：新概念英语一网打尽</b></font>",	"link":"http://ts.hjenglish.com/page/34975/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "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("<a href=\"http://a4.yeshj.com/rd/"+ post.aid +"/\" target=\"_blank\">" + post.title +"</a>&nbsp;&nbsp;");
				else
					document.write("<a href=\"http://a4.yeshj.com/rd/"+ post.aid +"/\" target=\"_blank\">" + post.title +"</a><br/>");
			}			

		}	else if (A4page.Zone[zonecode].content[0].advtype == "P"){

			if( A4page.Zone[zonecode].content.length == 1 ){

				document.write("<a href=\"http://a4.yeshj.com/rd/"+ A4page.Zone[zonecode].content[0].aid +"/\" title=\""+ A4page.Zone[zonecode].content[0].title +"\" target=\"_blank\"><img src=\""+ A4page.Zone[zonecode].content[0].source +"\" border=\"0\"></a>");

			}else{

				for (var i=0, post; post = A4page.Zone[zonecode].content[i]; i++) {
						document.write("<a href=\"http://a4.yeshj.com/rd/"+ post.aid +"/\" target=\"_blank\"><img src=\""+ post.source +"\" border=\"0\"></a><br/><br/>");
				}						
			}

		}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= "<OBJECT codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" "
	+ " classid=\"clsid:d27CDB6E-AE6D-11cf-96B8-444553540000\" "
	+ "width=$1 height=$2>"
	+ "<PARAM NAME=movie VALUE=\"$3\">"
	+ "<PARAM NAME=quality VALUE=high>"
	+ "<embed src=\"$3\" width=$1 height=$2 quality=high name=index type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"/>"
	+ "</OBJECT>";
	//执行转换
	Source=Source.replace(flash_ubb, flash_html );
	return Source;
}
