//************xidengke网站客服机器人版权所有
document.write('<style type="text/css">iframe{margin-top:-10px;margin-bottom:2px;margin-left:0px}form{margin-top:0px;margin-bottom:0px;}textarea{line-height:18px;font-family:verdana,arial,helvetica,sans-serif;font-size:13px;}#alertBox{right:0;bottom:-2px;width:305px;height:304px;overflow:hidden;z-index:9999;position:fixed;_position:absolute;_top:expression(eval(document.compatMode && document.compatMode == "CSS1Compat")?documentElement.scrollTop + (documentElement.clientHeight - this.clientHeight):document.body.scrollTop + (document.body.clientHeight - this.clientHeight));}.button{display:block;margin:0;padding:0 0 0 12px;height:30px;line-height:30px;font-size:12px;color:#3b444c;background:url(http://www.xidengke.com/images/bgs.gif) no-repeat 0 0;}.fl{ float:left;}#alertBox h4{line-height:26px;height:26px;font-size:14px;clear:both;color:#FF0000;font-size:14px;padding:5px 0 0;width:278px;overflow:hidden;}#alertBox h4 a{color:#FB6C00;}.button a:link,.button a:visited{color:red!important;}.button a:hover{ text-decoration:underline;}.button span.close,.button span.open,.button span.minWin{ float:right;display:inline-block;width:25px;height:20px;margin:0 1px 0 0;cursor:pointer;}.button span.close{margin-right:9px;width:41px;}.red{color:red;}.alertBoxCt{font-size:12px;padding:0 10px 20px 16px;background:url(http://www.xidengke.com/images/bgs.gif) repeat-y -304px 0;}.btm{background:url(http://www.xidengke.com/images/bgs.gif) no-repeat -608px 0;height:18px;clear:both;width:304px;margin-top:-18px;}.imgbtn{height:26px;width:26px;}.imgsubmit{height:38px;width:38px;}</style>');
var keystr='<iframe name="alertiframe" src="http://www.xidengke.com/robot/run" width="270px" frameborder="no" border="0" marginheight="2" marginwidth="3"></iframe>';
var infostr ='<table cellspacing="0" cellpadding="0"><tr><td align="left"><input type="image" src="http://www.xidengke.com/images/q.gif" onclick="doapplet(\'question\');" alt="常见问题" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/buy.gif" onclick="doapplet(\'buy\');" alt="我要订购" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/note.gif" onclick="doapplet(\'note\');" alt="我要留言" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/bye.gif" onclick="doapplet(\'bye\');" alt="我要评价" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/job.gif" onclick="doapplet(\'job\');" alt="我要应聘" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/space.gif" onclick="doapplet(\'space\');" alt="我要预订" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/vote.gif" onclick="doapplet(\'vote\');" alt="我要投票" class="imgbtn"><input type="image" src="http://www.xidengke.com/images/qq.jpg" onclick="doapplet(\'qq\');" alt="QQ交谈" class="imgbtn"></td><td align="right"><input type="image" src="http://www.xidengke.com/images/power.jpg" onclick="window.open(\'http://www.xidengke.com\');" alt="powered by xidengke"></td></tr><tr><form name="alertform" id="alertform" method="get" action="http://www.xidengke.com/robot/run" target="alertiframe"><td><textarea name="alerttext" id="alerttext" rows="3" cols="29" tabindex="0"></textarea></td></form><td><input type="image" onclick="$(\'alertform\').submit();dosubmit();" src="http://www.xidengke.com/images/submit.jpg" class="imgsubmit"></td></tr></table>';
var contentstr ='<DIV id="alertBox"><h3 class="button"><b style="float:left;">客服机器人：hi,我可以帮您吗？</b><span class="close" onclick="closeBox();"></span><span class="open" onclick="showBox();"></span><span class="minWin" onclick="minWin();"></span></h3><div class="alertBoxCt" id="alertBoxCt"><br>'+keystr +infostr +'</div><div class="btm"></div></DIV>';
document.write(contentstr);

function $(objname){ return document.getElementById(objname);}
function dosubmit(){setTimeout("$('alertform').reset();$('alertBox').focus();",800);}
function doapplet(s){
    $("alerttext").value=s;
    $("alertform").submit();
    dosubmit();
}
function showBox(o){
	var oheight = $("alertBoxCt").offsetHeight+34;
	if (o==undefined) o=$("alertBox");
	o.style.height=o.clientHeight+30+"px";
	o.style.bottom=-2+"px";
	if (o.clientHeight<oheight) setTimeout(function(){showBox(o)},30);
	if (o.clientHeight>=oheight) o.style.height=oheight+"px";
    $("alerttext").focus();
}
function closeBox(o){
	if (o==undefined) o=$("alertBox");
	$("alertBox").style.display='none';
}
function minWin(o){
	var oheight = $("alertBoxCt").offsetHeight+34;
	if (o==undefined) o=$("alertBox");
	o.style.height=o.clientHeight-30+"px";
	o.style.bottom=-5+"px";
	if (o.clientHeight<oheight && o.clientHeight>30) setTimeout(function(){minWin(o)},30);
	if (o.clientHeight<30){ o.style.height=30+"px";}
}
