<!--



// Swap Image

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// open Broswer Window

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//popwin

function popwin(url,nam,w,h,resizable,scrollbars,toolbar,locationbar,directories,status,menubar){
	var attr="";
	if(w>0){
		attr=(attr=="") ? "" : attr+",";
		attr+="width="+w;
	}
	if(h<=0&&window.screen.availHeight&&window.screen.height&&window.screen.availHeight!=window.screen.height){
		h=(window.screen.availHeight>window.screen.height) ? window.screen.height : ((window.screen.availHeight<window.screen.height) ? window.screen.availHeight : 680);
	}
	if(document.documentElement&&document.documentElement.clientWidth){h-=60};
	if(BrowserDetect.browser=="Safari"){h+=2;}else if(BrowserDetect.browser=="Firefox"&&BrowserDetect.version>=2){h-=1};
	attr=(attr=="") ? "" : attr+",";
	attr+="height="+h;
	if(resizable!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="resizable="+resizable;
	}
	if(scrollbars!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="scrollbars="+scrollbars;
	}
	if(toolbar!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="toolbar="+toolbar;
	}
	if(locationbar!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="location="+locationbar;
	}
	if(directories!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="directories="+directories;
	}
	if(status!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="status="+status+",statusbar="+status;
	}
	if(menubar!=""){
		attr=(attr=="") ? "" : attr+",";
		attr+="menubar="+menubar;
	}
	if(window.screen&&w>0&&h>0){
		var x=(screen.width-w)/2;
		var y=(screen.height-h)/2;
		if(BrowserDetect.browser=="Explorer"){y-=24};
		attr+=",top="+y+",left="+x;
	}
	var _wc=window.open(url,nam,attr);
	if(_wc){
		_wc.opener=this;
		if(window.focus){_wc.focus()};
	}
	return _wc;
}

//-->

function wopen(url, name, w, h)
{
  // Fudge factors for window decoration space.
  // In my tests these work well on all platforms & browsers.
  w += 32;
  h += 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=no, resizable=no');
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}
//-->



<!--
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; }
}
//-->


<!--/*  Swap div  */
function HideDIV(d) { document.getElementById(d).style.display = "none"; }
function DisplayDIV(d) { document.getElementById(d).style.display = "block"; }
// -->
function ChangeVersion()
{
//window.event.returnValue = false;
	var url = location.href; 
	if(url.indexOf("/en/")>0) window.location = url.replace("/en/", "/cn/");
	if(url.indexOf("/cn/")>0) window.location = url.replace("/cn/", "/en/");
}



<!--/* For FireFox Flash Menu Optimisation	*/
function resizeSWF(nHeight) {
	if (nHeight==35)
		nHeight = 30;
	nHeight += "px";
	document.getElementById("mainnav").style.height = nHeight;
	
}
//-->
