<!-- 

function img(){
	var location1 = prompt("请输入图片的地址：","http://");
	if(location1){
	selImg(location1);
	}
}
function url(){
	var location1 = prompt("请输入网址：","http://");
	if(location1){
	document.all.modes.value+="[url]"+location1+"[/url]";
	}
}

function getSelectedRadioValue(radioName)
{
var radioObj = document.all(radioName); 
var radioValue;

if(radioObj.length){
for(var i = 0; i < radioObj.length; i++)
{

   if(radioObj[i].checked)
   {  
    radioValue = radioObj[i].value;
   }
}
}else{
      if(radioObj){
         radioValue = radioObj.value;
      }else{
    radioValue = 0;
   }
}
return radioValue;
}


function xx(){
document.getElementById("wjbsc").innerHTML="<input type='button' name='Submit3' onclick='javascript:window.open()' value='接收文件'><input type='submit' name='Submit4' onClick='showOrHide3(0),qx(files2.value)' value='取消'>";
}
function showOrHide(value) {
    if (value==0) {
        if (document.layers)
           document.layers["Layer1"].visibility='hide';
        else
           document.all["Layer1"].style.visibility='hidden';
   }
   else if (value==1) {
	   var facestr = document.getElementById("Layer1").style.display;
	var txtSendvar = getDim(document.getElementById("modes"));
	var txtSendX=txtSendvar.x;
	var txtSendY=txtSendvar.y;
	document.getElementById("Layer1").style.left = txtSendX;
document.getElementById("Layer1").style.top = txtSendY - 163;
       if (document.layers)
          document.layers["Layer1"].visibility='show';
		  
       else
          document.all["Layer1"].style.visibility='visible';
   }
}


function showOrHide1(value) {
    if (value==0) {
        if (document.layers)
           document.layers["Layer2"].visibility='hide';
        else
           document.all["Layer2"].style.visibility='hidden';
   }
   else if (value==1) {
	     var facestr = document.getElementById("Layer2").style.display;
	var txtSendvar = getDim(document.getElementById("modes"));
	var txtSendX=txtSendvar.x;
	var txtSendY=txtSendvar.y;
	document.getElementById("Layer2").style.left = txtSendX;
document.getElementById("Layer2").style.top = txtSendY - 60;
       if (document.layers)
          document.layers["Layer2"].visibility='show';
       else
          document.all["Layer2"].style.visibility='visible';
   }
}

function showOrHide2(value) {
    if (value==0) {
        if (document.layers)
           document.layers["Layer3"].visibility='hide';
        else
           document.all["Layer3"].style.visibility='hidden';
   }
   else if (value==1) {
	     var facestr = document.getElementById("Layer3").style.display;
	var txtSendvar = getDim(document.getElementById("modes"));
	var txtSendX=txtSendvar.x;
	var txtSendY=txtSendvar.y;
	document.getElementById("Layer3").style.left = txtSendX;
document.getElementById("Layer3").style.top = txtSendY - 80;
       if (document.layers)
          document.layers["Layer3"].visibility='show';
       else
          document.all["Layer3"].style.visibility='visible';
   }
}
function showOrHide3(value) {
    if (value==0) {
        if (document.layers)
           document.layers["Layer4"].visibility='hide';
        else
           document.all["Layer4"].style.visibility='hidden';
   }
   else if (value==1) {
	     var facestr = document.getElementById("Layer4").style.display;
	var txtSendvar = getDim(document.getElementById("modes"));
	var txtSendX=txtSendvar.x;
	var txtSendY=txtSendvar.y;
	document.getElementById("Layer4").style.left = txtSendX;
document.getElementById("Layer4").style.top = txtSendY - 180;
       if (document.layers)
          document.layers["Layer4"].visibility='show';
       else
          document.all["Layer4"].style.visibility='visible';
   }
}
function selImg(s){ 
if(!s){return false;} 
var h=s.substr(s.lastIndexOf(".")+1,3); 
if(h=="gif"||h=="jpg" || h=="GIF" || h=="JPG"){
var txtx=document.getElementById("txtx");
o=document.createElement("IMG");
o.src=s;
txtx.appendChild(o);
}
else{
}
}
function opens()
{
window.open("bsaves.asp?kid="+kid.value+"",'hh','top=0,left=100,width=450,height=550,scrollbars=yes,resizable=no,status=yes,z-look=yes,alwaysRaised=yes,location=no,depended=no,center:yes');
}

var fs, ff,fc,fb,fi,fu; 
function changeSize(obj){ 
document.all.modes.style.fontSize = obj.value; 
fs = obj.value; 

} 
function changeFont(obj){ 
document.all.modes.style.fontFamily = obj.value; 
ff = obj.value; 
} 
function changeColors(obj){ 
document.all.modes.style.color = obj.value; 
fc = obj.value; 

} 
function changeb(obj){ 
document.all.modes.style.weight = obj.value; 
fb = obj.value; 
} 

function changei(obj){ 
document.all.modes.style.italic = obj.value; 
fi = obj.value; 

} 
function changeu(obj){ 
document.all.modes.style.decoration = obj.value; 
fu = obj.value; 
} 

function Rec_Html(Html)
{
var Rec=new ActiveXObject("ADODB.RecordSet");        
Rec.Fields.Append("DDD",201,1);        
Rec.Open();        
Rec.AddNew();        
Rec(0).AppendChunk(Html);        
Rec.Update();        
return Rec(0).Value;
Rec.Close();
}

function sendText() 
{ 
var oTxt = document.getElementById("txtx"); 
var fffc=fc+fs+ff+fb+fi+fu;
var fstr = "<span style='color:" + fc + ";font-size:" + fs + "px; font-family:" + ff + ";font-weight:" + fb + ";font-style:"+fi+";text-decoration:"+fu+"'>"; 
mode.value = fstr +modes.innerHTML+ "</span>";  
if (document.getElementById("txtx").value=="" && modes.innerHTML=="")
{
}
else
{
var D=new Date();
var hh=D.getHours();
var mm=D.getMinutes();
var ss=D.getSeconds();
var e=document.getElementById("div1");
var txts=document.getElementById("txts");
txts.value=txts.value.replace(/\r/gi,"<br>");
txts.value=txts.value.replace("[url]","<a href=");
txts.value=txts.value.replace("[/url]"," target=_blank >点击打开链接</a>");
e.innerHTML=e.innerHTML+"<br>\n<font color=#008040>你说</font><font color=#008040> "+hh+":"+mm+":"+ss+" </font> <br>&nbsp;&nbsp;"+txts.value; 
e.scrollTop=e.scrollHeight; 

var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
xmlhttp.open("GET", 'k_win_tj.asp?use='+use.value+'&kid='+kid.value+'&txts='+txts.value+'',true); 
xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4)
{  
if (xmlhttp.status == 200)
{ 
if(xmlhttp.responseText.indexOf('e0909o') > -1)
{
alert("出现未知错误\n\n请重新打开。");
}
}
else
{
alert("不成功！");
}
}
} 
xmlhttp.send(null) 
txtx.value='';
}
} 

function cke()
{
var xmlhttpp = new ActiveXObject("Microsoft.XMLHTTP"); 
xmlhttpp.open("GET", 'k_oncho.asp?kid='+kid.value,false); 
xmlhttpp.send(null);
}

function submitForm() 
{ 
//if(event.keyCode == 13) 
//{ 
//sendText();
//
//} 
} 

function keypress(evt){
var postkey=getSelectedRadioValue("fsf");
	evt = evt ? evt : (window.event ? window.event : null); 
  if (postkey==1){
		if (!evt.shiftKey&&evt.keyCode==13){
		 sendText();
			return false;
		}
		return true;
	}
	if (postkey==2){
		if (evt.ctrlKey&&evt.keyCode==10){
		sendText();
		}
	}
}

function scss()
{ 
var ess=document.getElementById("div1");
ess.scrollTop=ess.scrollHeight+9999;
} 

function sends()
{
var url="k_win_jc22.asp?kid="+kid.value+"&kip="+kip.value
var xmlhttp = false; 
if(window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest(); 
if (xmlhttp.overrideMimeType) {
xmlhttp.overrideMimeType("text/xml"); 
} 
} 
else if (window.ActiveXObject) { 
try { 
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
} catch (e) { 
try { 
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} catch (ei) {} 
} 
} 
if (!xmlhttp) { 
window.alert("浏览器不支持."); 
return false; 
} 
			  
xmlhttp.open("GET",url,true); 

xmlhttp.onreadystatechange=function() { 
if (xmlhttp.readyState==4) { 
{
if(xmlhttp.responseText.indexOf("fffggg") > -1 )
{
document.getElementById("plo").src="k_file_2.asp?use="+use.value+"&kid="+kid.value+"&kuse="+kuse.value+"";
showOrHide3(1);
//document.bgss.play();
document.getElementById("soundMsg").src="sound/type.wma";
window.focus();
}

if(xmlhttp.responseText.indexOf("wjbsc") > -1 )
{
document.getElementById("files").innerHTML="<font color=red>对方已取消操作。</font>";
window.focus();
}
if(xmlhttp.responseText.indexOf("mmmyyy") > -1 )
{
//document.getElementById("oplo").src="k_win_jc2.asp?use="+use.value+"&kid="+kid.value+"&kuse="+kuse.value+"";
document.getElementById("hiwin").src="51KF_show.asp?use="+use.value+"&kid="+kid.value+"&kuse="+kuse.value+"";
//document.bgss.play();
document.getElementById("soundMsg").src="sound/type.wma";
window.focus();
modes.focus();
}
}

setTimeout('sends()',3000);
} 
} 
xmlhttp.send(null)
}

function getCookieVal (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}

function coo()
{
document.cookie="cha2=yes2";
}

function delss()
{
var xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP"); 
xmlhttp2.open("GET", 'k_del.asp?use='+use.value+'&id='+kid.value+'&kip='+kip.value+'',true); 
xmlhttp2.onreadystatechange=function()
{
if (xmlhttp2.readyState==4)
{
if(xmlhttp2.responseText.indexOf('500') > -1)
{
alert("操作错误！")
}
}
}
xmlhttp2.send(null) 
}

function clse()
{
alert("功能不可用！");
}
function cls()
{
txtx.value='';
}
function qx(str)
{
var xmlhttpp = new ActiveXObject("Microsoft.XMLHTTP"); 
xmlhttpp.open("GET", 'k_file_qx.asp?f='+str+'&n='+kid.value+'',false);
xmlhttpp.send(null);
showOrHide3(0);
}
function wccs()
{
var xmlhttppb = new ActiveXObject("Microsoft.XMLHTTP"); 
xmlhttppb.open("GET", 'k_file_wc.asp?n='+kid.value,false);
xmlhttppb.send(null);
showOrHide3(0);
}
-->