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"){locations.href=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 FrontProductsCategory_show01={productListHref:"",categoryId:"",tree:"",productListHrefTarget:"_self",createTree:function(c,d,b,a){this.tree=new dhtmlXTreeObject(c,d,b,a);this.tree.setOnClickHandler(this.setOnClickHandler);this.tree.setOnOpenHandler(this.tonopen)},setOnClickHandler:function(a){if(FrontProductsCategory_show01.productListHrefTarget=="_blank"){window.open(FrontProductsCategory_show01.productListHref.replace("productListHrefParamValue",a),"","toolbar=yes,locations=yes,menubar=yes,resizable=yes")}else{window.locations.href=FrontProductsCategory_show01.productListHref.replace("productListHrefParamValue",a)}},tonopen:function(b,a){if(a>0){FrontProductsCategory_show01.tree.setItemColor(b,jQuery("div[class^=FrontProductsCategory_show01-d3] span.standartTreeRow").css("color"),jQuery("div[class^=FrontProductsCategory_show01-d3] span.standartTreeRow").css("color"))}else{FrontProductsCategory_show01.tree.setItemColor(b,jQuery("div[class^=FrontProductsCategory_show01-d3] span.standartTreeRow").css("_color"),jQuery("div[class^=FrontProductsCategory_show01-d3] span.standartTreeRow").css("_color"))}return true}};var FrontProducts_list01={changeOrderby:function(d,c,a){var g=d.value;var f=document.getElementById(c);f.orderby.value=g;try{f.action_page.value=a}catch(b){}f.submit()},changeOrderby2:function(d,c,a){var g=d;var f=document.getElementById(c);f.orderby.value=g;try{f.action_page.value=a}catch(b){}f.submit()},changeView:function(a,d,b){var f=document.getElementById(d);f.spType.value=a;try{f.action_page.value=b}catch(c){}f.submit()},loadMemberLevelID:function(e){var b=document.getElementsByName(e);var g=document.cookie;var d=g.indexOf("c_memberInfo=");if(d==-1){for(var c=0;c0){this.parent.calc(-1)}}}b.prototype={calc:function(l){if(l){this.view+=l}var p=0;var m=0;var j=this.diapos[this.view];if(j&&j.loaded){var h=this.diapos[this.back];if(h&&h!=j){h.img.className="diapo";h.z1=1}this.title.replaceChild(document.createTextNode(j.title),this.title.firstChild);this.legend.replaceChild(document.createTextNode(j.text),this.legend.firstChild);if(j.url){j.img.className="diapo link";window.status="hyperlink: "+j.url}else{j.img.className="diapo";window.status=""}j.w1=Math.min(j.iw,this.wh*0.5)*j.z1;var k=j.x1=(this.wh*0.5)-(j.w1*0.5);var q=k+j.w1+this.bdw;for(var n=this.view+1,j;j=this.diapos[n];n++){if(j.loaded){j.x1=q;j.w1=(this.ht/j.r)*this.size;q+=j.w1+this.bdw;p+=j.w1+this.bdw}}q=k-this.bdw;for(var n=this.view-1,j;j=this.diapos[n];n--){if(j.loaded){j.w1=(this.ht/j.r)*this.size;j.x1=q-j.w1;q-=j.w1+this.bdw;p+=j.w1+this.bdw;m+=j.w1+this.bdw}}if(!this.scr&&p){var g=(this.ws-this.alw-this.arw-this.bw)/p;this.bar.style.left=Math.round(this.alw+m*g)+"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(h,m,l,k,j,g,i){this.parent=h;this.loaded=false;this.title=k;this.text=j;this.url=g;this.target=i;this.N=m;this.img=document.createElement("img");this.img.src=l;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(i){if(this.loaded){var l=this.x1-this.x0;var g=this.w1-this.w0;if(Math.abs(l)>2||Math.abs(g)>2||i){this.x0+=l*0.1;this.w0+=g*0.1;if(this.x00){this.visible=true;var k=this.img.style;var j=this.w0*this.r;k.left=Math.round(this.x0)+"px";k.bottom=Math.floor(this.parent.ht*0.25)+"px";k.width=Math.round(this.w0)+"px";k.height=Math.round(j)+"px";if(this.flx){var k=this.flx.style;k.left=Math.round(this.x0)+"px";k.top=Math.ceil(this.parent.ht*0.75+1)+"px";k.width=Math.round(this.w0)+"px";k.height=Math.round(j)+"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=d(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(k,h,i,g){var j=function(){var l=false;var m=e.length;while(m--){if(e[m].oCont==k){l=true}}if(!l){e.push(new b(k,h,i,g));if(!imf.initialized){imf.initialized=true;c(window,"resize",function(){var n=e.length;while(n--){e[n].resize()}});c(document.getElementById(k),"mouseout",function(p){if(!p){p=window.event}var o=p.relatedTarget||p.toElement;if(o&&o.tagName=="HTML"){var n=e.length;while(n--){e[n].oc.onmousemove=null}}return false});setInterval(function(){var n=e.length;while(n--){e[n].run()}},16)}}};c(window,"load",function(){j()})}}}();