
function temkeyword(self){var systemkeyword_divs=document.getElementById('systemkeyword').getElementsByTagName('div');for(var i=0; i<systemkeyword_divs.length; i++){if(systemkeyword_divs[i].className=='gift_hover'){systemkeyword_divs[i].className='gift';break;}
}
self.className='gift_hover';}
function toor(self, idname){self.className='hover_a';if(self.id==idname+'_1'){document.getElementById(idname+'_2').className='link_a';document.getElementById(idname+'_content_1').style.display='block';document.getElementById(idname+'_content_2').style.display='none';}else if(self.id==idname+'_2'){document.getElementById(idname+'_1').className='link_a';document.getElementById(idname+'_content_1').style.display='none';document.getElementById(idname+'_content_2').style.display='block';}
}
var __lingpai=1;function zqzh(self){var pasale_top_lis= document.getElementById('pasale_top').getElementsByTagName('li');for(var i=0; i<pasale_top_lis.length; i++){if(pasale_top_lis[i]==self){self.id='pasale_li';set_body_lis(i,'block');set_image_lis(i,'block');}else{set_body_lis(i,'none');set_image_lis(i,'none');pasale_top_lis[i].id='';}
}
}
function set_body_lis(n,value){var k=-1;var pasale_body_lis=document.getElementById('pasale_body').getElementsByTagName('li');for(var i=0; i<pasale_body_lis.length; i++){if(pasale_body_lis[i].className=='pasale_body_lis'){k++;}
if(k==n){pasale_body_lis[i].style.display=value;break;}
}
}
function set_image_lis(n,value){var k=-1;var pasale_image_lis=document.getElementById('pasale_image').getElementsByTagName('li');for(var i=0; i<pasale_image_lis.length; i++){if(pasale_image_lis[i].className=='pasale_image_lis'){k++;}
if(k==n){pasale_image_lis[i].style.display=value;break;}
}
}
function zdzqzh(){var pasale_top_lis= document.getElementById('pasale_top').getElementsByTagName('li');for(var i=0; i<pasale_top_lis.length;i++){if(pasale_top_lis[i].id=='pasale_li'){if(pasale_top_lis.length==i+1){zqzh(pasale_top_lis[0]);}else{zqzh(pasale_top_lis[i+1]);}
break;}
}
}
function lingpai(){if(__lingpai==1){zdzqzh();}
setTimeout("lingpai()",5000);}
function over_border(value){__lingpai=0;}
function eout_border(value){__lingpai=1;}
function set__lingpai(val){__lingpai=val;}function href(url){var good_id_1=window.location.href.replace(/(.*)Product\/Pro([0-9]+)(.*)\.html$/gi, "$2");var good_id_2=url.replace(/(.*)Product\/Pro([0-9]+)(.*)\.html$/gi, "$2");addNumber("GET",baseURL+'ajax.php?act=statistics&good_id_1='+good_id_1+'&good_id_2='+good_id_2,true,href_onblur,[url]);}
function href_onblur(xmlHttp,parameter,Unsuccessful){window.location.href=parameter[0];}
function window_page_header_onload(baseURL){ }
function upMycartAmount(xmlHttp,parameter,Unsuccessful){if(Unsuccessful != 'Unsuccessful'){document.getElementById('mycartAmount').innerHTML=xmlHttp.responseText;}
}
subcartlistK=true;function subcartlist(baseURL){if(subcartlistK){subcartlistK=false;addNumber("GET",baseURL+'ajax.php?act=cartlist',true,serversubcartlist);}
}
function closesubcartlist(e){if(!iscontains(document.getElementById('tempcartDiv'),e)){subcartlistK=true;}
}
function serversubcartlist(xmlHttp,parameter,Unsuccessful){if(Unsuccessful != 'Unsuccessful'){document.getElementById('tempcartlist').innerHTML=xmlHttp.responseText;}
}
function validate(){var keywords=document.getElementById('keywords_id');if(keywords.value!=keywords.defaultValue){thisform.submit();}else{keywords.focus();return false;}
}
function jt_addBookmark(a) {var b='http:\/\/www.huolida.com\/';addfavor(b,a);}
function addfavor(url,title) {var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("msie 8")>-1)
{}else{try {window.external.addFavorite(url, title);}
catch(e) {try {window.sidebar.addPanel(title, url, "");} catch(e) {alert("加入收藏失败，请使用Ctrl+D进行添加");}
}
}
return false;}
var K_Mark=1;var K_nub=0;function Rotation_K(){function __interval()
{if(K_Mark==1){temp_lis=document.getElementById('Rotation_K').getElementsByTagName('li');if(K_nub < temp_lis.length-1){K_nub=K_nub+1;displayKimg(temp_lis[K_nub]);}else{K_nub=0;displayKimg(temp_lis[K_nub]);}
}
setTimeout(__interval,5000);}
setTimeout(__interval,5000);}
function displayKimg(self){var K_lis=self.parentNode.getElementsByTagName('li');var Img_lis=self.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('a');for(var i=0; i<K_lis.length; i++){if(K_lis[i]==self){K_nub=i;K_lis[i].className='li_hover'
K_lis[i].getElementsByTagName('a')[0].style.color='#FFFFFF';Img_lis[i].style.display='';}else{K_lis[i].className=''
Img_lis[i].style.display='none';K_lis[i].getElementsByTagName('a')[0].style.color='';}
}
}
function displaySubMenu(li,_function,baseURL) {var subMenu=li.getElementsByTagName("ul")[0];subMenu.style.display="block";if (typeof(_function)==="function"){_function.call(self,baseURL);}
}
function hideSubMenu(li,_function,e) {var subMenu=li.getElementsByTagName("ul")[0];if(e!=''){if(!iscontains(li,e)){subMenu.style.display="none";}
}else{subMenu.style.display="none";}
if (typeof(_function)==="function"){_function.call(self,e);}
}
function pagination_ur_go(url,self){page=self.parentNode.getElementsByTagName('input')[0];window.location.href=url.replace('_page_',page.value);}
function _bookmark(title, url) {if (document.all)
window.external.AddFavorite(url, title);else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
function layer_toggle(obj) {document.getElementById('layAccount').style.height="100px";document.getElementById('tab01off').style.display="none";if (obj.style.display=='none')
obj.style.display='block';else if (obj.style.display=='block')
obj.style.display='none';}
function layer_close(){document.getElementById('layAccount').style.height="32px";document.getElementById('tab01off').style.display="";document.getElementById('tab01on').style.display="none";document.getElementById('tab02off').style.display="none";document.getElementById('tab02on').style.display="none";document.getElementById('tab03off').style.display="none";document.getElementById('tab03on').style.display="none";document.getElementById('tab04off').style.display="none";document.getElementById('tab04on').style.display="none";}
var pingluen_array=new Array();var pingluen_k=true;var pingluen_w;var pingluen_bottom;function pingluen(w){if(pingluen_k){pingluen_w=w;var pingluenobj=document.getElementById(w);if(pingluenobj){if(parseInt(getCookie(w))!=0){pingluenobj.style.display='';pingluen_bottom=-160;pingluenobj.style.marginBottom=pingluen_bottom + 'px';pingluen_k=false;pingluenBottom();}
}
}else{if(is_array(pingluen_array)){pingluen_array.push(w);}else{pingluen_array=new Array();pingluen_array.push(w);}
}
}
function pingluenBottom(){pingluen_bottom += 5;document.getElementById(pingluen_w).style.marginBottom=pingluen_bottom + 'px';if(pingluen_bottom < 5){setTimeout("pingluenBottom()",10);}else{pingluen_k=true;if(is_array(pingluen_array)){try{var tempt_w=pingluen_array.shift();pingluen(tempt_w);}catch (ex){}
}
}
}
function pingluen_close(w){SetCookie(w,0);document.getElementById(w).style.display='none';}
function isNull(anode){if (anode.toString()=='undefined'){ return true;}
else{if (anode.toString()=='NULL'){ return true;}
else{return false;}
}
}
function LRtrim(str)
{var p=/(^\s*)|(\s*$)/g
str=str.replace(p,""); return str;}
function is_array(test)
{if(typeof test=='object' && typeof test.sort=='function' && typeof test.length=='number'){return true;} else {return false;}
}
function get_iframe(_document,id,name){if(_document=='' || _document==null){_document=window.document;}
if(name=='' || name==null){name=id;}
if (window.ActiveXObject){doc=_document.frames[name];}else{doc=_document.getElementById(id);}
return doc;}
function getEventObject(W3CEvent) {return W3CEvent || window.event;}
function toDecimal2(x) {var f=parseFloat(x);if (isNaN(f)) {return false;}
var f=Math.round(x*100)/100;var s=f.toString();var rs=s.indexOf('.');if (rs < 0) {rs=s.length;s += '.';}
while (s.length <= rs + 2) {s += '0';}
return s;}
function XmouseCoords(ev,_x,_y){ev=ev || getEventObject(ev);var x=ev.pageX || (ev.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft));var y=ev.pageY || (ev.clientY + (document.documentElement.scrollTop || document.body.scrollTop));return {'x':x + _x,
'y':y + _y
};}
function getxy(e){var a=new Array()
var t=e.offsetTop;var l=e.offsetLeft;var w=e.offsetWidth;var h=e.offsetHeight;while(e=e.offsetParent){t+=e.offsetTop;l+=e.offsetLeft;}
a[0]=t;a[1]=l;a[2]=w;a[3]=h
return {left:l,top:t};}
function iscontains(obj, theEvent){if (theEvent){var browser=navigator.userAgent;if (browser.indexOf("Firefox")>0){ 　if (obj.contains(theEvent.relatedTarget)) { 　　 return true;}
}
if (browser.indexOf("MSIE")>0){if (obj.contains(event.toElement)) {return true;}
}
return false;}
return false;}
if(typeof(HTMLElement)!="undefined")
{HTMLElement.prototype.contains=function(obj)
{while(obj!=null&&typeof(obj.tagName)!="undefind"){if(obj==this) return true;obj=obj.parentNode;}
return false;};}
function SetCookie(name,value)
{var Days=30;var exp=new Date();exp.setTime(exp.getTime() + Days*24*60*60*1000);document.cookie=name + "="+ escape (value);}
function getCookie(name)
{var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr != null)
return unescape(arr[2]);return null;}
function delCookie(name)
{var exp=new Date();exp.setTime(exp.getTime() - 1);var cval=getCookie(name);if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();}
function show_date_time(timeold, onlyhour){ if(timeold<=0){return false;}
if (onlyhour==1){_day=0
_hrsold=Math.floor(timeold/(60*60)*1)
}else{_day=Math.floor(timeold/(60*60*24)*1)
_hrsold=Math.floor((timeold%(60*60*24))/(60*60)*1)
}
_minsold=Math.floor(((timeold%(60*60*24))%(60*60))/(60)*1)
_seconds=Math.floor((((timeold%(60*60*24))%(60*60))%(60))/1)
return {day:_day,hrsold:_hrsold,minsold:_minsold,seconds:_seconds};}
var _xmlHttp;var RequestQueue_fashion=new Array();var RequestQueue_url=new Array();var RequestQueue_dll=new Array();var RequestQueue_function=new Array();var RequestQueue_parameter=new Array();var RequestSwitch=1;function createXMLHttpRequest()
{ if(window.ActiveXObject) { _xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest) { _xmlHttp=new XMLHttpRequest(); }
}
function addNumber(_fashion,_url,_dll,_function,parameter)
{if(_fashion==undefined){return '';}
if(RequestSwitch==1){RequestSwitch=0;createXMLHttpRequest();_xmlHttp.open(_fashion,_url,_dll);_xmlHttp.onreadystatechange=function(){ReturnChat(_function,parameter);};_xmlHttp.setRequestHeader("If-Modified-Since","0");_xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");_xmlHttp.send(null);}else{if(is_array(RequestQueue_fashion)){RequestQueue_fashion.push(_fashion);RequestQueue_url.push(_url);RequestQueue_dll.push(_dll);RequestQueue_function.push(_function);RequestQueue_parameter.push(parameter);}else{RequestQueue_fashion=new Array();RequestQueue_url=new Array();RequestQueue_dll=new Array();RequestQueue_function=new Array();RequestQueue_parameter=new Array();RequestQueue_fashion.push(_fashion);RequestQueue_url.push(_url);RequestQueue_dll.push(_dll);RequestQueue_function.push(_function);RequestQueue_parameter.push(parameter);}
}
}
function ReturnChat(callback,parameter)
{if(_xmlHttp.readyState==4)
{if(_xmlHttp.status==200)
{RequestSwitch=1;if (typeof(callback)==="function"){callback.call(self,_xmlHttp,parameter);}else{}
if(is_array(RequestQueue_fashion)){try{temp_fashion=RequestQueue_fashion.shift();temp_url=RequestQueue_url.shift();temp_dll=RequestQueue_dll.shift();temp_function=RequestQueue_function.shift();temp_parameter=RequestQueue_parameter.shift();addNumber(temp_fashion,temp_url,temp_dll,temp_function,temp_parameter);}catch (ex){}
}
}
else if(_xmlHttp.status==202){window.alert("请求被接收");}
else if(_xmlHttp.status==400){window.alert("错误的请求");}
else if(_xmlHttp.status==404){window.alert("请求资源未找到");}
else if(_xmlHttp.status==500){window.alert("内部服务器错误，如.net代码错误等");}
}else{if (typeof(callback)==="function"){callback.call(self,_xmlHttp,parameter,'Unsuccessful');}else{}
}
}
var waitComplete={wait_Complete : false,
responseComplete : false,
w_xmlHttp:null,
w_parameter:null,
w_Unsuccessful:null,
w_callback:null,
w_end : false,
wait:function (w__xmlHttp,w__parameter,w__Unsuccessful,w__callback){if(this.w_xmlHttp==null){this.w_xmlHttp=w__xmlHttp;}
if(this.w_parameter==null){this.w_parameter=w__parameter;}
if(this.w_Unsuccessful==null){this.w_Unsuccessful=w__Unsuccessful;}
if(this.w_callback==null){this.w_callback=w__callback;}
if(w__Unsuccessful=='Unsuccessful'){window.Obj=this;setTimeout('Obj.transit()',1000);}else{this.responseComplete=true;this.execution();}
},
transit:function (){if(this.wait_Complete==false){this.wait_Complete=true;}
this.execution();},
execution:function (){if(!this.w_end){if(this.wait_Complete && this.responseComplete){this.w_end=true;this.wait_Complete=false; this.responseComplete=false;this.w_callback.call(self,this.w_xmlHttp,this.w_parameter,true);}else{this.w_callback.call(self,this.w_xmlHttp,this.w_parameter,false);}
}
},
again:function(){this.wait_Complete=false;this.responseComplete=false;this.w_xmlHttp=null;this.w_parameter=null;this.w_Unsuccessful=null;this.w_callback=null;this.w_end=false;}
}
function addfavor(url,title) {var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("msie 8")>-1){}else{try {window.external.addFavorite(url, title);} catch(e) {try {window.sidebar.addPanel(title, url, "");} catch(e) {alert("加入收藏失败，请使用Ctrl+D进行添加");}
}
}
return false;}
function Utf8ToUnicode(strUtf8)
{ var bstr=""; var nTotalChars=strUtf8.length; var nOffset=0; var nRemainingBytes=nTotalChars; var nOutputPosition=0; var iCode, iCode1, iCode2; while (nOffset < nTotalChars) { iCode=strUtf8.charCodeAt(nOffset); if ((iCode & 0x80)==0) { if ( nRemainingBytes < 1 ) break; bstr += String.fromCharCode(iCode & 0x7F); nOffset ++; nRemainingBytes -= 1; } else if ((iCode & 0xE0)==0xC0) { iCode1=strUtf8.charCodeAt(nOffset + 1); if ( nRemainingBytes < 2 || (iCode1 & 0xC0) != 0x80 ) { break; } bstr += String.fromCharCode(((iCode & 0x3F) << 6) | ( iCode1 & 0x3F)); nOffset += 2; nRemainingBytes -= 2; } else if ((iCode & 0xF0)==0xE0) { iCode1=strUtf8.charCodeAt(nOffset + 1); iCode2=strUtf8.charCodeAt(nOffset + 2); if ( nRemainingBytes < 3 || (iCode1 & 0xC0) != 0x80 || (iCode2 & 0xC0) != 0x80 ) { break; } bstr += String.fromCharCode(((iCode & 0x0F) << 12) | ((iCode1 & 0x3F) << 6) | (iCode2 & 0x3F)); nOffset += 3; nRemainingBytes -= 3; } else break; } if (nRemainingBytes != 0) { return ""; } return bstr;}function startmarqueec(lh,speed,delay,name) {var p=false;var t;var o=document.getElementById(name);o.innerHTML+=o.innerHTML;o.style.marginTop=0;o.onmouseover=function(){p=true;}
o.onmouseout=function(){p=false;}
function start(){t=setInterval(scrolling,speed);if(!p) o.style.marginTop=parseInt(o.style.marginTop)-10+"px";}
function scrolling(){if(parseInt(o.style.marginTop)%lh!=0){o.style.marginTop=parseInt(o.style.marginTop)-10+"px";if(Math.abs(parseInt(o.style.marginTop))>=o.scrollHeight/2)
o.style.marginTop=0;}else{clearInterval(t);setTimeout(start,delay);}
}
setTimeout(start,delay);}var $$,
$$B,
$$A,
$$F,
$$D,
$$E,
$$S; (function() { var O, B, A, F, D, E, S; O=function(id) { return "string"==typeof id ? document.getElementById(id) : id }; O.extend=function(destination, source) { for (var property in source) { destination[property]=source[property] } return destination }; O.deepextend=function(destination, source) { for (var property in source) { var copy=source[property]; if (destination===copy) continue; if (typeof copy==="object") { destination[property]=arguments.callee(destination[property] || {}, copy) } else { destination[property]=copy } } return destination }; O.wrapper=function(me, parent) { var ins=function() { me.apply(this, arguments) }; var subclass=function() {}; subclass.prototype=parent.prototype; ins.prototype=new subclass; return ins }; B=(function(ua) { var b={ msie: /msie/.test(ua) && !/opera/.test(ua), opera: /opera/.test(ua), safari: /webkit/.test(ua) && !/chrome/.test(ua), firefox: /firefox/.test(ua), chrome: /chrome/.test(ua) }; var vMark=""; for (var i in b) { if (b[i]) { vMark="safari"==i ? "version": i; break } } b.version=vMark && RegExp("(?:" + vMark + ")[\\/: ]([\\d.]+)").test(ua) ? RegExp.$1: "0"; b.ie=b.msie; b.ie6=b.msie && parseInt(b.version, 10)==6; b.ie7=b.msie && parseInt(b.version, 10)==7; b.ie8=b.msie && parseInt(b.version, 10)==8; return b })(window.navigator.userAgent.toLowerCase()); A=function() { var ret={ isArray: function(obj) { return Object.prototype.toString.call(obj)==="[object Array]" }, indexOf: function(array, elt, from) { if (array.indexOf) { return isNaN(from) ? array.indexOf(elt) : array.indexOf(elt, from) } else { var len=array.length; from=isNaN(from) ? 0: from < 0 ? Math.ceil(from) + len: Math.floor(from); for (; from < len; from++) { if (array[from]===elt) return from } return - 1 } }, lastIndexOf: function(array, elt, from) { if (array.lastIndexOf) { return isNaN(from) ? array.lastIndexOf(elt) : array.lastIndexOf(elt, from) } else { var len=array.length; from=isNaN(from) || from >= len - 1 ? len - 1: from < 0 ? Math.ceil(from) + len: Math.floor(from); for (; from > -1; from--) { if (array[from]===elt) return from } return - 1 } } }; function each(object, callback) { if (undefined===object.length) { for (var name in object) { if (false===callback(object[name], name, object)) break } } else { for (var i=0, len=object.length; i < len; i++) { if (i in object) { if (false===callback(object[i], i, object)) break } } } }; each({ forEach: function(object, callback, thisp) { each.call(thisp, object, function() { callback.apply(thisp, arguments) }) }, map: function(object, callback, thisp) { var ret=[]; each.call(thisp, object, function() { ret.push(callback.apply(thisp, arguments)) }); return ret }, filter: function(object, callback, thisp) { var ret=[]; each.call(thisp, object, function(item) { callback.apply(thisp, arguments) && ret.push(item) }); return ret }, every: function(object, callback, thisp) { var ret=true; each.call(thisp, object, function() { if (!callback.apply(thisp, arguments)) { ret=false; return false } }); return ret }, some: function(object, callback, thisp) { var ret=false; each.call(thisp, object, function() { if (callback.apply(thisp, arguments)) { ret=true; return false } }); return ret } }, function(method, name) { ret[name]=function(object, callback, thisp) { if (object[name]) { return object[name](callback, thisp) } else { return method(object, callback, thisp) } } }); return ret } (); F=(function() { var slice=Array.prototype.slice; return { bind: function(fun, thisp) { var args=slice.call(arguments, 2); return function() { return fun.apply(thisp, args.concat(slice.call(arguments))) } }, bindAsEventListener: function(fun, thisp) { var args=slice.call(arguments, 2); return function(event) { return fun.apply(thisp, [E.fixEvent(event)].concat(args)) } } } })(); D={ getScrollTop: function(node) { var doc=node ? node.ownerDocument: document; return doc.documentElement.scrollTop || doc.body.scrollTop }, getScrollLeft: function(node) { var doc=node ? node.ownerDocument: document; return doc.documentElement.scrollLeft || doc.body.scrollLeft }, contains: document.defaultView ? function(a, b) { return !! (a.compareDocumentPosition(b) & 16) }: function(a, b) { return a != b && a.contains(b) }, rect: function(node) { var left=0, top=0, right=0, bottom=0; if (!node.getBoundingClientRect || B.ie8) { var n=node; while (n) { left += n.offsetLeft, top += n.offsetTop; n=n.offsetParent }; right=left + node.offsetWidth; bottom=top + node.offsetHeight } else { var rect=node.getBoundingClientRect(); left=right=D.getScrollLeft(node); top=bottom=D.getScrollTop(node); left += rect.left; right += rect.right; top += rect.top; bottom += rect.bottom }; return { "left": left, "top": top, "right": right, "bottom": bottom } }, clientRect: function(node) { var rect=D.rect(node), sLeft=D.getScrollLeft(node), sTop=D.getScrollTop(node); rect.left -= sLeft; rect.right -= sLeft; rect.top -= sTop; rect.bottom -= sTop; return rect }, curStyle: document.defaultView ? function(elem) { return document.defaultView.getComputedStyle(elem, null) }: function(elem) { return elem.currentStyle }, getStyle: document.defaultView ? function(elem, name) { var style=document.defaultView.getComputedStyle(elem, null); return name in style ? style[name] : style.getPropertyValue(name) }: function(elem, name) { var style=elem.currentStyle; if (name=="opacity") { if (/alpha\(opacity=(.*)\)/i.test(style.filter)) { var opacity=parseFloat(RegExp.$1); return opacity ? opacity / 100: 0 } return 1 }; if (name=="float") { name="styleFloat" } var ret=style[name] || style[S.camelize(name)]; if (!/^\-?\d+(px)?$/i.test(ret) && /^\-?\d/.test(ret)) { style=elem.style, left=style.left, rsLeft=elem.runtimeStyle.left; elem.runtimeStyle.left=elem.currentStyle.left; style.left=ret || 0; ret=style.pixelLeft + "px"; style.left=left; elem.runtimeStyle.left=rsLeft } return ret }, setStyle: function(elems, style, value) { if (!elems.length) { elems=[elems] } if (typeof style=="string") { var s=style; style={}; style[s]=value } A.forEach(elems, function(elem) { for (var name in style) { var value=style[name]; if (name=="opacity" && B.ie) { elem.style.filter=(elem.currentStyle.filter || "").replace(/alpha\([^)]*\)/, "") + "alpha(opacity=" + value * 100 + ")" } else if (name=="float") { elem.style[B.ie ? "styleFloat": "cssFloat"]=value } else { elem.style[S.camelize(name)]=value } } }) } }; E=(function() { var addEvent, removeEvent, guid=1; if (window.addEventListener) { addEvent=function(element, type, handler) { element.addEventListener(type, handler, false) }; removeEvent=function(element, type, handler) { element.removeEventListener(type, handler, false) } } else { addEvent=function(element, type, handler) { if (!handler.$$guid) handler.$$guid=guid++; if (!element.events) element.events={}; var handlers=element.events[type]; if (!handlers) { handlers=element.events[type]={}; if (element["on" + type]) { handlers[0]=element["on" + type] } } handlers[handler.$$guid]=handler; element["on" + type]=handleEvent }; removeEvent=function(element, type, handler) { if (element.events && element.events[type]) { delete element.events[type][handler.$$guid] } }; function handleEvent() { var returnValue=true, event=fixEvent(); var handlers=this.events[event.type]; for (var i in handlers) { this.$$handleEvent=handlers[i]; if (this.$$handleEvent(event)===false) { returnValue=false } } return returnValue } } function fixEvent(event) { if (event) return event; event=window.event; event.pageX=event.clientX + D.getScrollLeft(event.srcElement); event.pageY=event.clientY + D.getScrollTop(event.srcElement); event.target=event.srcElement; event.stopPropagation=stopPropagation; event.preventDefault=preventDefault; switch (event.type) { case "mouseout": event.relatedTarget=event.toElement; break; case "mouseover": event.relatedTarget=event.fromElement; break }; return event }; function stopPropagation() { this.cancelBubble=true }; function preventDefault() { this.returnValue=false }; return { "addEvent": addEvent, "removeEvent": removeEvent, "fixEvent": fixEvent } })(); S={ camelize: function(s) { return s.replace(/-([a-z])/ig, function(all, letter) { return letter.toUpperCase() }) } }; if (B.ie6) { try { document.execCommand("BackgroundImageCache", false, true) } catch(e) {} }; $$=O; $$B=B; $$A=A; $$F=F; $$D=D; $$E=E; $$S=S
})();var LazyLoad=function(elems, options) {this._initialize(elems, options);if ( this.isFinish() ) return;this._initMode();this.resize(true);};LazyLoad.prototype={ _initialize: function(elems, options) {this._elems=elems;this._rect={};this._range={};this._loadData=null;this._timer=null;this._lock=false;this._index=0;this._direction=0;this._lastScroll={ "left": 0, "top": 0 };this._setElems=function(){};var opt=this._setOptions(options);this.delay=opt.delay;this.threshold=opt.threshold;this.beforeLoad=opt.beforeLoad;this._onLoadData=opt.onLoadData;this._container=this._initContainer($$(this.options.container)); }, _setOptions: function(options) { this.options={container:window,
mode:"dynamic",
threshold:0,
delay:100,
beforeLoad:function(){},
onLoadData:function(){} }; return $$.extend(this.options, options || {}); }, _initContainer: function(container) {var doc=document,
isWindow=container==window || container==doc
|| !container.tagName || (/^(?:body|html)$/i).test( container.tagName );if ( isWindow ) {container=doc.compatMode=='CSS1Compat' ? doc.documentElement : doc.body;}
var oThis=this, width=0, height=0;this.load=$$F.bind( this._load, this );this.resize=$$F.bind( this._resize, this );this.delayLoad=function() {if(typeof(main_scroll)==="function"){main_scroll();}; oThis._delay( oThis.load ); };this.delayResize=function(){var clientWidth=container.clientWidth,
clientHeight=container.clientHeight;if( clientWidth != width || clientHeight != height ) {width=clientWidth; height=clientHeight;oThis._delay( oThis.resize );}
};this._binder=isWindow ? window : container;$$E.addEvent( this._binder, "scroll", this.delayLoad );isWindow && $$E.addEvent( this._binder, "resize", this.delayResize );this._getContainerRect=isWindow && ( "innerHeight" in window )
? function(){ return {"left":0, "right":window.innerWidth,
"top":0, "bottom":window.innerHeight
}}
: function(){ return oThis._getRect(container); };this._getScroll=isWindow
? function() { return {"left": $$D.getScrollLeft(), "top": $$D.getScrollTop()
}}
: function() { return {"left": container.scrollLeft, "top": container.scrollTop
}};return container; }, _initMode: function() {switch ( this.options.mode.toLowerCase() ) {case "vertical" :
this._initStatic( "vertical", "vertical" );break;case "horizontal" :
this._initStatic( "horizontal", "horizontal" );break;case "cross" :
case "cross-vertical" :
this._initStatic( "cross", "vertical" );break;case "cross-horizontal" :
this._initStatic( "cross", "horizontal" );break;case "dynamic" :
default :
this._loadData=this._loadDynamic;} }, _initStatic: function(mode, direction) {var isVertical=direction=="vertical";if ( mode=="cross" ) {this._crossDirection=$$F.bind( this._getCrossDirection, this,
isVertical ? "_verticalDirection" : "_horizontalDirection",
isVertical ? "_horizontalDirection" : "_verticalDirection" );}
var pos=isVertical ? "top" : "left",
sortFunction=function( x, y ) { return x._rect[ pos ] - y._rect[ pos ]; },
getRect=function( elem ) { elem._rect=this._getRect(elem); return elem; };this._setElems=function() {this._elems=$$A.map( this._elems, getRect, this ).sort( sortFunction );};this._loadData=$$F.bind( this._loadStatic, this,
"_" + mode + "Direction",
$$F.bind( this._outofRange, this, mode, "_" + direction + "BeforeRange" ),
$$F.bind( this._outofRange, this, mode, "_" + direction + "AfterRange" ) ); }, _delay: function(run) {clearTimeout(this._timer);if ( this.isFinish() ) return;var oThis=this, delay=this.delay;if ( this._lock ) {this._timer=setTimeout( function(){ oThis._delay(run); }, delay );} else {this._lock=true; run();setTimeout( function(){ oThis._lock=false; }, delay );} }, _resize: function(change) {if ( this.isFinish() ) return;this._rect=this._getContainerRect();if ( change ) { this._setElems(); }
this._load(true); }, _load: function(force) {if ( this.isFinish() ) return;var rect=this._rect, scroll=this._getScroll(),
left=scroll.left, top=scroll.top,
threshold=Math.max( 0, this.threshold | 0 );this._range={top:rect.top + top - threshold,
bottom:rect.bottom + top + threshold,
left:rect.left + left - threshold,
right:rect.right + left + threshold
}
this.beforeLoad();this._loadData(force); }, _loadDynamic: function() {this._elems=$$A.filter( this._elems, function( elem ) {return !this._insideRange( elem );}, this ); }, _loadStatic: function(direction, beforeRange, afterRange, force) {direction=this[ direction ]( force );if ( !direction ) return;var elems=this._elems, i=this._index,
begin=[], middle=[], end=[];if ( direction > 0 ) {begin=elems.slice( 0, i );for ( var len=elems.length ; i < len; i++ ) {if ( afterRange( middle, elems[i] ) ) {end=elems.slice( i + 1 ); break;}
}
i=begin.length + middle.length - 1;} else {end=elems.slice( i + 1 );for ( ; i >= 0; i-- ) {if ( beforeRange( middle, elems[i] ) ) {begin=elems.slice( 0, i ); break;}
}
middle.reverse();}
this._index=Math.max( 0, i );this._elems=begin.concat( middle, end ); }, _verticalDirection: function(force) { return this._getDirection( force, "top" ); }, _horizontalDirection: function(force) { return this._getDirection( force, "left" ); }, _getDirection: function(force, scroll) {var now=this._getScroll()[ scroll ], _scroll=this._lastScroll;if ( force ) { _scroll[ scroll ]=now; this._index=0; return 1; }
var old=_scroll[ scroll ]; _scroll[ scroll ]=now;return now - old; }, _getCrossDirection: function(primary, secondary, force) {var direction;if ( !force ) {direction=this[ primary ]();secondary=this[ secondary ]();if ( !direction && !secondary ) {return 0;} else if ( !direction ) {if ( this._direction ) {direction=-this._direction;} else {force=true;}
} else if ( secondary && direction * this._direction >= 0 ) {force=true;}
}
if ( force ) {this._lastScroll=this._getScroll(); this._index=0; direction=1;}
return ( this._direction=direction ); }, _insideRange: function(elem, mode) {var range=this._range, rect=elem._rect || this._getRect(elem),
insideH=rect.right >= range.left && rect.left <= range.right,
insideV=rect.bottom >= range.top && rect.top <= range.bottom,
inside={"horizontal":insideH,
"vertical":insideV,
"cross":insideH && insideV
}[ mode || "cross" ];if ( inside ) { this._onLoadData(elem); }
return inside; }, _outofRange: function(mode, compare, middle, elem) {if ( !this._insideRange( elem, mode ) ) {middle.push(elem);return this[ compare ]( elem._rect );} }, _horizontalBeforeRange: function(rect) { return rect.right < this._range.left; }, _horizontalAfterRange: function(rect) { return rect.left > this._range.right; }, _verticalBeforeRange: function(rect) { return rect.bottom < this._range.top; }, _verticalAfterRange: function(rect) { return rect.top > this._range.bottom; }, _getRect: function(node) {var n=node, left=0, top=0;while (n) { left += n.offsetLeft; top += n.offsetTop; n=n.offsetParent; };return {"left": left, "right": left + node.offsetWidth,
"top": top, "bottom": top + node.offsetHeight
}; }, isFinish: function() {if ( !this._elems || !this._elems.length ) {this.dispose(); return true;} else {return false;} }, dispose: function(load) {clearTimeout(this._timer);if ( this._elems || this._binder ) {if ( load && this._elems ) {$$A.forEach( this._elems, this._onLoadData, this );}
$$E.removeEvent( this._binder, "resize", this.delayResize );this._elems=this._binder=null;} }
}
var ImagesLazyLoad=$$.wrapper(function(options) {this._initialize( options );if ( this.isFinish() ) return;this._initMode();this.resize(true);}, LazyLoad);$$.extend( ImagesLazyLoad.prototype, { _initialize: function(options) {LazyLoad.prototype._initialize.call(this, [], options);var opt=this.options;this.onLoad=opt.onLoad;var attribute=this._attribute=opt.attribute;var getSrc=opt.getSrc,
filter=$$F.bind( this._filter, this,
opt["class"],
getSrc ? function(img){ return getSrc(img); }
: function(img){ return img.getAttribute( attribute ) },
opt.holder
);this._elems=$$A.filter(
opt.images || this._container.getElementsByTagName("img"), filter
);this._hasAttribute=$$B.ie6 || $$B.ie7
? function(img){ return attribute in img; }
: function(img){ return img.hasAttribute( attribute ); }; }, _setOptions: function(options) {return LazyLoad.prototype._setOptions.call(this, $$.extend({images:undefined,
attribute:"_lazysrc",
holder:"",
"class":"",
getSrc:undefined,
onLoad:function(){}
}, $$.extend( options, {onLoadData:this._onLoadData
}))); }, _filter: function(cls, getSrc, holder, img) {if ( cls && img.className !== cls ) return false;var src=getSrc(img);if ( !src ) return false;if ( src==img.src ) {if ( img.complete || $$B.chrome || $$B.safari ) return false;img.removeAttribute("src");}
if ( holder ) { img.src=holder; }
img.setAttribute( this._attribute, src );return true; }, _onLoadData: function(img) {var attribute=this._attribute;if ( this._hasAttribute( img ) ) {img.src=img.getAttribute( attribute );img.removeAttribute( attribute );this.onLoad( img );} }
});var $sousuo=function(node){return document.getElementById(node);}
var $N=function(obj,node){return obj.getElementsByTagName(node);}
var j=-1;var temp_str;function ajax_keyword(V)
{addNumber("GET",baseURL+'search_suggest.php?keywords='+encodeURIComponent(V),true,search_response,"TEXT");}
var NOTIN=''
function consultation(){setTimeout("consultation()",60000);}
function text_consultation(xmlHttp,parameter,Unsuccessful){if(Unsuccessful != 'Unsuccessful'){var responseText=xmlHttp.responseText
if(responseText != ''){var arrTmp=responseText.split("|Icfip|");for(var i=0; i < arrTmp.length; i++)
{var arrTemp=arrTmp[i].split("Itol");document.getElementById('pingluenDiv').innerHTML += arrTemp[1];if(NOTIN==''){NOTIN=arrTemp[0];}else{NOTIN += ','+arrTemp[0];}
pingluen('consultation'+arrTemp[0],'consultation['+arrTemp[0]+']');}
}
}
}
function search_response(xmlHttp,parameter,Unsuccessful)
{if(Unsuccessful != 'Unsuccessful'){var ele=document.getElementById("search_suggest");ele.innerHTML=xmlHttp.responseText;$sousuo("search_suggest").style.display="block";}
}
function keyupdeal(e,V)
{initdiv();if(temp_str==V)return;if(V==""){temp_str="";closediv();return;}
var keyc;if(window.event){keyc=e.keyCode;}else if(e.which){keyc=e.which;}
if(keyc==1)return;if(keyc!=40 && keyc!=38){ajax_keyword(V);temp_str=V;}
}
function form_submit(obj)
{$sousuo("keywords_id").value=obj.childNodes[0].firstChild.nodeValue;$sousuo("searchForm").submit();}
function keydowndeal(e)
{var keyc;var obj=$sousuo("search_suggest");if(window.event){keyc=e.keyCode;}else if(e.which){keyc=e.which;}
if(keyc==40||keyc==38)
{if(keyc==40)
{if(j<$N(obj,"li").length){j++;if(j>=$N(obj,"li").length){j=-1;}}
if(j>=$N(obj,"li").length){j=-1;}
}
if(keyc==38)
{if(j>=0){j--;if(j<=-1){j=$N(obj,"li").length;}}else{j=$N(obj,"li").length-1;}
}
set_style(obj,j);if(j>=0&&j<$N(obj,"li").length){$sousuo("keywords_id").value=$N(obj,"li")[j].childNodes[0].firstChild.nodeValue;}
else{$sousuo("keywords_id").value=temp_str;}
}
}
function set_style(obj,num){for(var i=0;i<$N(obj,"li").length;i++){var li_node=$N(obj,"li")[i];li_node.className="";}
if(j>=0 && j<$N(obj,"li").length){var i_node=$N(obj,"li")[j];$N(obj,"li")[j].className="selected";}}
function closediv(){document.getElementById("search_suggest").innerHTML="";document.getElementById("search_suggest").style.display="none";}
function initdiv(){var x=0,y=0;p=$sousuo("keywords_id");while (p){x += p.offsetLeft || 0;y += p.offsetTop || 0;p=p.offsetParent;}
$sousuo("search_suggest").style.top=(y+20).toString()+"px";$sousuo("search_suggest").style.left=x.toString()+"px";}
function suggestOver(obj){_over();obj.className='selected';}
function suggestOut(obj){_out();obj.className='';}
function AddEvent(a, b, c){!document.all ? a.addEventListener(b, c, false) : a.attachEvent("on" + b, c);}
function DelEvent(a, b, c){!document.all ? a.removeEventListener(b, c, false) : a.detachEvent("on" + b, c);a.onblur="";}
function _over(){DelEvent($sousuo('keywords_id'), 'blur', closediv);}
function _out(){AddEvent($sousuo('keywords_id'), 'blur', closediv);}
window.onresize=function(){initdiv(); }
