var isIE6=false; document.write(''); /* PNG修复() code by Jin @ 2011.12.02 */ function pngfix(){ var els=document.images,len=els.length; for(var i=0; i $('body').height()) $this.hide(); else if(this_offset.left + $this.width() > $('body').width()){ $this.width($('body').width() - this_offset.left); } }) }).resize(); } function setDivHeight(div){//#container var i = 0; var id = setInterval(function(){ var obj = $(div);//拿到#container的对象 var maxTop = 0; $('.block', obj).each(function(index){//找到#container下的block(模块) div var currTop = $(this).offset().top + $(this).height();//当前模块的top距离+自己的高度 = #container最高的高度 if(currTop > maxTop){ maxTop = currTop; } }); var height = maxTop-obj.offset().top; obj.height(height); i++; if(i>=50){ clearInterval(id); } }, 500); } function price_format(s,n){ n = n > 0 && n <= 20 ? n : 2; s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + ""; var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1]; t = ""; for (i = 0; i < l.length; i++) { t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : ""); } return t.split("").reverse().join("") + "." + r; } if(typeof loadExtendFileCache==='undefined'){ var loadExtendFileCache = {'css':[],'js':[]}; } if(typeof loadExtendFile==='undefined'){ function loadExtentFile(filePath, fileType){ if(fileType == "js"){ if(loadExtendFileExists(filePath,fileType))return false; var oJs = document.createElement('script'); oJs.setAttribute("type","text/javascript"); oJs.setAttribute("src", filePath);//文件的地址 ,可为绝对及相对路径 document.getElementsByTagName("head")[0].appendChild(oJs);//绑定 loadExtendFileCache['js'].push(filePath); }else if(fileType == "css"){ if(loadExtendFileExists(filePath,fileType))return false; var oCss = document.createElement("link"); oCss.setAttribute("rel", "stylesheet"); oCss.setAttribute("type", "text/css"); oCss.setAttribute("href", filePath); document.getElementsByTagName("head")[0].appendChild(oCss);//绑定 loadExtendFileCache['css'].push(filePath); } } } if(typeof loadExtendFileExists==='undefined'){ function loadExtendFileExists(filePath,fileType){ if(typeof loadExtendFileCache[fileType]=='undefined')return false; for(var i=0;i