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];}
}

function ShowDiv(D_Name){
KY.style.display = "none";
YD.style.display = "none";
XZ.style.display = "none";
TL.style.display = "none";
FY.style.display = "none";

D_Name.style.display = "";
}

function ChangeMenu(M_ID,ThisValue){
KY_TD.className="En_KY_2";
YD_TD.className="En_YD_1";
XZ_TD.className="En_XZ_1";
TL_TD.className="En_TL_1";
FY_TD.className="En_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_HY(M_ID,ThisValue){
KY_TD.className="HY_KY_2";
YD_TD.className="HY_YD_1";
XZ_TD.className="HY_XZ_1";
TL_TD.className="HY_TL_1";
FY_TD.className="HY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_ALBY(M_ID,ThisValue){
KY_TD.className="ALBY_KY_2";
YD_TD.className="ALBY_YD_1";
XZ_TD.className="ALBY_XZ_1";
TL_TD.className="ALBY_TL_1";
FY_TD.className="ALBY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_DY(M_ID,ThisValue){
KY_TD.className="DY_KY_2";
YD_TD.className="DY_YD_1";
XZ_TD.className="DY_XZ_1";
TL_TD.className="DY_TL_1";
FY_TD.className="DY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_FY(M_ID,ThisValue){
KY_TD.className="FY_KY_2";
YD_TD.className="FY_YD_1";
XZ_TD.className="FY_XZ_1";
TL_TD.className="FY_TL_1";
FY_TD.className="FY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_PTYY(M_ID,ThisValue){
KY_TD.className="PTYY_KY_2";
YD_TD.className="PTYY_YD_1";
XZ_TD.className="PTYY_XZ_1";
TL_TD.className="PTYY_TL_1";
FY_TD.className="PTYY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_RY(M_ID,ThisValue){
KY_TD.className="RY_KY_2";
YD_TD.className="RY_YD_1";
XZ_TD.className="RY_XZ_1";
TL_TD.className="RY_TL_1";
FY_TD.className="RY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_YDLY(M_ID,ThisValue){
KY_TD.className="YDLY_KY_2";
YD_TD.className="YDLY_YD_1";
XZ_TD.className="YDLY_XZ_1";
TL_TD.className="YDLY_TL_1";
FY_TD.className="YDLY_FY_1";

M_ID.className=ThisValue;
}

function ChangeMenu_T(M_ID,ThisValue){
T_En.className="T_En_2";
T_Kr.className="T_Kr_1";
T_Jp.className="T_Jp_1";
T_Fr.className="T_Fr_1";
T_It.className="T_It_1";
T_Sp.className="T_Sp_1";
T_Po.className="T_Po_1";
T_Ge.className="T_Ge_1";
T_Ru.className="T_Ru_1";
T_Ar.className="T_Ar_1";

M_ID.className=ThisValue;
}

function ShowDiv_T(D_Name){
En.style.display = "none";
Kr.style.display = "none";
Jp.style.display = "none";
Fr.style.display = "none";
It.style.display = "none";
Sp.style.display = "none";
Po.style.display = "none";
Ge.style.display = "none";
Ru.style.display = "none";
Ar.style.display = "none";

D_Name.style.display = "";
}

function Index_Menu(TD,Table){
TD_1.className="TD_1";
Table_1.style.display="none";

TD_2.className="TD_1";
Table_2.style.display="none";

TD_3.className="TD_1";
Table_3.style.display="none";

TD_4.className="TD_1";
Table_4.style.display="none";

TD_5.className="TD_1";
Table_5.style.display="none";

TD_6.className="TD_1";
Table_6.style.display="none";

TD_7.className="TD_1";
Table_7.style.display="none";

TD_8.className="TD_1";
Table_8.style.display="none";

TD.className="TD_2";
Table.style.display = ""
}

var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){  
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        }
    else{
        if(image.height>iheight){  
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        }
    }
} 

function datacheck()
				{  
					if (myform.Name.value==""){
					alert("你好像还忘了填昵称哦！");
					myform.Name.focus();
					return false;
					}
					
					if (myform.Email.value==""){
					alert("电子邮件一定要填写哦！");
					myform.Email.focus();
					return false;
					}
					
					if (myform.Memo.value==""){
					alert("请输入留言内容！");
					myform.Memo.focus();
					return false;
					}
					
					haha=myform.Email.value
					if(haha.length>0)
					{
						i=haha.indexOf("@");
						if(i==-1)
						{
							alert("哇！您输入的电子邮件有错误哦！")
							myform.Email.focus();
							return false;
						}
					   ii=haha.indexOf(".")
						if(ii==-1)
						{
							alert("哇！您输入的电子邮件有错误哦！")
							myform.Email.focus();
							return false;
						}
					}
					if (checktext(haha))
					{
						alert("能告诉我您的有效电子邮件吗？");
						myform.Email.focus();
						return false;
					}
					{$CheckCode}
					if (myform.Memo.value==""){
					alert("留言还没写呢，这样可不行哦！！");
					return false;
					}
				
				}
				
				function checktext(text)
				{
						allValid = true;
						for (i = 0;  i < text.length;  i++)
						{
							if (text.charAt(i) != " ")
							{
								allValid = false;
								break;
							}
						}
				return allValid;
				}
