var FrontProducts_generalSearch01={patternDate:/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/,patternCurrency:/^\d{1,8}(\.\d{0,2})?$/,compId:"",mustInputKeyword:"false",inputkeyword:"",keyover:function(a,b){if(jQuery("#"+a+"_keyword").val()==b){jQuery("#"+a+"_keyword").val("");jQuery("#"+a+"_keyword").focus()}},keyout:function(a,b){if(this.trim(jQuery("#"+a+"_keyword").val())==""){jQuery("#"+a+"_keyword").val(b);jQuery("#"+a+"_keyword").addClass("input-keyword")}else{jQuery("#"+a+"_keyword").val(this.trim(jQuery("#"+a+"_keyword").val()));jQuery("#"+a+"_keyword").removeClass("input-keyword")}},trim:function(b,c){b=""+b;if(c=="l"||c=="L"){RegularExp=/^\s+/gi;return b.replace(RegularExp,"")}else{if(c=="r"||c=="R"){RegularExp=/\s+$/gi;return b.replace(RegularExp,"")}else{RegularExp=/^\s+|\s+$/gi;var a=b.replace(RegularExp,"");return a}}},validateForm:function(k,c,g){this.compId=k;this.mustInputKeyword=c;this.inputkeyword=g;if(this.checkKeywords()==false){return false}var j=jQuery("#"+this.compId+"_beginValue").val();var i=jQuery("#"+this.compId+"_endValue").val();var d=jQuery("#"+this.compId+"_propertyId").val();var b=jQuery("#"+this.compId+"_propertyType").val();var a=jQuery("#"+this.compId+"_areaType").val();var f=this.trim(jQuery("#"+this.compId+"_keyword").val());jQuery("#"+this.compId+"_keyword").val(f);if(f==this.inputkeyword){jQuery("#"+this.compId+"_keyword").val("")}var h="1";if(d!=null&&d!=""){if(b=="3"){h="3"}else{h="2"}}jQuery("#"+this.compId+"_searchType").val(h);if(a!=""){if(a=="BigDecimal"){if(this.checkNumber()==false){return false}}else{if(a=="Date"){if(this.isCheckAreaDate()==false){return false}}}}var e=jQuery("#"+this.compId+"_keyword").serialize();jQuery.ajax({type:"POST",url:"/FrontProducts.do?method=keywordStat",data:e,dataType:"text",cache:false,success:function(l){}});return true},checkKeywords:function(){if(this.mustInputKeyword=="true"){if(this.trim(jQuery("#"+this.compId+"_keyword").val())==this.inputkeyword||this.trim(jQuery("#"+this.compId+"_keyword").val())==""){alert(this.inputkeyword);jQuery("#"+this.compId+"_keyword").val("");jQuery("#"+this.compId+"_keyword").focus();return false}}return true},checkNumber:function(){if(jQuery("#"+this.compId+"_beginValue").val()&&!this.patternCurrency.test(jQuery("#"+this.compId+"_beginValue").val())){alert(i18n_products_error_beginValue);jQuery("#"+this.compId+"_beginValue").focus();return false}if(jQuery("#"+this.compId+"_endValue").val()&&!this.patternCurrency.test(jQuery("#"+this.compId+"_endValue").val())){alert(i18n_products_error_endValue);jQuery("#"+this.compId+"_endValue").focus();return false}if(jQuery("#"+this.compId+"_beginValue").val()&&jQuery("#"+this.compId+"_endValue").val()&&(parseInt(jQuery("#"+this.compId+"_beginValue").val())>parseInt(jQuery("#"+this.compId+"_endValue").val()))){alert(i18n_products_mustaboveprice);jQuery("#"+this.compId+"_endValue").focus();return false}return true},queryadvance:function(a,b){if(b=="_self"){location.href=/publicScripts/components/a}else{window.open(a)}},changecategory:function(b,d,c,a){jQuery.getJSON("/FrontProducts.do?method=doGetTemplatePropertiesByCategoryId",{pmcId:c},function(g){if(g){var f="";_getElementById(b,d,"template").innerHTML=f}})},isCheckAreaDate:function(){if(jQuery("#"+this.compId+"_beginValue").val()&&!this.patternDate.test(jQuery("#"+this.compId+"_beginValue").val())){alert(i18n_products_inputcorrectdate);jQuery("#"+this.compId+"_beginValue").focus();return false}if(jQuery("#"+this.compId+"_endValue").val()&&!this.patternDate.test(jQuery("#"+this.compId+"_endValue").val())){alert(i18n_products_inputcorrectdate);jQuery("#"+this.compId+"_endValue").focus();return false}if(jQuery("#"+this.compId+"_beginValue").val()&&jQuery("#"+this.compId+"_endValue").val()&&(jQuery("#"+this.compId+"_beginValue").val()>jQuery("#"+this.compId+"_endValue").val())){alert(i18n_products_mustlessenddate);jQuery("#"+this.compId+"_endValue").focus();return false}return true}};var FrontProducts_list01={changeOrderby:function(A,E,D){var C=A.value;var F=document.getElementById(E);F.orderby.value=C;try{F.action_page.value=D}catch(B){}F.submit()},changeOrderby2:function(A,E,D){var C=A;var F=document.getElementById(E);F.orderby.value=C;try{F.action_page.value=D}catch(B){}F.submit()},changeView:function(A,D,C){var E=document.getElementById(D);E.spType.value=A;try{E.action_page.value=C}catch(B){}E.submit()},loadMemberLevelID:function(B){var G=document.getElementsByName(B);var A=document.cookie;var F=A.indexOf("c_memberInfo=");if(F==-1){for(var C=0;C0){this.parent.calc(-1)}}}D.prototype={calc:function(H){if(H){this.view+=H}var K=0;var N=0;var M=this.diapos[this.view];if(M&&M.loaded){var G=this.diapos[this.back];if(G&&G!=M){G.img.className="diapo";G.z1=1}this.title.replaceChild(document.createTextNode(M.title),this.title.firstChild);this.legend.replaceChild(document.createTextNode(M.text),this.legend.firstChild);if(M.url){M.img.className="diapo link";window.status="hyperlink: "+M.url}else{M.img.className="diapo";window.status=""}M.w1=Math.min(M.iw,this.wh*0.5)*M.z1;var J=M.x1=(this.wh*0.5)-(M.w1*0.5);var O=J+M.w1+this.bdw;for(var L=this.view+1,M;M=this.diapos[L];L++){if(M.loaded){M.x1=O;M.w1=(this.ht/M.r)*this.size;O+=M.w1+this.bdw;K+=M.w1+this.bdw}}O=J-this.bdw;for(var L=this.view-1,M;M=this.diapos[L];L--){if(M.loaded){M.w1=(this.ht/M.r)*this.size;M.x1=O-M.w1;O-=M.w1+this.bdw;K+=M.w1+this.bdw;N+=M.w1+this.bdw}}if(!this.scr&&K){var I=(this.ws-this.alw-this.arw-this.bw)/K;this.bar.style.left=Math.round(this.alw+N*I)+"px"}this.back=this.view}},scroll:function(G){if(G<0){if(this.view0){this.calc(-1)}}},resize:function(){this.wh=this.oc.clientWidth;this.ht=this.oc.clientHeight;this.ws=this.scrollbar.offsetWidth;this.calc();this.run(true)},run:function(H){var G=this.NF;while(G--){this.diapos[G].move(H)}}};Diapo=function(M,H,I,K,J,G,L){this.parent=M;this.loaded=false;this.title=K;this.text=J;this.url=G;this.target=L;this.N=H;this.img=document.createElement("img");this.img.src=/publicScripts/components/I;this.img.parent=this;this.img.className="diapo";this.x0=this.parent.oc.clientWidth;this.x1=this.x0;this.w0=0;this.w1=0;this.z1=1;this.img.parent=this;this.img.onclick=function(){this.parent.click()};this.parent.oc.appendChild(this.img);if(G){this.img.onmouseover=function(){this.className="diapo link"};this.img.onmouseout=function(){this.className="diapo"}}};Diapo.prototype={move:function(K){if(this.loaded){var I=this.x1-this.x0;var G=this.w1-this.w0;if(Math.abs(I)>2||Math.abs(G)>2||K){this.x0+=I*0.1;this.w0+=G*0.1;if(this.x00){this.visible=true;var J=this.img.style;var H=this.w0*this.r;J.left=Math.round(this.x0)+"px";J.bottom=Math.floor(this.parent.ht*0.25)+"px";J.width=Math.round(this.w0)+"px";J.height=Math.round(H)+"px";if(this.flx){var J=this.flx.style;J.left=Math.round(this.x0)+"px";J.top=Math.ceil(this.parent.ht*0.75+1)+"px";J.width=Math.round(this.w0)+"px";J.height=Math.round(H)+"px"}}else{if(this.visible){this.visible=false;this.img.style.width="0px";if(this.flx){this.flx.style.width="0px"}}}}}else{if(this.img.complete&&this.img.width){this.iw=this.img.width;this.ih=this.img.height;this.r=this.ih/this.iw;this.loaded=true;this.flx=B(this.parent.oc,this.img);if(this.parent.view<0){this.parent.view=this.N}this.parent.calc()}}},click:function(){if(this.parent.view==this.N){if(this.url){window.open(this.url,this.target)}else{this.z1=this.z1==1?this.parent.zoom:1;this.parent.calc()}}else{this.parent.view=this.N;this.parent.calc()}return false}};return{create:function(J,G,K,I){var H=function(){var M=false;var L=C.length;while(L--){if(C[L].oCont==J){M=true}}if(!M){C.push(new D(J,G,K,I));if(!imf.initialized){imf.initialized=true;F(window,"resize",function(){var N=C.length;while(N--){C[N].resize()}});F(document.getElementById(J),"mouseout",function(O){if(!O){O=window.event}var N=O.relatedTarget||O.toElement;if(N&&N.tagName=="HTML"){var P=C.length;while(P--){C[P].oc.onmousemove=null}}return false});setInterval(function(){var N=C.length;while(N--){C[N].run()}},16)}}};F(window,"load",function(){H()})}}}();