﻿if(typeof(A4page) == 'undefined') A4page = {}; A4page.Zone = [];
A4page.Zone["A1"]={"zonecode":"A1",content:[{ "aid":"42570", "zid":"64",	"title":"网校",	"link":"http://en.hujiang.com/new/p300783/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201202/pr02160518093.gif",	"adFormCode":"A1",  "protected":false }]};A4page.Zone["A2"]={"zonecode":"A2",content:[{ "aid":"41780", "zid":"65",	"title":"0-CET4",	"link":"http://en.yeshj.com/new/p152118/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201104/pr01162553257.gif",	"adFormCode":"A2",  "protected":false }]};A4page.Zone["B1"]={"zonecode":"B1",content:[{ "aid":"41882", "zid":"63",	"title":"四六级通关班",	"link":"http://en.hujiang.com/new/p230318/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201112/pr16145148356.gif",	"adFormCode":"B1",  "protected":false }]};A4page.Zone["B3"]={"zonecode":"B3",content:[{ "aid":"37814", "zid":"935",	"title":"麦包包",	"link":"http://cet.yeshj.com/zt/1012award/",	"advtype":"P",	"source":"http://common.hjfile.cn/site/cet/images/banner_1522.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":"39194", "zid":"140",	"title":"考完四六级，再战BEC>>",	"link":"http://en.yeshj.com/bec/netlesson/?source=351",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false },{ "aid":"33837", "zid":"140",	"title":"<font color=red><b>名师指点，迈向四六级高分！</b></font>",	"link":"http://en.hujiang.com/new/p230318/",	"advtype":"T",	"source":"",	"adFormCode":"H1",  "protected":false },{ "aid":"28020", "zid":"140",	"title":"四六级在线学习，时髦！",	"link":"http://en.hujiang.com/new/p230318/",	"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.yeshj.com/netlesson/?source=351",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"29664", "zid":"141",	"title":"寒假到，英语学习新计划",	"link":"http://class.yeshj.com/zt/2011/newyear/?source=351",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"26516", "zid":"141",	"title":"免费下载英语资料",	"link":"http://en.yeshj.com/dl/",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false },{ "aid":"14882", "zid":"141",	"title":"四六级历年真题下载",	"link":"http://cet.yeshj.com/papers.htm",	"advtype":"T",	"source":"",	"adFormCode":"H2",  "protected":false }]};A4page.Zone["H3"]={"zonecode":"H3",content:[{ "aid":"37978", "zid":"142",	"title":"三个月过四六级的方法！",	"link":"http://www.hjenglish.com/new/p124626/",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10278", "zid":"142",	"title":"四六级高分牛人，来拿奖金吧！",	"link":"http://cet.yeshj.com/zt/1006award/",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10277", "zid":"142",	"title":"四六级书籍推荐",	"link":"http://cet.yeshj.com/page/42378/",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false },{ "aid":"10270", "zid":"142",	"title":"在线词典翻译，快速准确",	"link":"http://dict.yeshj.com/app/",	"advtype":"T",	"source":"",	"adFormCode":"H3",  "protected":false }]};A4page.Zone["S1"]={"zonecode":"S1",content:[{ "aid":"35392", "zid":"66",	"title":"模拟考",	"link":"http://bulo.yeshj.com/app/exam_cet/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201006/CE-A-S1P-35392_13.gif",	"adFormCode":"S1",  "protected":false }]};A4page.Zone["S3"]={"zonecode":"S3",content:[{ "aid":"10265", "zid":"68",	"title":"四六级许愿墙",	"link":"http://cet.yeshj.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["S5"]={"zonecode":"S5",content:[{ "aid":"42147", "zid":"1267",	"title":"四级核心词汇",	"link":"http://en.hujiang.com/new/p192977/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201201/pr05113810871.jpg",	"adFormCode":"S5",  "protected":false }]};A4page.Zone["S7"]={"zonecode":"S7",content:[{ "aid":"41900", "zid":"1269",	"title":"考后网校CET专题 ",	"link":"http://class.yeshj.com/zt/cet/",	"advtype":"P",	"source":"http://a4.yeshj.com/upload/201112/pr17122823450.jpg",	"adFormCode":"S7",  "protected":false }]};A4page.Zone["W1"]={"zonecode":"W1",content:[{ "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://en.yeshj.com/down/11323/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11477", "zid":"295",	"title":"<b>各地职称外语考试准考证打印时间汇总</b>",	"link":"http://en.yeshj.com/zcyy/page/34673/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11476", "zid":"295",	"title":"<font color=green><b>全国职称英语考试历年真题及答案（卫生类）</b></font>",	"link":"http://en.yeshj.com/down/11251/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false },{ "aid":"11360", "zid":"288",	"title":"<font color=red><b>精华汇总：新概念英语一网打尽</b></font>",	"link":"http://ts.yeshj.com/page/34975/",	"advtype":"K",	"source":"",	"adFormCode":"W1",  "protected":false }]};A4page.Zone["Z1"]={"zonecode":"Z1",content:[{ "aid":"41835", "zid":"1262",	"title":"名师指点，三个月通关四六级",	"link":"http://en.hujiang.com/new/p230318/",	"advtype":"T",	"source":"",	"adFormCode":"Z1",  "protected":false },{ "aid":"39192", "zid":"1262",	"title":"英语零基础菜鸟，直达大学四级",	"link":"http://en.yeshj.com/new/p152118/",	"advtype":"T",	"source":"",	"adFormCode":"Z1",  "protected":false },{ "aid":"39190", "zid":"1262",	"title":"名师谢忠明主讲，迈向四六级高分！ ",	"link":"http://en.hujiang.com/new/p230318/",	"advtype":"T",	"source":"",	"adFormCode":"Z1",  "protected":false }]};A4page.Zone["Z2"]={"zonecode":"Z2",content:[{ "aid":"41834", "zid":"1263",	"title":"四六级三个月通过之法",	"link":"http://en.hujiang.com/new/p230318/",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false },{ "aid":"40082", "zid":"1263",	"title":"学口语迅速上瘾的方法",	"link":"http://www.e-say.com.cn/?menu=91000186",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false },{ "aid":"40025", "zid":"1263",	"title":"零基础你该如何学英语",	"link":"http://en.yeshj.com/new/p152118/",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false },{ "aid":"39183", "zid":"1263",	"title":"坚持一个月，听透VOA",	"link":"http://app.yeshj.com/listen/center/new,9/",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false },{ "aid":"39180", "zid":"1263",	"title":"速来体验升级版活辞典",	"link":"http://haoyitong.tmall.com/",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false },{ "aid":"39178", "zid":"1263",	"title":"送你进入外企的敲门砖",	"link":"http://en.yeshj.com/new/p164762/",	"advtype":"T",	"source":"",	"adFormCode":"Z2",  "protected":false }]};A4page.Zone["Z3"]={"zonecode":"Z3",content:[{ "aid":"42481", "zid":"1264",	"title":"100倍的速度记单词",	"link":"http://www.chuanxiedu.cn/adhj.htm",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "protected":false },{ "aid":"41514", "zid":"1264",	"title":"看美剧，学地道口语",	"link":"http://www.hjenglish.com/new/p164830/",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "protected":false },{ "aid":"41147", "zid":"1264",	"title":"四六级高分通关之法",	"link":"http://en.hujiang.com/new/p300783/",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "protected":false },{ "aid":"40086", "zid":"1264",	"title":"测试一下你的听力>",	"link":"http://www.webinternational.com.cn/2011mar/skype/test.aspx?ADID=396047&CityID=-1",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "protected":false },{ "aid":"40026", "zid":"1264",	"title":"看电影，学地道口语",	"link":"http://www.hjenglish.com/new/p181537/",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "protected":false },{ "aid":"39184", "zid":"1264",	"title":"如何一天收入5000",	"link":"http://www.cemachina.com",	"advtype":"T",	"source":"",	"adFormCode":"Z3",  "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));
            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= "<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;
}


function ConvertUbb2(Source,aid){
    //定义ubb转换参数
	var flash_ubb = /\[flash=(\d*),(\d*)\](\S*)\[\/flash\]/igm;
	var flash_html= "<div style=\"position:relative;\">"
    + "<a target=\"_blank\" href=\"http://a4.yeshj.com/rd/"+aid+"/\" style=\"background:transparent url('http://bulo.hjenglish.com/images/spacer.gif') no-repeat;display:block;width:$1px;height:$2px;position:absolute;left:0;top:0;\"></a>"
	+ "<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\">"
	+ "<param value=\"opaque\" name=\"wmode\">"
	+ "<embed src=\"$3\" width=$1 height=$2  quality=high name=index type=\"application/x-shockwave-flash\"  wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"/>"
	+ "</OBJECT>"
	+ "</div>";
	//执行转换
	Source=Source.replace(flash_ubb, flash_html );
	return Source;
}
