function copy(t)
{
	t.select();
	js = t.createTextRange();
	js.execCommand("copy");
}

function paste(t)
{
	t.select();
	js = t.createTextRange();
	js.execCommand("paste");
}

function jumponoff(m_obj)
{
   if (m_obj.value=="用户自定义")
   {
      document.getElementById("usermoreex").style.display = "";
   }
   else
   {
      document.getElementById("usermoreex").style.display = "none";
   }
}
// Ajax
 var xmlHttp = false;
   try {
     xmlHttp = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         xmlHttp = false;
       }  
     }
   }

  if (!xmlHttp) {alert("启用Ajax功能失败，您可能无法使用本站的部分功能！");}


function fun_jt2ft()
{
    if (document.all.myjt.value.length>1000) 
	   {
	     alert("对不起，输入的内容请不要超过1000字！");
		 document.all.myjt.focus();
		 document.all.myjt.select();
		 return false;
	   }
    if (document.all.myjt.value=="") 
	   {
	     alert("请在左边的方框中输入要转换的内容！");
		 document.all.myjt.focus();
		 return false;
	   }
	var myurl="jt2ft.asp";
	var MyWebSend="mytype="+escape(document.all.jtft_type.value)+"&myword="+escape(document.all.myjt.value);
	xmlHttp.open("POST",myurl,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = fun_jt2ft_callback;
	xmlHttp.send(MyWebSend);
	document.getElementById("show_info_jt2ft").innerHTML = "<img src='img/spinner.gif' hspace=2 vspace=2>正在转换";
}

function fun_jt2ft_callback()
{
    if (xmlHttp.readyState == 4)
	 {
	   document.getElementById("show_info_jt2ft").innerHTML ="&nbsp;"
       if (xmlHttp.status == 200)
	     {
		   document.all.myft.value = xmlHttp.responseText;
		 }
     }
}

function fun_qq2bt()
{
    if (document.all.myqqin.value.length>1000) 
	   {
	     alert("对不起，输入的内容请不要超过1000字！");
		 document.all.myqqin.focus();
		 document.all.myqqin.select();
		 return false;
	   }
    if (document.all.myqqin.value=="") 
	   {
	     alert("请在左边的方框中输入要转换的内容！");
		 document.all.myqqin.focus();
		 return false;
	   }
	var myurl="qq2bt.asp";
	var mypinglv,chihui,changyong,seeout,ifwordsame
	var obj_x=document.all.qm_type;
	if (obj_x[0].checked)
	{
	   mypinglv="1";
	   chihui="0";
	   changyong="0";
	   seeout="3";
	   ifwordsame="0";
	}
	if (obj_x[1].checked)
	{
	   mypinglv="0.3";
	   chihui="0";
	   changyong="0";
	   seeout="3";
	   ifwordsame="0";
	}
	if (obj_x[2].checked)
	{
	   mypinglv="0.6";
	   chihui="1";
	   changyong="1";
	   seeout="3";
	   ifwordsame="0";
	}
	if (obj_x[3].checked)
	{
	   mypinglv="0.5";
	   chihui="1";
	   changyong="1";
	   seeout="3";
	   ifwordsame="1";
	}
	if (obj_x[4].checked)
	{
	   mypinglv=document.all.qm_pinglv.value;
	   if (document.all.qm_chihui[0].checked)  chihui="0";
	    else chihui="1";
	   if (document.all.qm_changyong[0].checked)  changyong="0";
	    else changyong="1";		
	   if (document.all.qm_nandu[0].checked)  seeout="1";
	   if (document.all.qm_nandu[1].checked)  seeout="2";
	   if (document.all.qm_nandu[2].checked)  seeout="3";	  
	   if (document.all.qm_more[0].checked)  ifwordsame="1";
	    else ifwordsame="0";		 
	}
	
	if (parseFloat(mypinglv)>1 || parseFloat(mypinglv)<0 || isNaN(parseFloat(mypinglv)))
	{
	   alert("转换频率应该是一个大于0且小于等于1的数字！");
	   return false;
	}
    
	var MyWebSend="mypinglv="+escape(mypinglv)+"&chihui="+escape(chihui)+"&changyong="+escape(changyong)+"&seeout="+escape(seeout)+"&ifwordsame="+escape(ifwordsame)+"&myword="+escape(document.all.myqqin.value);
	xmlHttp.open("POST",myurl,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = fun_qq2bt_callback;
	xmlHttp.send(MyWebSend);
	document.getElementById("show_info_qq2bt").innerHTML = "<img src='img/spinner.gif' hspace=2 vspace=2>正在转换";
}

function fun_qq2bt_callback()
{
    if (xmlHttp.readyState == 4)
	 {
	 document.getElementById("show_info_qq2bt").innerHTML = "&nbsp;";
       if (xmlHttp.status == 200)
	     {
		   document.all.myqqout.value = xmlHttp.responseText;
		 }
     }
}

function fun_bt2bt()
{
    if (document.all.btbt_in.value.length>1000) 
	   {
	     alert("对不起，输入的内容请不要超过1000字！");
		 document.all.btbt_in.focus();
		 document.all.btbt_in.select();
		 return false;
	   }
    if (document.all.btbt_in.value=="") 
	   {
	     alert("请在左边的方框中输入要转换的内容！");
		 document.all.btbt_in.focus();
		 return false;
	   }
	var myurl="bt2bt.asp";
	var obj_mm=document.all.btbt_rnd;
	var mytype,mymidu,mybianhao;
	if (obj_mm[0].checked)
	{
	   mytype="随机";
	   mymidu=document.all.btbt_midu.value;
	   mybianhao="0";
	   	if (parseFloat(mymidu)<0 || isNaN(parseFloat(mymidu)))
	     {
	       alert("密度应该是一个大于0的数字！");
	       return false;
	     }
	}
	else
	{
	   mytype="固定";
	   mymidu="0";
	   mybianhao=document.all.btbt_guding.value;
	}
	
	var MyWebSend="mytype="+escape(mytype)+"&mymidu="+escape(mymidu)+"&mybianhao="+escape(mybianhao)+"&myword="+escape(document.all.btbt_in.value);
	xmlHttp.open("POST",myurl,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = fun_bt2bt_callback;
	xmlHttp.send(MyWebSend);
	document.getElementById("show_info_bt2bt").innerHTML = "<img src='img/spinner.gif' hspace=2 vspace=2>正在转换";
}

function fun_bt2bt_callback()
{
    if (xmlHttp.readyState == 4)
	 {
	 document.getElementById("show_info_bt2bt").innerHTML = "&nbsp;";
       if (xmlHttp.status == 200)
	     {
		   document.all.btbt_out.value = xmlHttp.responseText;
		 }
     }
}

function fun_jt2pingyin()
{
    if (document.all.other_input.value.length>1000) 
	   {
	     alert("对不起，输入的内容请不要超过1000字！");
		 document.all.other_input.focus();
		 document.all.other_input.select();
		 return false;
	   }
    if (document.all.other_input.value=="") 
	   {
	     alert("请在左边的方框中输入要转换的内容！");
		 document.all.other_input.focus();
		 return false;
	   }
	var myurl="mypingyin.asp";
	if (document.all.other_type[0].checked) {myurl="wordnumber.asp";}
	var MyWebSend="myword="+escape(document.all.other_input.value);
	xmlHttp.open("POST",myurl,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = fun_jt2pingyin_callback;
	xmlHttp.send(MyWebSend);
	document.getElementById("show_info_other").innerHTML = "<img src='img/spinner.gif' hspace=2 vspace=2>正在转换";
}

function fun_jt2pingyin_callback()
{
    if (xmlHttp.readyState == 4)
	 {
	   document.getElementById("show_info_other").innerHTML = "&nbsp;";
       if (xmlHttp.status == 200)
	     {
		   document.all.other_output.value = xmlHttp.responseText;
		 }
     }
}