var YXM_form;var YXM_isFirstTime=true;var YXM_result_text;var YXM_YinXiangMaData;var YXM_resultScript;var YXM_validText;var YXM_inputbox;var o_YXM_box;var YXM_request_check;var YXM_valid_check;var YXM_Timeout;var YXM_last_input;var YXM_request_timeOut;var YXM_refreshtimes=1;var YXM_timeOutMsg;var YXM_divFocusFlag=false;var YXM_inputFocusFlag=false;var YXM_head=document.getElementsByTagName("head").item(0)||document.documentElement;var YXM_body=document.getElementsByTagName("body")[0]||document.body;var YXM_here=document.getElementById("YXM_here");var YinXiangMaDataJson={pk:123,sid:Math.random(),tabindex:1,theme:'default',size:'8',style:'style1',type:'image',apiserver:YXM_localsec_url,mediaserver:YXM_localsec_url,clickserver:"http://www.yinxiangma.com",level:'31'};YinXiangMa=new YinXiangMaObject(YinXiangMaDataJson);YinXiangMa.init();function YinXiangMaObject(opts){var YinXiangMaData=YXM_YinXiangMaData=opts;this.theme={"default":{bg:'default'}};this.size={"10":{"w":300,"h":120}};this.player={"width":this.size[10].w,"height":this.size[10].h,"file":YinXiangMaData.sid};this.css={"style1":'div.YXM-box input{margin:0;padding:0}.YXM-box{width:_WIDTH_A23_px;padding:4px;-moz-border-radius:4px;-webkit-border-radius:4px;background:url('+YinXiangMaData.mediaserver+'images/layer_bg_THEME_BG_.png);font-size:12px;font-family:"微软雅黑","Microsoft Yahei";}.YXM-clear{diplay:block!important;float:none!important;clear:both;overflow:hidden;width:auto!important;height:0!important;margin:0 auto!important;padding:0!important;font-size:0;line-height:0}.YXM-box i{background:url('+YinXiangMaData.mediaserver+'images/YXM_spirit_01.gif) no-repeat scroll;display:block}.YXM-bg{border:1px #ccc solid;background:#fff;padding:10px;width:300px}.YXM-title{zoom:1;background:#fefefe;width:_TIPS_WIDTH_px}.YXM-title div.YXM_title{font-weight:900;float:left;line-height:30px}a.YXM_lightBox_reload{text-align:center;background-color:#e26939;float:right;color:#fff;text-decoration:none}a.YXM_lightBox_reload i{background-position:-2px -64px;height:20px;width:70px}a.YXM_lightBox_reload:hover i{background-position:-2px -87px;height:20px;width:70px}.YXM-content{ width:302px; margin-top:0px;margin-left:0px;background:none; }.YXM-link{height:60px;width:250px;padding:0;margin:0;display:block}.YXM-content img{}.YXM-tips{padding:5px 0 5px 0;width:_TIPS_WIDTH_px}.YXM-tips .tips{float:left}.YXM-tips .tips em{font-style:normal}.YXM-tips .tips em.color{color:#f79a10}.YXM-tips span.bullet{float:right;display:block}.YXM-tips span.bullet a.YXM-logo-link{margin:0px;color:#666;text-decoration:none;cursor:pointer;margin:0px;display:block}'};this.html={"image":'<div class="YXM-box" id="YXM_flow_box" tabIndex="0" style="position: absolute; clear: both;z-index: 10003; zoom:1; top:2px; visibility:hidden;outline:none;" hidefocus="true" onmouseover="javascript:YinXiangMa.showPanel_onmouseover(\'div\');" onmouseout="javascript:YinXiangMa.showPanel_onmouseout(\'div\');" onfocus="javascript:YinXiangMa.showPanel_onfocus(\'div\');" onblur="javascript:YinXiangMa.showPanel_onblur(\'div\');" ><div class="YXM-bg"><div class="YXM-title"><div class="YXM_title">请输入验证码</div><a href="javascript:YinXiangMa.reload();YinXiangMa.showPanel_onfocus(\'div\');" id="YXM_reload" class="YXM_lightBox_reload"><i></i></a><div class="YXM-clear"></div></div><div class="YXM-content" id="YinXiangMa-player-zone"></div><div class="YXM-tips"><span id="YinXiangMa-instr-msg" class="tips" ></span><span class="bullet"><a class="YXM-logo-link" href="http://www.yinxiangma.com" target="_blank">印象码</a></span><div class="YXM-clear"></div></div></div></div><span id="YinXiangMa_challenge_container"></span>'};this.byid=function(id){return document.getElementById(id);};this._bn=function(){if(!YinXiangMaData.sid){return;}
if(YinXiangMaData.type=="image"){this.loadImageYzm();return;}};this.loadImageYzm=function(){try{document.getElementById('YinXiangMa-player-zone').innerHTML='<div id="d_BigPic" class="" style="width:'+this.player.width+'; height:'+this.player.height+'px; position: relative; overflow-x: hidden; overflow-y: hidden;border:0;margin:0;padding:0;"><a style="border:0;margin:0;padding:0;width:'+this.player.width+'px;height:'+this.player.height+'px;line-height: 27px;display: block;text-align: center;position: absolute;top: 0px; z-index:10; background:url('+YinXiangMaData.mediaserver+'images/transparent.gif);" target="_blank" href="'+YinXiangMaData.clickserver+'" id="clickable_img"></a><img style="border:0;padding:0;margin:0;position:absolute;z-index:3;" src="'+YinXiangMaData.apiserver+'securimage_show.php?w='+this.player.width+'&h='+this.player.height+'&t='+Math.random()+'"><img id="YXMimgOnloadMessage"  style="position:absolute; top:35px; left:40%; z-index:1; " src="'+YinXiangMaData.mediaserver+'images/loading2.gif"></div>';YXM_inputbox=document.getElementById('seccodeverify_xyz_p');return;}catch(ex){}};this.reload=function(){this.byid('seccodeverify_xyz_p').value="";this.byid('YXM_input_result').value="";YXM_last_input="";this._bn();if(typeof(YXM_callback_clear)!="undefined"&&typeof(YXM_callback_clear)=="function"){YXM_callback_clear();}
this.clear_check_icon();this.byid('YinXiangMa_challenge').value=Math.random();};this._bv=function(){var width=this.player.width!=undefined?this.player.width:300;var bgi=this.theme[YinXiangMaData.theme].bg!=undefined?this.theme[YinXiangMaData.theme].bg:'default';var css=this.css[YinXiangMaData.style]!=undefined?this.css[YinXiangMaData.style]:this.css['style1'];css=css.replace(/THEME_BG_/g,bgi);css=css.replace(/_WIDTH_A23_/g,width+23);css=css.replace(/_TIPS_WIDTH_/g,width);return css;};this.initcss=function(){var cssStr=this._bv(),style=document.createElement("style");style.setAttribute('type','text/css');if(style.styleSheet){style.styleSheet.cssText=cssStr;}else{style.appendChild(document.createTextNode(cssStr));}
YXM_head.appendChild(style);};this.init=function(){var inputNode=document.createElement('input');inputNode.id='htmlLoc';inputNode.type='hidden';this.initcss();var _bx=this.html[YinXiangMaData.type];if(_bx!=undefined){document.body.appendChild(inputNode);inputNode.outerHTML=_bx;YXM_here.outerHTML='<div style="width:140px;height:30px;clear:both;"><input size="20" autocomplete="off" type="text" onkeyup="javascript:YinXiangMa.keyup();"  name="YinXiangMa_response" id="seccodeverify_xyz_p" style="width:115px;color:#888;margin:0;border:1px solid #ccc;padding:1px;height:23px; line-height:23px; font-size:14px;float:left;"  value="点击获取验证码"/><div id="YXM_check_icon"style="float: left; width:20px;"></div></div><input type="hidden" name="YXM_input_result" id="YXM_input_result" value=""><input type="hidden" name="YXM_level" id="YXM_level" value="'+YinXiangMaData.level+'"><input type="hidden" name="YinXiangMa_pk" id="YinXiangMa_pk" value="'+YinXiangMaData.pk+'"><input type="hidden" name="YinXiangMa_challenge" id="YinXiangMa_challenge" value="'+YinXiangMaData.sid+'">';this._bn();YXM_inputbox=this.byid('seccodeverify_xyz_p');o_YXM_box=this.byid('YXM_flow_box');}else{}
setTimeout(function(){YinXiangMa.inputAffair();},500);};this.getXYWH=function(){var nLt=0;var nTp=0;var offsetParent=YXM_inputbox;while(offsetParent!=null&&offsetParent!=document.body){nLt+=offsetParent.offsetLeft;nTp+=offsetParent.offsetTop;offsetParent=offsetParent.offsetParent;}
var Sys={};var tempMargin=document.body.style.border;var tempPadding=document.body.style.margin;var tempBorder=document.body.style.padding;document.body.style.border="0";document.body.style.margin="0";document.body.style.padding="0";nTp-=(o_YXM_box.offsetHeight==0?157:o_YXM_box.offsetHeight)+2;if(nTp<0){nTp+=(o_YXM_box.offsetHeight==0?157:o_YXM_box.offsetHeight)+YXM_inputbox.offsetHeight+4;}
o_YXM_box.style.top=nTp+"px";o_YXM_box.style.left=nLt+"px";document.body.style.border=tempMargin;document.body.style.margin=tempPadding;document.body.style.padding=tempBorder;}
this.showPanel_onfocus=function(e){if(e=="div")YXM_divFocusFlag=true;else YXM_inputFocusFlag=true;if(typeof(o_YXM_box)!="undefined"){o_YXM_box.style.visibility='visible';this.getXYWH();}}
this.showPanel_onblur=function(e){setTimeout("YinXiangMa.showPanel_onblur_timeout('"+e+"')",200);}
this.showPanel_onblur_timeout=function(e){if(e=="div")YXM_divFocusFlag=false;else YXM_inputFocusFlag=false;if(!(YXM_divFocusFlag||YXM_inputFocusFlag)){typeof(o_YXM_box)=="undefined"?null:o_YXM_box.style.visibility='hidden';}}
this.showPanel_onmouseover=function(){YXM_divFocusFlag=true;}
this.showPanel_onmouseout=function(e){setTimeout("YXM_divFocusFlag=false;",200);}
this.keyup_callback=function(){YXM_valid_check='';var res="";if(typeof(YXM_ajax_result)=="undefined")res="";else res=YXM_ajax_result;this.byid('YXM_input_result').value=YXM_result_text;if(res=="true"){YinXiangMa.check_right_icon();if(typeof(YXM_valided_true)!="undefined"&&typeof(YXM_valided_true)=="function"){YXM_valided_true();}}else{YinXiangMa.check_error_icon();if(typeof(YXM_valided_false)!="undefined"&&typeof(YXM_valided_false)=="function"){YXM_valided_false();}}
if(YXM_resultScript!=null)YXM_resultScript.parentNode.removeChild(YXM_resultScript);}
this.keyup=function(){YXM_validText=YXM_inputbox.value;if(YXM_last_input==YXM_validText||YXM_validText==''||YXM_validText=='点击获取验证码')return;YXM_last_input=YXM_validText;if(YXM_resultScript!=null&&YXM_resultScript.parentNode!=null)YXM_resultScript.parentNode.removeChild(YXM_resultScript);YXM_resultScript=document.createElement('SCRIPT');YXM_resultScript.setAttribute("type","text/javascript");if(typeof(YXM_resultScript.onload)!="undefined"){YXM_resultScript.onload=function(){YinXiangMa.keyup_callback();};}else{YXM_resultScript.onreadystatechange=function(){if(this.readyState=="loaded"||this.readyState=="complete"){YinXiangMa.keyup_callback();}};}
YXM_valid_check=(new Date()).valueOf();YXM_resultScript.setAttribute("src",YXM_localsec_url+'securimage_valid.php?c='+YXM_validText+'&l='+YXM_YinXiangMaData.level+'&t='+this.byid('YinXiangMa_challenge').value);YXM_head.appendChild(YXM_resultScript);}
this.inputAffair=function(){var YXM_inputarea=this.byid('seccodeverify_xyz_p');YXM_inputarea.onclick=function(){YinXiangMa.showPanel_onfocus('input');if(this.value!='点击获取验证码'){this.style.color='#333';}else{this.style.color='#333';this.value='';};}
YXM_inputarea.onblur=function(){YinXiangMa.showPanel_onblur('input');if(this.value==''){this.value='点击获取验证码';this.style.color='#888';};}}
this.clear_check_icon=function(){var YXM_check_icon=document.getElementById('YXM_check_icon');if(YXM_check_icon!=null||YXM_check_icon!=undefined){YXM_check_icon.innerHTML='';}else{return false;}}
this.check_right_icon=function(){var YXM_check_icon=document.getElementById('YXM_check_icon');if(YXM_check_icon!=null||YXM_check_icon!=undefined){YXM_check_icon.innerHTML='<img style="margin-top: 2px;margin-right: 2px;border:none;height: 16px;width: 16px;" src="'+YXM_YinXiangMaData.mediaserver+'images/yxm_check_right.gif" />';}else{return false;}}
this.check_error_icon=function(){var YXM_check_icon=document.getElementById('YXM_check_icon');if(YXM_check_icon!=null||YXM_check_icon!=undefined){YXM_check_icon.innerHTML='<img style="margin-top: 2px;margin-right: 2px;border:none;height: 16px;width: 16px;" src="'+YXM_YinXiangMaData.mediaserver+'images/yxm_check_error.gif" />';}else{return false;}}};