/*js代码(www.jsdaima.com)是it资源下载与it技能学习平台。我们拒绝滥竽充数,只提供精品it资源!*/ var doc=document.documentelement || document.body; var isie=(document.all)?true:false; var ie_version; if(isie){ var version=navigator.appversion.split(';'); var trim_version=version[1].replace(/[ ]/g, ''); if(trim_version=='msie7.0'){ ie_version=7; }else if(trim_version=='msie6.0'){ ie_version=6; } } try{document.execcommand('backgroundimagecache', false, true);}catch(e){}; function $_(obj){ return document.getelementbyid(obj)?document.getelementbyid(obj):''; } function set_number(obj, float){ p=float==1?/[^\d-.]/g:/[^\d]/g; obj.value=obj.value.replace(p, ''); } function product_review_show_star(v){ for(i=1; i<=5; i++){ $_('rating_'+i).src='/images/lib/product/x1.jpg'; } for(i=1; i<=v; i++){ $_('rating_'+i).src='/images/lib/product/x0.jpg'; } } function div_mask(){ var div_mask=document.createelement('div'); div_mask.setattribute('id', 'div_mask'); div_mask.style.csstext='z-index:10000; background-color:#000; filter:alpha(opacity=40); opacity:0.4; -moz-opacity:0.4; left:0px; top:0px; position:absolute;'; div_mask.style.height=(doc.scrollheight>doc.clientheight?doc.scrollheight:doc.clientheight)+'px'; div_mask.style.width=doc.scrollwidth+'px'; document.body.appendchild(div_mask); } function pop_info_tips(tips){ //弹出信息 if(!is_array(tips)){ if(tips!='' && tips!=undefined){ tips=tips.split('|'); //如果提交过来的数据不是数组,则用|分割 }else{ return; } }else if(tips.length==0){ return; } div_mask(); var info=''; var e=clear_repeat(tips); for(var i=0; i'; } var pop_info_tips=document.createelement('div'); pop_info_tips.setattribute('id', 'pop_info_tips'); pop_info_tips.style.csstext='position:absolute; z-index:10001; background:#fff; left:0px; top:0px; width:550px;'; pop_info_tips.innerhtml='\
'+ly200jslang._windows._tips+'
\
'+info+'
\
'+ly200jslang._windows._close+'
'; document.body.appendchild(pop_info_tips); scroll_pop_info_tips(); //先马上执行一次,要不看起来会在左上角飞到中间来 scroll_pop_info_tips_timer=setinterval('scroll_pop_info_tips()', 50); $_('pop_info_tips').focus(); $_('pop_info_tips').blur(); document.onkeyup=function(evt){ evt=evt||event; key=evt.keycode||evt.which||evt.charcode; key==27 && close_pop_info_tips(); } } function scroll_pop_info_tips(){ //弹出框跟随滚动 $_('pop_info_tips').style.left=(document.documentelement.scrollleft || window.pagexoffset || document.body.scrollleft)+doc.clientwidth/2-$_('pop_info_tips').offsetwidth/2+'px'; $_('pop_info_tips').style.top=(document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop)+doc.clientheight/2-$_('pop_info_tips').offsetheight/2+'px'; } function close_pop_info_tips(){ //关闭弹出窗口 (typeof first_error_input!='undefined' && first_error_input!=null) && first_error_input.focus(); document.body.removechild($_('div_mask')); document.body.removechild($_('pop_info_tips')); document.onkeyup=null; clearinterval(scroll_pop_info_tips_timer); } function clear_repeat(array){ //清除数组重复项 for(var i=0; i