﻿// JavaScript Document
var switch_url = "";
switch_url=document.URL;

if(switch_url.indexOf("/rhythmuk")!=-1)
	switch_url = document.URL.replace("/rhythmuk","/en/rhythmuk");
else
{
        if((switch_url.indexOf("/trenduk")!=-1)||(switch_url.indexOf("/arts")!=-1))
	   switch_url = document.URL.replace("/zh/","/en/");
	else   
        if(switch_url.indexOf("/zh/exams/bulats")!=-1)
	     switch_url = document.URL.replace("/zh/exams/bulats","/en/exams/bulats");
	else   
	if(switch_url.indexOf("/ctc")!=-1)
	     switch_url = document.URL.replace("/ctc","/en/ctc");
	else   
        if(switch_url.indexOf("/exams/chinese/")!=-1)
	     switch_url = document.URL.replace("/exams/chinese/","/exams/english/");
	else   
        if(switch_url.indexOf("/epage/chinese/ezine.jsp?epageid=36")!=-1)
	     switch_url = document.URL.replace("/epage/chinese/ezine.jsp?epageid=36","/epage/english/ezine.jsp?epageid=24");
	else   
        if(switch_url.indexOf("/epage/chinese/ezine.jsp?epageid=30")!=-1)
	     switch_url = document.URL.replace("/epage/chinese/ezine.jsp?epageid=30","/epage/english/ezine.jsp?epageid=21");
	else   
        if(switch_url.indexOf("/epage/chinese/ezine.jsp?epageid=34")!=-1)
	     switch_url = document.URL.replace("/epage/chinese/ezine.jsp?epageid=34","/epage/english/ezine.jsp?epageid=22");
    else   
        if(switch_url.indexOf("/epage/chinese/ezine.jsp?epageid=38")!=-1)
	     switch_url = document.URL.replace("/epage/chinese/ezine.jsp?epageid=38","/epage/english/ezine.jsp?epageid=25");
    else
        if(switch_url.indexOf("/epage/chinese/")!=-1)
	     switch_url = document.URL.replace("/epage/chinese/","/epage/english/");
	else
        if(switch_url.indexOf("/climatecool/")!=-1)
	     switch_url = document.URL.replace("/climatecool/","/climatecool/en/");
	else
        if(switch_url.indexOf("/zh/gznewoffice/")!=-1)
	     switch_url = document.URL.replace("/zh/gznewoffice/","/en/gznewoffice/");
	     
	     
	else
        if(switch_url.indexOf("/designuk/duk_index.html")!=-1)
	     switch_url = document.URL.replace("/designuk/duk_index.html","/designuk/en_duk_index.html");
	else
        if(switch_url.indexOf("/designuk/duk_events.html")!=-1)
	     switch_url = document.URL.replace("/designuk/duk_events.html","/designuk/en_duk_events.html");
	else
        if(switch_url.indexOf("/designuk/duk_index.html")!=-1)
	     switch_url = document.URL.replace("/designuk/duk_awards.html","/designuk/en_duk_awards.html");
	else
        if(switch_url.indexOf("/designuk/duk_usefullinks.html")!=-1)
	     switch_url = document.URL.replace("/designuk/duk_usefullinks.html","/designuk/en_duk_usefullinks.html");
	else
        if(switch_url.indexOf("/zh/home-copyright-policy.htm")!=-1)
	     switch_url = document.URL.replace("/zh/home-copyright-policy.htm","/en/home-copyright-policy.htm");
	
	  
	     
      //
	//如果xxx目录下有要转换的加以下代码
	//else
	//if(switch_url.indexOf("/zh/xxx/xxx")!=-1)
	//switch_url = document.URL.replace("/zh/xxx/xxx","/en/xxx/xxx");   
	//
	//
	//      
	else
	   switch_url = "http://www.britishcouncil.org.cn/en/";
}



function mOvr(src, cOvr)
{if (!src.contains(event.fromElement)) {src.style.cursor = "default";src.bgColor = cOvr;}}
function mOut(src, cOut)
{if (!src.contains(event.toElement)) {src.style.cursor = "default";src.bgColor = cOut;}}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function bookmark(bmurl, bmtitle){
   if(navigator.userAgent.indexOf('MSIE') >= 0 && navigator.userAgent.indexOf('Opera') < 0){
       window.external.AddFavorite(bmurl, bmtitle);
   }
   else{
       document.body.innerHTML += '<'+'a href="'+bmurl+'" title="'+bmtitle+'" rel="sidebar" style="display: none;" id="addbookmark">click<'+'/a>';
       document.getElementById('addbookmark').click();
       document.getElementById('addbookmark').outerHTML = '';
   }
}
document.write("<style type=\"text/css\">");
document.write("<!--");
document.write(".style_cz_1 {");
document.write("	background-image: url(/zh/images/structure-common-arrow-lighter-green-transparent-background.gif);");
document.write("	background-repeat: no-repeat;");
document.write("	FONT-WEIGHT: bold;");
document.write("	FONT-SIZE: 80%;");
document.write("	TEXT-TRANSFORM: uppercase;");
document.write("	COLOR: #3266CC;");
document.write("	FONT-FAMILY: Verdana;");
document.write("	TEXT-DECORATION: none;");
document.write("	padding-left: 18px;");
document.write("	background-position: 2px 2px;");
document.write("}");
document.write(".style_cz_1 A {");
document.write("	TEXT-TRANSFORM: uppercase; COLOR: #3266CC; TEXT-DECORATION: none");
document.write("}");
document.write(".style_cz_1 A:hover {");
document.write("	TEXT-TRANSFORM: uppercase; COLOR: #3266CC; TEXT-DECORATION: underline");
document.write("}");
document.write(".style_cz_2 {");
document.write("	FONT-WEIGHT: bold;");
document.write("	FONT-SIZE: 80%;");
document.write("	TEXT-TRANSFORM: uppercase;");
document.write("	COLOR: #98CB00;");
document.write("	FONT-FAMILY: Verdana;");
document.write("	TEXT-DECORATION: none;");
document.write("	padding-left: 18px;");
document.write("	background-position: 2px 2px;");
document.write("	background-image: url(/zh/images/structure-common-arrow-9x9-orange-transparent-background.gif);");
document.write("	background-repeat: no-repeat;");
document.write("}");
document.write(".style_cz_2 a {");
document.write("	TEXT-TRANSFORM: uppercase; COLOR: #98CB00; TEXT-DECORATION: none");
document.write("}");
document.write(".style_cz_2 a:hover {");
document.write("	TEXT-TRANSFORM: uppercase; COLOR: #98CB00; TEXT-DECORATION: underline");
document.write("}");
document.write("-->");
document.write("</style>");
document.write("<style type=\"text/css\">");
document.write("<!--");
document.write(".yyy1 { font-family: \"Verdana\", \"宋体\"; font-weight: bold;font-size: 10px;}");
document.write(".A6:link { COLOR: #666666;  TEXT-DECORATION: none;width=100%;font-size:14px;}");
document.write(".A6:visited {COLOR:#FFFFFF; TEXT-DECORATION: none;width=100%;font-size:14px;}");
document.write(".A6:hover { COLOR: #FFFFFF; TEXT-DECORATION: none;width=100%;font-size:14Px;}");
document.write(".td {");
document.write("	font-size: 12px;");
document.write("	font-weight: bold;");
document.write("	color: #FFFFFF;");
document.write("	border-top:#75A2FF 1px solid; ");
document.write("	border-left:#75A2FF 1px solid;");
document.write("	border-right:#669900 0px solid;");
document.write("}");
document.write(".td1 {");
document.write("     font-family: \"Verdana\", \"宋体\"; font-weight: normal;font-size: 14px;");
document.write("     border-bottom:#CCCCCC 1px solid;");
document.write("}");
document.write(".A7:link {");
document.write("	COLOR: #FFFFFF; TEXT-DECORATION: none");
document.write("}");
document.write(".A7:visited {");
document.write("	COLOR: #FFFFFF; TEXT-DECORATION: none");
document.write("}");
document.write(".A7:hover {");
document.write("	BOTTOM: 1px; COLOR: #FFFFFF;  TEXT-DECORATION: none; }");
document.write(".A7:active {");
document.write("	COLOR: #FFFFFF; TEXT-DECORATION: none");
document.write("}");
document.write(".register {");
document.write("	font-family: \"宋体\";");
document.write("	font-size: 12px;");
document.write("	color: #FFFFFF;");
document.write("	");
document.write("}");
document.write(".footertext_banner {");
document.write("	FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana; TEXT-DECORATION: none");
document.write("}");
document.write(".footertext_banner A {");
document.write("	FONT-WEIGHT: bold; COLOR: #3266CC; TEXT-DECORATION: none");
document.write("}");
document.write(".footertext_banner A:hover {");
document.write("	FONT-WEIGHT: bold; COLOR: #3266CC; TEXT-DECORATION: underline");
document.write("}");
document.write(".contenttext_banner {");
document.write("	FONT-SIZE: 80%; COLOR: #000000; FONT-FAMILY: \"Verdana\";");
document.write("}");
document.write(".contenttext_banner A {");
document.write("	FONT-WEIGHT: bold; COLOR: #3266CC; TEXT-DECORATION: none");
document.write("}");
document.write(".contenttext_banner A:hover {");
document.write("	FONT-WEIGHT: bold; COLOR: #3266CC; TEXT-DECORATION: underline");
document.write("}");
document.write("-->");
document.write("</style>");
document.write("<body leftmargin=\"0\" topmargin=\"0\">");
document.write("<TABLE CELLSPACING=\"0\" CELLPADDING=\"0\" BORDER=\"0\" WIDTH=\"770\" HEIGHT=\"27\">");
document.write("<TR BGCOLOR=\"#FFFFFF\">");
document.write("    <form name=\"cse-search-box\" id=\"cse-search-box\" method=\"post\" onsubmit=\"return false;\">  ");
/*document.write("	<form name=\"frmSearch\" id=\"frmSearch\" method=\"post\" action=\"http://www.britishcouncil.org/zh/china-search-results.htm\">");
document.write("	<input type=\"hidden\" name=\"stat\" id=\"stat\" value=\"0\">");
document.write("	<input type=\"hidden\" name=\"searchType\" id=\"searchType\" value=\"simple\">");
document.write("	<input type=\"hidden\" name=\"txtStartAt\" id=\"txtStartAt\" value=\"1\">");
document.write("	<input type=\"hidden\" name=\"languagetype\" id=\"languagetype\" value=\"zhutf8\">");
document.write("	<input type=\"hidden\" name=\"country\" id=\"country\" value=\"china\">");
document.write("	<input type=\"hidden\" name=\"NResults\" id=\"NResults\" value=\"10\">");
document.write("	<input type=\"hidden\" name=\"language\" id=\"language\" value=\"UTF8\">");*/
document.write("	<td valign=\"middle\"><img src=\"/zh/images/spacer.gif\" width=\"13\"></td>");
/*
document.write("	<td valign=\"middle\" align=\"left\"><a href=\"http://transcoder.usablenet.com/tt/http://www.britishcouncil.org/zh/china.jsp\" class=\"contenttext_banner\"><b>纯文字版</b></a><img src=\"spacer.gif\" width=\"10\" height=\"1\" border=\"0\" alt=\" \"></td>	");
*/
document.write("	<td width=\"150\" valign=\"middle\" align=\"left\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
document.write("	<tr>");
document.write("		<td><img src=\"/zh/images/spacer.gif\" height=\"6\" width=\"6\"></td>");
document.write("	</tr>");
document.write("	<tr>");
document.write("		<td valign=\"middle\" align=\"left\"><a href=\""+switch_url+"\"><img src=\"/zh/images/china-structure-30x15-flag.gif\" width=\"30\" height=\"15\" alt=\"英文版\" border=0 align=\"absmiddle\"></a><img src=\"/zh/images/spacer.gif\" width=\"5\" height=\"1\" border=\"0\" alt=\" \"><a href=\""+switch_url+"\" class=\"footertext_banner\">English Version</a></td>");
document.write("	</tr>");
document.write("	<tr>");
document.write("		<td><img src=\"/zh/images/spacer.gif\" height=\"6\" width=\"6\"></td>");
document.write("	</tr>");
document.write("</table></td>");
/*
document.write("	<td valign=\"middle\" align=\"left\"><img src=\"/zh/images/spacer.gif\" width=\"10\" height=\"1\" border=\"0\" alt=\" \"><a href=\"http://www.britishcouncil.org/zh/china.jsp?printout=1\" target=\"_blank\" class=\"footertext_banner\">打印</a><img src=\"/zh/images/spacer.gif\" width=\"5\">|<img src=\"/zh/images/spacer.gif\" width=\"5\">");
*/
document.write("	<td valign=\"middle\" align=\"left\">");
function checklogin(form)
{
	if ((form.LogonName.value!=null)&&(form.LogonName.value!="")) {
		//form.submit();
	}else {
		alert("请输入用户名");
		form.LogonName.focus();
		return false;
	}
	if ((form.Password.value!=null)&&(form.Password.value!="")) {
		form.submit();
	}else {
		alert("请输入密码");
		form.Password.focus();
		return false;
	}
}

function isPPC() {
if (navigator.appVersion.indexOf("PPC") != -1) return true;
else return false;
}
if(isPPC()) {
document.write('<A class=\"footertext_banner"\ HREF=\\"mailto\:\?subject=This URL may be of interest to you. It is called china\?body=You can view this page at: ' + window.location + '\">推荐给好友</A>') ;
}
else { 
document.write('<A class=\"footertext_banner"\ HREF=\"mailto\:\?body=This URL may be of interest to you. It is called china. You can view this page at: ' + window.location + '\">推荐给好友</A>') ;
}

// End -->
document.write("<img src=\"/zh/images/spacer.gif\" width=\"5\">|<img src=\"/zh/images/spacer.gif\" width=\"5\"><a class=\"footertext_banner\"  href=\"#\" onclick=\"bookmark('' + window.location + '', 'British Council China'); return false;\">加入收藏夹</a><img src=\"/zh/images/spacer.gif\" width=\"5\"></td>");
/*
document.write("<img src=\"/zh/images/spacer.gif\" width=\"5\">|<img src=\"/zh/images/spacer.gif\" width=\"5\"><a class=\"footertext_banner\"  href=\"#\" onclick=\"bookmark('' + window.location + '', 'British Council China'); return false;\">加入收藏夹</a><img src=\"/zh/images/spacer.gif\" width=\"5\">|<img src=\"/zh/images/spacer.gif\" width=\"5\"><a href=\"http://search.britishcouncil.org/multi/suggest_docs.asp?docURL=http://www.britishcouncil.org/china.jsp&country=china&txtquerytype=2&languagetype=zhutf8\" class=\"footertext_banner\" TARGET=\"popup\" ONCLICK=\"openSearchPopup();\">更多相关网页</a></td>");
*/
//document.write("	<td valign=\"middle\" align=\"right\"><img src=\"/zh/images/spacer.gif\" width=\"15\"><input type=\"text\" name=\"txtQueryString\" id=\"txtQueryString\" size=\"15\" maxlength=\"1000\" value=\"输入关键字\" onFocus='this.value=\"\"' onBlur='if(this.value==\"\"){this.value=\"输入关键字\"}'><input type=\"submit\" value=\"搜索\"></TD>");
document.write("      <td valign=\"middle\" align=\"right\" valign=\"middle\">");
document.write("<div><INPUT id=cx type=hidden value=012343739222202164407:nwogey_mpxk name=cx>");
document.write("<INPUT type=hidden value=FORID:9 name=cof> <INPUT type=hidden value=UTF-8 name=ie>");
document.write("<INPUT onkeypress=\"return googleSearchBox_keypress(event)\" id=q size=15 name=q></div></td>");
document.write("<td valign=\"middle\" align=\"right\"><a href=\"javascript: runSearch()\" border=\"0\"><img src=\"http://www.britishcouncil.org/structure-common-23x17-go-button.gif\" border=\"0\"></a></TD>");
document.write("    </form>  ");
document.write("<script type=\"text/javascript\" src=\"http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en\"></script>");

document.write("</TR>");
document.write("</TABLE>");
document.write("</body>");