﻿// JScript 文件
//var id="1124";//?????
//var myuin="20061936";
//var myusername="fyb778899.communion.cn";
var myuin="";
var myusername="";
var usermenu="";
function Firstsend(){
    var strCookie=document.cookie;
    var arrCookie=strCookie.split("; ");
    for(var i=0;i<arrCookie.length;i++){
             var arr=arrCookie[i].split("=");
             //找到名称为userId的cookie，并返回它的值
//             for(j=0;j<arr.
             if("uin"==arr[0]){
                    myuin=arr[1];
             }
             if("username"==arr[0]){
                myusername=arr[1];
             }
    }
    if(myuin==""||myuin==null){
        alert("您没有登陆！");
        window.location.href="/web/user/signin.aspx?url="+this.location.href;
    }else{
        if($("first")==null){
            closethis();
            var url="/web/trans/SenderAjax.aspx?flag=13&myuin="+myuin+"&myusername="+myusername+"&id="+id+"";
            new Ajax.Request(url,{
                       method:"GET",
                       onComplete:function(xmlhttp){
                             var html=xmlhttp.responseText;   
                             if(!html || html.length==0)
                             {
                               
                             }
                             else
                             {
                                document.body.insertAdjacentHTML("beforeEnd",html);
                             }
                          }
                        });
        }
    }
}
function closefirst(){
    if($("first")!=null){
        Element.remove("first");
    }
}
function closeSecond(){
    if($("second")!=null){
        Element.remove("second");
    }
}
function sendyuyue(aa){
    closefirst();
    var url="/web/trans/SenderAjax.aspx?flag=11&myuin="+myuin+"&myusername="+myusername+"&id="+id+"&aa="+aa+"";
    new Ajax.Request(url,{
               method:"GET",
               onComplete:function(xmlhttp){
                     var html=xmlhttp.responseText;   
                     if(!html || html.length==0)
                     {
                       
                     }
                     else
                     {                                
                          document.body.insertAdjacentHTML("beforeEnd",html);
                     }
                  }
                });
}
function dosendyuyue(aa){
    closefirst();
     var zhiwei="";
     if($("select")!=null){
        zhiwei=document.getElementById("select").options[document.getElementById("select").selectedIndex].value;
        if(zhiwei=="")
        {
            alert("请选择");
            return false;
        }
     }
    closeSecond();
     var url="/web/trans/SenderAjax.aspx?flag=14&myuin="+myuin+"&myusername="+myusername+"&content="+myusername+"请求与您预约!!&zhiwei="+zhiwei+"";
     new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0 || html=="0")
                 {
                    alert("出错"); 
                 }
              }
            });
    if(aa=="1"){
    alert("您已经发送了预约，请等待对方的回复!!!");
    MsgBack();
    }else if(aa=="0"){
    alert("对方现未在线，请等待其回复!!!");
    }
}
var t;
function MsgBack(){
    var url="/web/trans/SenderAjax.aspx?flag=15&myuin="+myuin+"&myusername="+myusername+"";
        new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 { 
                 }else if(html=="0"){
                    send();
                 }else if(html=="1"){
                    cuowu();
                 }else if(html=="2"){
                    send();
                 }
              }
            });
    t=window.setTimeout("MsgBack()",1000);
}
function cuowu(){
//    if($("fasdfa")==null){
        alert("对方拒绝您的预约请求!!");
        clearTimeout(t);
//        var str="<div id=\"fasdfa\"></div>";
//        document.body.insertAdjacentHTML("beforeEnd",str);
        var url="/web/trans/SenderAjax.aspx?flag=16&myuin="+myuin+"&myusername="+myusername+"";
            new Ajax.Request(url,{
               method:"GET",
               onComplete:function(xmlhttp){
                     var html=xmlhttp.responseText;        
                     if(!html || html.length==0 || html=="0")
                     { 
                        alert("出错");
                     }
//                     else
//                     {
//                        Element.remove("fasdfa");
//                     }
                  }
                });
//    }
//     Element.remove("fasdfa");
}
function send(){
    if($("IM")==null){
        alert("对方接受请求!!");
        clearTimeout(t);
        var url="/web/trans/SenderAjax.aspx?flag=16&myuin="+myuin+"&myusername="+myusername+"";
            new Ajax.Request(url,{
               method:"GET",
               onComplete:function(xmlhttp){
                     var html=xmlhttp.responseText;        
                     if(!html || html.length==0 || html=="0")
                     { 
                        alert("出错");
                     }
                  }
                });
        var time=new Date();
        var str="<div class=\"shiwu\" id=\"IM\" onmousedown='getFocus(this)'  style='position:absolute;z-index:1000;left:100px;top:100px'>"
        +"<div id=\"aaaaa\" onmousedown='startDrag(this)' onmouseup='stopDrag(this)' onmousemove='drag(this)' >"
        +"<h1 id=\"title\">应聘国内贸易正在用<img src=\"/web/trans/img/im.gif\" align=\"absmiddle\"  />进行交流中...</h1>"
        +"</div>"
        +"<div class=\"shiwu_cen\">"
        +"<div class=\"shiwu_cen_left\" id=\"xinxi_left\">"
        +"<span>事务信息：</span>应聘国内贸易"
        +"<p align=\"right\"><input type=\"button\" value=\" \" /></p>"
        +"</div>"
        +"<div class=\"shiwu_right\">"
        +"<div class=\"hr_form_ming\" id=\"hr_mingp\">"
        
        +"</div>"
        +"</div>"
        +"<br clear=\"left\" />"
        +"</div>"
        +"<div class=\"jiaoliucneng\">"
        +"<ul class=\"info_zhanshi\">"
        +"<li><a href=\"javascript:;\"  class=\"jiaoliucnengh3\" onclick=\"onselect('3')\" id=\"a3\">交互流程</a></li>"
        +"<li><a href=\"javascript:;\" onclick=\"onselect('4')\" id=\"a4\">IM交流内容</a></li>"
        +"</ul>"
        +"<br clear=\"left\" /> "
        +"<div style=\"display:none;\" id=\"neirong\" class=\"jhlc_left\">"
        +"</div>"
        +"<div class=\"jhlc_left\" id=\"divliucheng\">"
        +"<ul>"
       	+"<li class=\"jhlc_time\" style=\"text-align:center;\">时间</li>"
        +"<li class=\"jhlc_fans\">交流方式</li>"
        +"<li class=\"jhlc_cont\" style=\"text-align:center;\">交流内容</li>"
        +"</ul>"
        +"<div id=\"jiaot_guoc\" class=\"hr_form_b_left_tool_but\">"
        
        +"</div>"
        +"</div>"
        +"<div class=\"jhlc_right\">"
   	    +"<h4>个人日记</h4>"
        +"<textarea name=\"textarea\" id=\"textarea1\" cols=\"45\" rows=\"8\" class=\"jhlc_ganshou\" onfocus=\"if(value=='-可以记载您和客户交流的感受-'){value=''}\" onblur=\"if(value==''){value='-可以记载您和客户交流的感受-'}\">-可以记载您和客户交流的感受-</textarea>"
        +"<p align=\"right\"><input type=\"button\" value=\"保存\" onclick=\"riji()\"/></p>"
        +"</div>"
        +"<br clear=\"left\" />"
        +"</div>"
        +"<div class=\"jiaoliucneng\">"
  	    +"<ul class=\"info_zhanshi\">"
  	    +"<li><a href=\"javascript:;\" id=\"a1\" onclick=\"onselect('1')\" class=\"jiaoliucnengh3\">信息展示</a></li>"
    	+"<li><a href=\"javascript:;\" id=\"a2\" onclick=\"onselect('2')\"><img src=\"/web/trans/img/bottom_im.gif\" align=\"absmiddle\" />IM</a></li>"
        +"<li><a href=\"javascript:;\"><img src=\"/web/trans/img/netphone.gif\" align=\"absmiddle\" />网络电话</a></li>"
        +"<li><a href=\"javascript:;\" onclick=\"javascript:document.getElementById('divfax').style.display='';\"><img src=\"/web/trans/img/bottom_fox.gif\"align=\"absmiddle\" />网络传真</a></li>"
        +"<li><a href=\"javascript:;\" onclick=\"javascript:document.getElementById('divSms').style.display='';\"><img src=\"/web/trans/img/netmages.gif\" align=\"absmiddle\" />网络短信</a></li>"
        +"<li><a href=\"javascript:;\" onclick=\"javascript:mailto();\"><img src=\"/web/trans/img/net_email.gif\" align=\"absmiddle\" />E-mail</a></li>"
        +"<li><a href=\"javascript:;\" onclick=\"javascript:document.getElementById('divfile').style.display='';\"><img src=\"/web/trans/img/daorun.gif\"align=\"absmiddle\" />导入/导出</a></li>"
        +"<li><a href=\"javascript:;\"><img src=\"/web/trans/img/benzhu.gif\" align=\"absmiddle\" />备注</a></li>"
        +"</ul>"
        +"<br clear=\"left\" /> "
        +"<font id=\"liuyan\">"
        +"<textarea name=\"textarea2\" id=\"textarea2\" cols=\"45\" rows=\"5\" class=\"info_text\" onfocus=\"if(value=='您好!该好友不在线你可以通过短信留言的方式给对方留言.他(她)会在第一时间里看到你给他(他)的留言......'){value=''}\" onblur=\"if(value==''){value='您好!该好友不在线你可以通过短信留言的方式给对方留言.他(她)会在第一时间里看到你给他(他)的留言......'}\">您好!该好友不在线你可以通过短信留言的方式给对方留言.他(她)会在第一时间里看到你给他(他)的留言......</textarea>"
        +"<p align=\"right\"><input type=\"button\" value=\"留言\" onclick=\"liuyan()\" /></p>"
        +"</font>"
        +"<font id=\"IMjiaoliu\" style=\"display:none;\">"
        +"<textarea name=\"textarea2\" id='txtSendMessage"+myuin+"' cols=\"45\" rows=\"5\" class=\"info_text\" ></textarea>"
        +"<p align=\"right\"><input type=\"button\" value=\"发送\" onclick=\"return addMsg()\"/></p>"
        +"</font>"
        +"</div>"
        +"<div class=\"kj_box\" id=\"divfile\" onmousedown='getFocus(this)'  style='position:absolute;z-index:1000;left:100px;top:100px;display:none;' >"
        + "<div onmousedown='startDrag(this)' onmouseup='stopDrag(this)' onmousemove='drag(this)'><h3><span><img src=\"/web/trans/img/off.gif\" onclick=\"javascript:document.getElementById('divfile').style.display='none';\" alt=\"关闭\" /></span><img src=\"/web/trans/img/quanxi.gif\" align=\"absmiddle\" /> 提示框</h3></div>"
        + "<div class=\"kj_box_main\">"
        + "<p>导入的信息：</p>"
        + "标题：<input type=\"text\" id=\"daoru_title\" style=\"border:1px solid #e0e2ee;\"></br>"
        + "内容：<textarea id=\"daoru_content\" cols=\"20\" rows=\"10\" style=\"border:1px solid #e0e2ee;\"></textarea>"
        + "</div>"
        + "<div style=\"text-align:center;margin-top:10px;margin-bottom:10px;\">"
        + "<input type=\"button\" value=\"确认\"  style=\"background:url(/web/Trans/img/but_bg.jpg) no-repeat;width:76px;height:23px;border:none;color:#052e4c;margin-left:5px;margin-top:5px;\" onclick=\"daoru()\"/>"
        + "<input type=\"button\" value=\"取消\" style=\"background:url(/web/Trans/img/but_bg.jpg) no-repeat;width:76px;height:23px;border:none;color:#052e4c;margin-left:5px;margin-top:5px;\" onclick=\"javascript:document.getElementById('divfile').style.display='none';\"  />"
        + "</div>"
        + "</div>";
        str += "<div onmousedown='getFocus(this)' style='border:1px solid #abbdd4;position:absolute;z-index:1000;left:100px;top:100px;display:none;' id=\"divSms\"><div style='background:#336699;width:200px;' onmousedown='startDrag(this)' onmouseup='stopDrag(this)' onmousemove='drag(this)'><span style='color:#fff;float:right;margin-right:10px;'/><a href='javascript:void(0)' onclick=\"javascript:document.getElementById('divSms').style.display='none';\" style='color:#fff;'>关闭</a></span><span style='color:#fff;'>发送短信</span> </div><iframe id='idiframe' src='/Web/Trans/Default3.aspx?flag=1&username=" + myusername + "&id=" + id + "' frameborder='0' width=200px height=200px;></iframe></div>";
        str += "<div onmousedown='getFocus(this)' style='border:1px solid #abbdd4;position:absolute;z-index:1000;left:100px;top:100px;display:none;' id=\"divfax\"><div style='background:#336699;width:250px;' onmousedown='startDrag(this)' onmouseup='stopDrag(this)' onmousemove='drag(this)'><span style='color:#fff;float:right;margin-right:10px;'/><a href='javascript:void(0)' onclick=\"javascript:document.getElementById('divfax').style.display='none';\" style='color:#fff;'>关闭</a></span><span style='color:#fff;'>发送传真</span> </div><iframe id='idiframe' src='/Web/Trans/Default3.aspx?flag=2&username=" + myusername + "&id=" + id + "' frameborder='0' width=250px height=230px;></iframe></div>";
        str += "</div>";
        
        type();//交谈过程
        title();//标题
        getleft_content();//获得产品简介
        geta_content();
        XMLContent();
        document.body.insertAdjacentHTML("beforeEnd",str); 
    }
}
function riji(){
var content=$("textarea1").value;
if(content==""||content=="-可以记载您和客户交流的感受-"){
alert("请输入日记内容");
return false;
}
var url="/web/trans/SenderAjax.aspx?flag=20&myuin="+myuin+"&myusername="+myusername+"&id="+id+"&content="+content+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                   alert("记录失败");
                 }
                 else
                 {        
                 alert("记录成功");
                 }
              }
            });
}
function liuyan(){
var content=$("textarea2").value;
if(content==""||content=="您好!该好友不在线你可以通过短信留言的方式给对方留言.他(她)会在第一时间里看到你给他(他)的留言......"){
alert("请输入留言内容");
return false;
}
var url="/web/trans/SenderAjax.aspx?flag=19&myuin="+myuin+"&myusername="+myusername+"&content="+content+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                   alert("留言失败");
                 }
                 else
                 {        
                 alert("留言成功");                        
                      $("textarea2").value="";
                 }
              }
            });
}
function onselect(object){
    if(object=="2"){
        document.getElementById("a2").className="jiaoliucnengh3";
        document.getElementById("a1").className="";
        document.getElementById("a4").className="jiaoliucnengh3";
        document.getElementById("a3").className="";
        document.getElementById("liuyan").style.display="none";
        document.getElementById("IMjiaoliu").style.display="";
        document.getElementById("divliucheng").style.display="none";
        document.getElementById("neirong").style.display="";
    }else if(object=="1"){
        document.getElementById("a2").className="";
        document.getElementById("a1").className="jiaoliucnengh3";
        document.getElementById("a4").className="";
        document.getElementById("a3").className="jiaoliucnengh3";
        document.getElementById("liuyan").style.display="";
        document.getElementById("IMjiaoliu").style.display="none";
        document.getElementById("divliucheng").style.display="";
        document.getElementById("neirong").style.display="none";
    }else if(object=="3"){
        document.getElementById("a4").className="";
        document.getElementById("a3").className="jiaoliucnengh3";
        document.getElementById("divliucheng").style.display="";
        document.getElementById("neirong").style.display="none";
    }else if(object=="4"){
        document.getElementById("a2").className="jiaoliucnengh3";
        document.getElementById("a1").className="";
        document.getElementById("a4").className="jiaoliucnengh3";
        document.getElementById("a3").className="";
        document.getElementById("liuyan").style.display="none";
        document.getElementById("IMjiaoliu").style.display="";
        document.getElementById("divliucheng").style.display="none";
        document.getElementById("neirong").style.display="";
    }
}
var ddddddd;
function closethis(){
    clearTimeout(ddddddd);
var url="/web/trans/SenderAjax.aspx?flag=12&myuin="+myuin+"&myusername="+myusername+"&id="+id+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;   
                 if(!html || html.length==0)
                 {
                   
                 }
                 else
                 {
                    if($("IM")!=null){
                        Element.remove("IM");
                        Element.remove("divfile");
                    }
                 }
              }
            });
}
function geta_content(){
var url="/web/trans/SenderAjax.aspx?flag=10&myuin="+myuin+"&myusername="+myusername+"&id="+id+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;   
                 if(!html || html.length==0)
                 {
                   
                 }
                 else
                 {                                
                      $("hr_mingp").innerHTML=html;
                 }
              }
            });
}
function getleft_content(){
var url="/web/trans/SenderAjax.aspx?flag=9&myuin="+myuin+"&myusername="+myusername+"&id="+id+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;   
                 if(!html || html.length==0)
                 {
                   
                 }
                 else
                 {                                
                      $("xinxi_left").innerHTML=html;
                 }
              }
            });
}
function seta_content(){
   var a= document.getElementById("a");
   a.className="hr_form_ming_tit_2";
   b.className="";
   c.className="";
   document.getElementById("a_content").style.display="block";
   document.getElementById("b_content").style.display="none";
   document.getElementById("c_content").style.display="none";
}
function setb_content(){
   var b= document.getElementById("b");
   b.className="hr_form_ming_tit_2";
   a.className="";
   c.className="";
   document.getElementById("a_content").style.display="none";
   document.getElementById("b_content").style.display="block";
   document.getElementById("c_content").style.display="none";
}
function setc_content(){
   var c= document.getElementById("c");
   c.className="hr_form_ming_tit_2";
   a.className="";
   b.className="";
   document.getElementById("a_content").style.display="none";
   document.getElementById("b_content").style.display="none";
   document.getElementById("c_content").style.display="block";
}
function title(){
//从数据库提取
var url="/web/trans/SenderAjax.aspx?flag=1&myuin="+myuin+"&myusername="+myusername+"&id="+id+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;   
                 if(!html || html.length==0)
                 {
                   
                 }
                 else
                 {                   
                      $("aaaaa").innerHTML=html;
                 }
              }
            });
}
function type(){
//交谈过程
var url="/web/trans/SenderAjax.aspx?flag=2&myuin="+myuin+"&myusername="+myusername+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                   
                 }
                 else
                 {                                
                      $("divliucheng").innerHTML=html;
                 }
              }
            });
}
function daoru(){
    var daoru_title=$("daoru_title").value;
    if(daoru_title==""){
        alert("标题不能为空！！");
        return false;
    }
    var daoru_content=$("daoru_content").value;
    if(daoru_content==""){
        alert("内容不能为空！！！");
        return false;
    }
    var per=daoru_content.split('\r\n');
    for(i=0;i<per.length-1;i++){
        daoru_content=daoru_content.replace("\r\n","<br/>");
        }
    var url="/web/trans/SenderAjax.aspx?flag=17&uin="+uin+"&username="+username+"&daoru_content="+daoru_content+"&daoru_title="+daoru_title+"";
        new Ajax.Request(url,{
               method:"GET",
               onComplete:function(xmlhttp){
                     var html=xmlhttp.responseText;   
                     if(!html|| html.length==0||html=="")
                     {
                        alert("出错");
                     }else{
                        if(html=="0"){
                            alert("导入失败！");
                            return false;
                        }
                        else if(html=="1")
                        {
                            alert("导入成功！");
                            $("daoru_title").value="";
                            $("daoru_content").value="";
                            $('divfile').style.display='none';
                            type();
                        }
                     }
                  }
                });
}
function botton1_onclick() {
        if(Element.visible("tianjia"))
        {
          Element.hide("tianjia");
        }
         else
        {
            Element.show("tianjia");
         }
}
function addType(){
//新建类型
var typetext=$("textTP").value;
var url="/web/trans/SenderAjax.aspx?flag=3&myuin="+myuin+"&myusername="+myusername+"&typetext="+typetext+"";
new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0|| html=="0")
                 {
                   alert("添加失败");
                 }
              }
            });
            type();
            $("textTP").value="";
}
var typeselect;
function textTypeselect(){
    var area=document.getElementById("texttype");
    var aindex=area.selectedIndex;
    typeselect=area.options[aindex].value+"|"+area.options[aindex].text+"|";
}
function XMLContent(){
//对话内容
    var url="/web/trans/SenderAjax.aspx?flag=4&myuin="+myuin+"&myusername="+myusername+"";
    new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                   //clearTimeout(ddddddd);
                 }
                 else
                 {
                    $("neirong").innerHTML+=html;
                 }
              }
            });
    ddddddd=window.setTimeout("XMLContent()",500);
}
function addMsg(){
//写入XML
var xcontent=$("txtSendMessage"+myuin+"");
var content=xcontent.innerHTML; 
if(content.strip()=="")
{
    alert("内容不能为空");
    return;
}
else
{
var per=content.split('\r\n');
for(i=0;i<per.length-1;i++){
    content=content.replace("\u000D\u000A","<br/>");
}
var url="/web/trans/SenderAjax.aspx?flag=5&myuin="+myuin+"&myusername="+myusername+"&content="+content+"";
    new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                    
                 }
              }
            });
           $("txtSendMessage"+myuin+"").value=""; 
}
}
function ActionTrans(){
//获得相关话题
var url="/web/trans/SenderAjax.aspx?flag=6&myuin="+myuin+"&myusername="+myusername+"";
    new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0)
                 {
                    alert("出错"); 
                 }
                 else
                 {
                    $("others").innerHTML=html;
                 }
              }
            });
}
function getcheckbox(){
    var chkall=document.all("chkmenu");
    usermenu="";
    for(var i=0;i<chkall.length;i++)
    {
        if(chkall[i].checked==true)
        {
            usermenu+=chkall[i].value+",";
        }
    }
}
function botton5_onclick() {
        if(Element.visible("newTrans"))
        {
          Element.hide("newTrans");
        }
         else
        {
            Element.show("newTrans");
         }
    }
function addTrans(){
//创建新的关联话题
    alert("功能未开放");
}
function jieshu_onclick(){
closethis();
//    var keys=$("keys").value;
//    var title=$("title").value;
//    var content=$("content").value;
    var url="/web/trans/SenderAjax.aspx?flag=18&myuin="+myuin+"&myusername="+myusername+"";
        new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0 || html=="0")
                 {
                    alert("出错"); 
                 }else{
                    document.body.insertAdjacentHTML("beforeEnd",html);
                 }
              }
            });
}
function End(){
    var per="";
    if($("RadioGroup1_2").checked==true){
        per=$("textarea").value;
    }else{
        per=$("wenzi").innerHTML;
    }
    var url="/web/trans/SenderAjax.aspx?flag=7&content="+per+"&myuin="+myuin+"&myusername="+myusername+"&thisEnd=true";
    new Ajax.Request(url,{
               method:"GET",
               onComplete:function(xmlhttp){
                     var html=xmlhttp.responseText;   
                     if(!html || html.length==0||html=="")
                     {
                        alert("您已经结束,无法再输入!!");
                     }
                  }
                });
closeEndMSG();
}
function closeEndMSG(){
    closethis();
    Element.remove("EndMSG");
}
function checked1(){
if($("EndMSG")!=null){
	$("wenzi").innerHTML="请您明天下午过来面试";
	$("wenzi").style.display="block";
	$("zidingyi").style.display="none";
	$("textarea").value="";
	}
}
function checked2(){
if($("EndMSG")!=null){
	$("wenzi").innerHTML="请您下周一过来上班";
	$("wenzi").style.display="block";
	$("zidingyi").style.display="none";
	$("textarea").value="";
	}
}
function checked3(){
    if($("EndMSG")!=null){
	    $("wenzi").style.display="none";
	    $("zidingyi").style.display="block";
	    $("textarea").value="";
	}
}
function baocun_onclick(){
    var keys=$("keys").value;
    var title=$("title").value;
    var content=$("content").value;
    var url="/web/trans/SenderAjax.aspx?flag=8&myuin="+myuin+"&myusername="+myusername+"&usermenu="+usermenu+"&type="+typeselect+"&keys="+keys+"&content="+content+"&title="+title+"";
        new Ajax.Request(url,{
           method:"GET",
           onComplete:function(xmlhttp){
                 var html=xmlhttp.responseText;        
                 if(!html || html.length==0 || html=="0")
                 {
                    alert("出错"); 
                 }
              }
            });
}
//以下是窗口移动的代码 
var moveable=false;
var index=10000;//z-index;
function getFocus(obj)
{
    index = index + 2;
    var idx = index;
    $(obj).style.zIndex=idx;
}
//开始拖动;
function startDrag(obj)
{
//锁定标题栏;
obj.setCapture();
//定义对象;
var win = obj.parentNode;


x0 = event.clientX;
y0 = event.clientY;
x1 = parseInt(win.style.left);
y1 = parseInt(win.style.top);

moveable = true;
}
//拖动;
function drag(obj)
{
var win = obj.parentNode;
//var sha = win.nextSibling;
if(moveable)
{
  if(parseInt(y1 + event.clientY - y0)>=0 && parseInt(x1 + event.clientX - x0)>=0)
  {
     win.style.left = x1 + event.clientX - x0;
     win.style.top = y1 + event.clientY - y0;
}
}
}
//停止拖动;
function stopDrag(obj)
{

//放开标题栏;
obj.releaseCapture();
moveable = false;
}