
window.MAPION=window.MAPION||{};MAPION.VERSION="v1.1.5";MAPION.VERSION.REV="$Rev: 1894 $";window.MAPION=window.MAPION||{};MAPION.Package=function(){};MAPION.Package.REV="$Rev: 673 $";MAPION.Package.hash={};MAPION.Package.register=function(path,obj){var h=MAPION.Package.hash;var c=eval(path+"."+obj);h[path]=h[path]||{};h[path][obj]=c;};MAPION.Package.load=function(path,target){if(typeof(path)!="string")return;var h=MAPION.Package.hash;target=target||window;if(path=="*"||path=="MAPION.*"){for(var d1 in h){for(var d2 in h[d1]){if(!!target[d2]&&target===window){try{console.log("MAPION.Package.load::window."+d2+" is overwritten...");}catch(e){};};target[d2]=h[d1][d2];};};return;};if(path.indexOf(".")==-1&&path.indexOf("/")==-1)return;path=path.replace(/\//g,".");var paths=path.split(".");if(paths.length<2)return;var last=paths[paths.length-1];paths.pop();var s=paths.join(".");if(last=="*"){var o=h[s];for(var i in o){if(!!target[i]&&target===window){try{console.log("MAPION.Package.load::window."+i+" is overwritten...");}catch(e){};};target[i]=o[i];};}else{if(!!target[last]&&target===window){try{console.log("MAPION.Package.load::window."+last+" is overwritten...");}catch(e){};};target[last]=h[s][last];};};window.MAPION=window.MAPION||{};MAPION.lang=MAPION.lang||{};MAPION.lang.StringBuffer=function(){this.buffer=[];this.append.apply(this,arguments);};MAPION.lang.StringBuffer.prototype.append=function(str){for(var i=0,l=arguments.length;i<l;i++)this.buffer.push(arguments[i]);return this;};MAPION.lang.StringBuffer.prototype.toString=function(){return this.buffer.join("");};MAPION.lang.StringBuffer.prototype.join=function(separator){return this.buffer.join(separator||",");};MAPION.lang.StringBuffer.REV="$Rev: 783 $";try{MAPION.Package.register("MAPION.lang","StringBuffer");}catch(e){};window.MAPION=window.MAPION||{};MAPION.lang=MAPION.lang||{};MAPION.lang.Snippets=function(){};MAPION.lang.Snippets.escapeHTML1=function(str){return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\r\n|\n/g,"<br/>");};MAPION.lang.Snippets.escapeHTML2=function(str){if(!MAPION.lang.Snippets.escapeHTML2.div){MAPION.lang.Snippets.escapeHTML2.div=document.createElement("div");MAPION.lang.Snippets.escapeHTML2.text=document.createTextNode("");MAPION.lang.Snippets.escapeHTML2.div.appendChild(MAPION.lang.Snippets.escapeHTML2.text);};MAPION.lang.Snippets.escapeHTML2.text.data=str;return MAPION.lang.Snippets.escapeHTML2.div.innerHTML;};MAPION.lang.Snippets.escapeHTML2.div=null;MAPION.lang.Snippets.escapeHTML=MAPION.lang.Snippets.escapeHTML1;MAPION.lang.Snippets.parameterToHash=function(str,duplicateToArray){if(str===void 0)str=location.search;var params=str.replace(/^\?/g,"").replace(/\s/g,"&").replace(/&+/g,"&").match(/[^&]*/g);var ret={};for(var i=0,l=params.length;i<l;i++){if(params[i].match(/(.*)=(.*)/)){var key=RegExp.$1;var val=RegExp.$2;if(duplicateToArray){if(!ret[key]){ret[key]=val;}else if(typeof ret[key]==="string"){ret[key]=[ret[key],val];}else{ret[key].push(val);};}else{ret[key]=val;};};};return ret;};MAPION.lang.Snippets.hashToParameter=function(obj){if(!obj)return"";var a=[];for(var i in obj){if(obj.hasOwnProperty(i)){if(obj[i]instanceof Array){for(var j=0,l=obj[i].length;j<l;j++)a.push(i+"="+obj[i][j]);}else{a.push(i+"="+obj[i]);};};};return a.join("&");};MAPION.lang.Snippets.deferred=(function(){var _w=window,_d=window.document;var deferred_default=function(func){_w.setTimeout(function(){func()},0);};var deferred_faster_way_readystatechange=((location.protocol==="http:")&&!_w.opera&&/\bMSIE\b/.test(navigator.userAgent))&&function(func){var script=_d.createElement("script");script.type="text/javascript";script.src="data:text/javascript,";script.onreadystatechange=function(){func()};};var deferred_faster_way_Image=((typeof(Image)!=="undefined")&&_d.addEventListener)&&function(func){var img=new Image();var handler=function(){func();};img.addEventListener("load",handler,false);img.addEventListener("error",handler,false);img.src="data:,/ _ / X";};return deferred_faster_way_readystatechange||deferred_faster_way_Image||deferred_default;})();MAPION.lang.Snippets.getOwnScriptTagSrcParameter=function(){return MAPION.lang.Snippets.parameterToHash(MAPION.lang.Snippets.getOwnScriptTagSrcParameter.srcParam);};MAPION.lang.Snippets.getOwnScriptTagSrcParameter.srcParam=(function(){try{var scriptElms=document.getElementsByTagName('script');var scriptElm=scriptElms[scriptElms.length-1];var scriptSrc=scriptElm.src;return scriptSrc.match(/\?(.*)$/)[1];}catch(e){return"";};})();MAPION.lang.Snippets.mixin=function(){var o={};for(var i=0,l=arguments.length;i<l;i++)o=MAPION.lang.Snippets._mixin(o,arguments[i]);return o;};MAPION.lang.Snippets._mixin=function(o1,o2){var o={};if(typeof o1==="string")o1=MAPION.lang.Snippets.parameterToHash(o1);if(typeof o2==="string")o2=MAPION.lang.Snippets.parameterToHash(o2);for(var i in o1)if(o1.hasOwnProperty(i))o[i]=o1[i];for(var i in o2)if(o2.hasOwnProperty(i))o[i]=o2[i];return o;};MAPION.lang.Snippets.toCamelWord=function(str){if(typeof str!=="string")return"";return str.toLowerCase().charAt(0).toUpperCase()+str.substring(1);};MAPION.lang.Snippets.toCamelCase=function(){var a=[];if(!!arguments[0])a.push(arguments[0].toString().toLowerCase());for(var i=1,l=arguments.length;i<l;i++)a.push(MAPION.lang.Snippets.toCamelWord(arguments[i].toString()));return a.join("");};MAPION.lang.Snippets.asArray=function(o){if(o===null||o===void 0)return[];if(o instanceof Array)return o;else return[o];};MAPION.lang.Snippets.reverseString=function(str){if(typeof str!=="string")return"";var ary=[];for(var i=0,l=str.length;i<l;i++)ary.unshift(str.charAt(i));return ary.join("");};MAPION.lang.Snippets.REV="$Rev: 1766 $";try{MAPION.Package.register("MAPION.lang","Snippets");}catch(e){};window.MAPION=window.MAPION||{};MAPION.lang=MAPION.lang||{};MAPION.lang.Iterable=function(collection){var c=(collection instanceof Array)?collection.concat():[];return{iterator:function(){var i=0;return{hasNext:function(){return c.length>i;},next:function(){return c[i++];},remove:function(){c[i]=null;}}},get:function(prop){var it=this.iterator();var a=[];while(it.hasNext()){var o=it.next();if(o&&o[prop]!==null&&o[prop]!==void 0)a.push(o[prop]);};return MAPION.lang.Iterable(a);},each:function(func){if(typeof func!=="function")func=function(){};var it=this.iterator();var a=[];while(it.hasNext()){var o=it.next();var ret=func(o);if(ret!==null&&ret!==void 0)a.push(ret);else a.push(o);};return MAPION.lang.Iterable(a);},asArray:function(){var it=this.iterator();var a=[];while(it.hasNext())a.push(it.next());return a;}};};MAPION.lang.Iterable.REV="$Rev: 1306 $";try{MAPION.Package.register("MAPION.lang","Iterable");}catch(e){};window.MAPION=window.MAPION||{};MAPION.dom=MAPION.dom||{};MAPION.dom.DomHelper=function(){};MAPION.dom.DomHelper.isNodeElement=function(elm){return!!(elm&&elm.nodeType&&elm.nodeName);};MAPION.dom.DomHelper.retrieveCommentNodeData=function(elm){if(!MAPION.dom.DomHelper.isNodeElement(elm)||!elm.childNodes)return"";for(var i=0,a=[],l=elm.childNodes.length;i<l;i++){if(elm.childNodes[i].nodeType==8){a.push(elm.childNodes[i].data.toString());};};return a.join("\n");};MAPION.dom.DomHelper.REV="$Rev: 982 $";try{MAPION.Package.register("MAPION.dom","DomHelper");}catch(e){};window.MAPION=window.MAPION||{};MAPION.dom=MAPION.dom||{};MAPION.dom.SelectWrapper=function(elm){if(!MAPION.dom.DomHelper.isNodeElement(elm))throw new Error("MAPION.dom.SelectWrapper::() Illegal argumented error...");if(elm.nodeName.toLowerCase()!=="select")throw new Error("MAPION.dom.SelectWrapper::() Illegal argumented error...");if(this===window)return new MAPION.dom.SelectWrapper(elm);this.elm=elm;};MAPION.dom.SelectWrapper.prototype.length=function(){return this.elm.length;};MAPION.dom.SelectWrapper.prototype.selectedIndex=function(){return this.elm.selectedIndex;};MAPION.dom.SelectWrapper.prototype.toString=function(){var a=[];for(var i=0,l=this.elm.length;i<l;i++){if(this.elm.options[i].selected){a.push(">("+this.elm.options[i].innerHTML+","+this.elm.options[i].value+")<");}else{a.push("("+this.elm.options[i].innerHTML+","+this.elm.options[i].value+")");};};return a.join(", ");};MAPION.dom.SelectWrapper.prototype.add=function(labelString,value){this.elm.options[this.elm.length]=new Option(labelString,value);};MAPION.dom.SelectWrapper.prototype.setDataProvider=function(data,labelStringProperty,valueProperty){if(!(data instanceof Array))return;labelStringProperty=labelStringProperty||"label";valueProperty=valueProperty||"value";var selectedLabel,selectedValue;if(this.elm.selectedIndex>=0){selectedLabel=this.elm.options[this.elm.selectedIndex].innerHTML;selectedValue=this.elm.options[this.elm.selectedIndex].value;};this.clear();for(var i=0,l=data.length;i<l;i++)this.add(data[i][labelStringProperty],data[i][valueProperty]);if(selectedLabel&&selectedValue)this.select(selectedLabel,selectedValue);};MAPION.dom.SelectWrapper.prototype.insert=function(labelString,value,index){if(typeof index!=="number"||index>this.elm.length||index<0)index=this.elm.length;var i=this.elm.length;while(i>index){var selected=this.elm.options[i-1].selected;this.elm.options[i]=new Option(this.elm.options[i-1].innerHTML,this.elm.options[i-1].value);this.elm.options[i].selected=selected;i--;};this.elm.options[index]=new Option(labelString,value);};MAPION.dom.SelectWrapper.prototype.remove=function(labelString,value){for(var i=0,l=this.elm.length;i<l;i++){if(this.elm.options[i].innerHTML===labelString&&this.elm.options[i].value===value){this.elm.options[i]=null;return;};};};MAPION.dom.SelectWrapper.prototype.removeAt=function(index){if(typeof index!=="number")return;if(index<0||index>=this.elm.length)return;this.elm.options[index]=null;};MAPION.dom.SelectWrapper.prototype.clear=function(){while(this.elm.length)this.elm.options[this.elm.length-1]=null;};MAPION.dom.SelectWrapper.prototype.select=function(labelString,value){for(var i=0,l=this.elm.length;i<l;i++){if(value===void 0){if(this.elm.options[i].innerHTML===labelString||this.elm.options[i].value===labelString){this.elm.options[i].selected=true;return;};}else{if(this.elm.options[i].innerHTML===labelString&&this.elm.options[i].value===value){this.elm.options[i].selected=true;return;};};};};MAPION.dom.SelectWrapper.prototype.selectAt=function(index){if(typeof index!=="number"||index>this.elm.length||index<0)return;this.elm.options[parseInt(index,10)].selected=true;};MAPION.dom.SelectWrapper.REV="$Rev: 1313 $";try{MAPION.Package.register("MAPION.dom","SelectWrapper");}catch(e){};window.MAPION=window.MAPION||{};MAPION.event=MAPION.event||{};MAPION.event.EventDispatcher=function(){};MAPION.event.EventDispatcher.REV="$Rev: 1035 $";MAPION.event.EventDispatcher.implement=function(obj){obj.__ed_eventContainer=new Object();obj.addEventListener=this._addEventListener;obj.removeEventListener=this._removeEventListener;obj.dispatchEvent=this._dispatchEvent;return obj;};MAPION.event.EventDispatcher.initialize=MAPION.event.EventDispatcher.implement;MAPION.event.EventDispatcher._addEventListener=function(_en,_obj){if(!_en||!_obj)return this;if(typeof(_obj)=="object"||typeof(_obj)=="function"){if(this.__ed_eventContainer[_en]==null){this.__ed_eventContainer[_en]=new Array();};this.removeEventListener(_en,_obj);this.__ed_eventContainer[_en].push(_obj);};return this;};MAPION.event.EventDispatcher._removeEventListener=function(_en,_obj){if(!_en||!_obj)return this;var a=this.__ed_eventContainer[_en];if(typeof(a)=="undefined")return this;var l=a.length;for(var i=0;i<l;i++){if(a[i]==_obj){a[i]=function(){};return this;};};};MAPION.event.EventDispatcher._dispatchEvent=function(_ev){if(!_ev)return this;if(typeof(_ev)=="string")_ev=new MAPION.event.EventObject(_ev,this);if(_ev.target==null)_ev.target=this;var a=this.__ed_eventContainer[_ev.type];if(a==null)return this;var l=a.length;for(var i=0;i<l;i++){var ln=a[i];if(!ln)continue;if(typeof(ln)=="object"){ln[_ev.type].apply(ln,arguments);}else{ln.apply(ln,arguments);};};};MAPION.event.EventObject=function(_en,_tg){if(!_en)return;this.type=_en;this.target=_tg;};try{MAPION.Package.register("MAPION.event","EventDispatcher");}catch(e){};try{MAPION.Package.register("MAPION.event","EventObject");}catch(e){};window.MAPION=window.MAPION||{};MAPION.event=MAPION.event||{};MAPION.event.Binding=function(sourceObject,sourceProperty,targetObject,targetProperty,eventType){if(typeof(MAPION.event.EventDispatcher)=="undefined"){alert("EventDispatcher has not been loaded !");return;};if(typeof(eventType)=="undefined")eventType=sourceProperty+"Changed";try{var handler=function(event){try{if(typeof(targetObject[targetProperty])==="function"){targetObject[targetProperty](sourceObject[sourceProperty]);}else{targetObject[targetProperty]=sourceObject[sourceProperty];};}catch(error){};};sourceObject.addEventListener(eventType,handler);handler();return{target:sourceObject,eventType:eventType,handler:handler};}catch(error){};};MAPION.event.Binding.REV="$Rev: 674 $";MAPION.event.Binding.release=function(token){try{token.target.removeEventListener(token.eventType,token.handler);delete token.handler;}catch(error){};};try{MAPION.Package.register("MAPION.event","Binding");}catch(e){};window.MAPION=window.MAPION||{};MAPION.event=MAPION.event||{};MAPION.event.DomBinding=function(dataSourceContext,domContext){dataSourceContext=dataSourceContext||window;domContext=domContext||window.document.body;var sm=MAPION.event.DomBinding.START_MARKER,em=MAPION.event.DomBinding.END_MARKER;var formNS=MAPION.event.DomBinding.FORMBINDING_NAMESPACE;var _d=window.document;var _undef=undefined;var hasExpressionNodes=[],hasExpressionInputs=[];var checkRegExp=new RegExp(sm+"([\\s\\S]+?)"+em,"g");var trimRegExp=new RegExp("["+sm+"|"+em+"]","g");var sourceGetRegExp=/([^\.]+)(.*)\.(.+)/g;var commentRegExp=/<\!--[\s\S]*?-->/g;var functionRegExp=/(\w+?)\((.+)\)/g;function getUnique(){return MAPION.event.DomBinding.BINDING_ID+(MAPION.event.DomBinding.BINDING_ID_COUNTER++);};function retrieveElements(node){if(!node.innerHTML.match(checkRegExp))return;var nodeValues=[];var hasChildNodes=[];for(var i=0,l=node.childNodes.length;i<l;i++){var child=node.childNodes[i];var nodeValue=child.nodeValue||"";nodeValues[nodeValues.length]=nodeValue;if(child.hasChildNodes())hasChildNodes[hasChildNodes.length]=child;var nodeName=child.nodeName?child.nodeName.toLowerCase():"";if(nodeName==="input"){var val1=child.getAttribute("value")||"";var val2=child.value||"";if(val1.match(checkRegExp)||val2.match(checkRegExp)){var val=val1.match(checkRegExp)?val1:val2;child.setAttribute("id",child.id||getUnique());hasExpressionInputs[hasExpressionInputs.length]={elmId:child.id,value:val};child.setAttribute("value","");child.value="";};};};if(nodeValues.join("").match(checkRegExp)){hasExpressionNodes[hasExpressionNodes.length]=node;}else{for(var i=0,l=hasChildNodes.length;i<l;i++)retrieveElements(hasChildNodes[i]);};};retrieveElements(domContext);var dataSourceElementExpressions=[];var resolvedExpressionsHTML=[];for(var i=0,l=hasExpressionNodes.length;i<l;i++){var node=hasExpressionNodes[i];var html=node.innerHTML;html=html.replace(commentRegExp,"");var ret=html.match(checkRegExp);for(var i2=0,l2=ret.length;i2<l2;i2++){var token=ret[i2];var snipet=token.replace(trimRegExp,"");var func=null;if(snipet.match(functionRegExp)){func=RegExp.$1;snipet=RegExp.$2;};if(snipet.indexOf(formNS)===0){dataSourceElementExpressions[dataSourceElementExpressions.length]=snipet;};var sourceEvalString,sourceProp,targetId;if(snipet.match(sourceGetRegExp)){sourceEvalString="this['"+RegExp.$1+"']"+RegExp.$2;sourceProp=RegExp.$3;}else{sourceEvalString="this";sourceProp=snipet;};var targetId=getUnique();html=html.replace(token,"<span id=\""+targetId+"\"></span>");resolvedExpressionsHTML[resolvedExpressionsHTML.length]=sourceEvalString;resolvedExpressionsHTML[resolvedExpressionsHTML.length]=sourceProp;resolvedExpressionsHTML[resolvedExpressionsHTML.length]=targetId;resolvedExpressionsHTML[resolvedExpressionsHTML.length]=token;resolvedExpressionsHTML[resolvedExpressionsHTML.length]=func;};node.innerHTML=html;};var delimiter="_d_l_m_t_";var resolvedExpressionsValues={};for(var i=0,l=hasExpressionInputs.length;i<l;i++){var originValue=hasExpressionInputs[i].value;var value=originValue;var ret=value.match(checkRegExp);for(var i2=0,l2=ret.length;i2<l2;i2++){var exp=ret[i2];exp.match(checkRegExp);var snipet=RegExp.$1;if(snipet.indexOf(formNS)===0){dataSourceElementExpressions[dataSourceElementExpressions.length]=snipet;};value=value.replace(exp,delimiter+exp+delimiter);};var tokens=value.split(delimiter);var evalStrings=[];for(var i2=0,l2=tokens.length;i2<l2;i2++){var token=tokens[i2];if(token.match(checkRegExp)){var exp=RegExp.$1;var func=null;if(exp.match(functionRegExp)){func=RegExp.$1;exp=RegExp.$2;};var sourceEvalString,sourceProp;if(exp.match(sourceGetRegExp)){sourceEvalString="this['"+RegExp.$1+"']"+RegExp.$2;sourceProp=RegExp.$3;if(func){if(typeof dataSourceContext[func]!=="function")throw new Error("Illegal expression : "+originValue);evalStrings[evalStrings.length]="self['"+func+"'](self['"+RegExp.$1+"']"+RegExp.$2+"['"+RegExp.$3+"'])";}else{evalStrings[evalStrings.length]="self['"+RegExp.$1+"']"+RegExp.$2+"['"+RegExp.$3+"']";};}else{sourceEvalString="this";sourceProp=exp;if(func){if(typeof dataSourceContext[func]!=="function")throw new Error("Illegal expression : "+originValue);evalStrings[evalStrings.length]="self['"+func+"'](self['"+exp+"'])";}else{evalStrings[evalStrings.length]="self['"+exp+"']";};};var key=sourceEvalString+delimiter+sourceProp;resolvedExpressionsValues[key]=resolvedExpressionsValues[key]||[];}else{evalStrings[evalStrings.length]="'"+token+"'";};};for(var i3 in resolvedExpressionsValues){var ary=resolvedExpressionsValues[i3];ary[ary.length]={target:_d.getElementById(hasExpressionInputs[i].elmId),evalString:evalStrings.join("+"),expression:originValue};};};var hash={};for(var i=0,l=dataSourceElementExpressions.length;i<l;i++){hash[dataSourceElementExpressions[i]]=0;};dataSourceElementExpressions=[];for(var i in hash)dataSourceElementExpressions[dataSourceElementExpressions.length]=i;function getValue(elm){var elms=elm.form[elm.name];var values=[];switch(elm.nodeName.toLowerCase()){case"input":if(!elms.length)elms=[elms];for(var i=0,l=elms.length;i<l;i++){switch(elms[i].type.toLowerCase()){case"radio":case"checkbox":if(elms[i].checked)values[values.length]=elms[i].getAttribute("value");break;default:values[values.length]=elms[i].value;break;};};break;case"textarea":values[values.length]=elm.value;break;case"select":var options=elms.options;var selectedIndex=elms.selectedIndex;var selectedOption=options[selectedIndex];if(selectedOption)values[values.length]=selectedOption.getAttribute("value");break;};return values.join(MAPION.event.DomBinding.FORMBINDING_JOINT_STRING);};var formNameAccessRegExp=/.*?\.(.*?)\.(.*)/g;dataSourceContext[formNS]=(function(exps){var elements=[],i,l,i2,l2;var $F={};for(i=0,l=exps.length;i<l;i++){var exp=exps[i];if(exp.match(formNameAccessRegExp)){var formName=RegExp.$1;var elmName=RegExp.$2;try{var elms=_d[formName][elmName];if(!elms.type){for(i2=0,l2=elms.length;i2<l2;i2++)elements[elements.length]=elms[i2];}else{elements[elements.length]=elms;};}catch(err){throw new Error("Illegal expression : "+exp+" , or [document."+formName+"] is not unique");};};};for(i=0,l=elements.length;i<l;i++){var elm=elements[i];var form=elm.form;if(form&&form.name&&elm.name){$F[form.name]=$F[form.name]||MAPION.event.EventDispatcher.implement({});$F[form.name][elm.name]=getValue(elm);var onchange=elm.onchange||function(){};elm.onchange=function onchangeHandler(e){e=e||window.event;var targetElm=e.srcElement||e.currentTarget;var targetForm=targetElm.form;$F[targetForm.name][targetElm.name]=getValue(targetElm);$F[targetForm.name].dispatchEvent(targetElm.name+"Changed");return onchange.call(this,e);};};};return $F;})(dataSourceElementExpressions);for(var i=0,l=resolvedExpressionsHTML.length;i<l;i+=5){(function(sourceEvalString,sourceProp,targetId,expression,func){var target=_d.getElementById(targetId);var targetProp="innerHTML";try{var source=eval(sourceEvalString);if(source!==_undef&&source[sourceProp]!==_undef){if(func){if(typeof this[func]!=="function")throw new Error("Illegal expression : "+expression);(function(ds,s,sp,t,tp,f){var fp=getUnique();t[fp]=function(value){t[tp]=ds[f].call(null,value);};MAPION.event.Binding(s,sp,t,fp);})(this,source,sourceProp,target,targetProp,func);}else{MAPION.event.Binding(source,sourceProp,target,targetProp);};}else{throw new Error("Illegal expression : "+expression);};}catch(err){target[targetProp]="";throw new Error("Illegal expression : "+expression);};}).call(dataSourceContext,resolvedExpressionsHTML[i],resolvedExpressionsHTML[i+1],resolvedExpressionsHTML[i+2],resolvedExpressionsHTML[i+3],resolvedExpressionsHTML[i+4]);};for(var key in resolvedExpressionsValues){var keys=key.split(delimiter);(function(sr,s,sp,ary){var self=this;if(!sr)throw new Error("Illegal expression : "+s);for(var i=0,l=ary.length;i<l;i++){try{var val=eval(ary[i].evalString);ary[i].target.setAttribute("value",val);ary[i].target.value=val;}catch(err){ary[i].target.setAttribute("value","");ary[i].target.value="";throw new Error("Illegal expression : "+ary[i].expression);};};sr.addEventListener(sp+"Changed",function(event){for(var i=0,l=ary.length;i<l;i++){try{var val=eval(ary[i].evalString);ary[i].target.setAttribute("value",val);ary[i].target.value=val;}catch(err){ary[i].target.setAttribute("value","");ary[i].target.value="";};};});}).call(dataSourceContext,(function(exp){return eval(exp)}).call(dataSourceContext,keys[0]),keys[0],keys[1],resolvedExpressionsValues[key]);};};MAPION.event.DomBinding.REV="$Rev: 1521 $";MAPION.event.DomBinding.START_MARKER="\\{";MAPION.event.DomBinding.END_MARKER="\\}";MAPION.event.DomBinding.BINDING_ID="_binding_";MAPION.event.DomBinding.BINDING_ID_COUNTER=0;MAPION.event.DomBinding.FORMBINDING_NAMESPACE="$F";MAPION.event.DomBinding.FORMBINDING_JOINT_STRING=",";MAPION.event.DomBinding.release=function(){};try{MAPION.Package.register("MAPION.event","DomBinding");}catch(e){};window.MAPION=window.MAPION||{};MAPION.formatter=MAPION.format||{};MAPION.formatter.NumberFormatter=function(){};MAPION.formatter.NumberFormatter.format=function(value,formatSymbols){if(typeof value!=="number")return"";formatSymbols=formatSymbols||"#,###,###,###,###.#############";if(typeof formatSymbols!=="string")throw new Error("MAPION.formatter.NumberFormatter::format() Illegal argumented error...");var o=formatSymbols.match(/\./g);if(o&&o.length>1)throw new Error("MAPION.formatter.NumberFormatter::format() Illegal argumented error...");var integral=MAPION.lang.Snippets.reverseString((parseInt(value,10))+"");var decimal=(value+"").split(".")[1]||"";var splittedSymbols=formatSymbols.split(".");var integralSymbols=MAPION.lang.Snippets.reverseString(splittedSymbols[0]);var decimalSymbols=splittedSymbols[1]||"";integralSymbols=integralSymbols.replace(/0/g,"_0_");for(var i=0,l=integral.length;i<l;i++){var sidx=integralSymbols.indexOf("#");var zidx=integralSymbols.indexOf("_0_");if(-1<sidx&&(zidx===-1||sidx<zidx))integralSymbols=integralSymbols.replace("#",integral.charAt(i));else if(-1<zidx&&(sidx===-1||zidx<sidx))integralSymbols=integralSymbols.replace("_0_",integral.charAt(i));};integralSymbols=integralSymbols.replace(/(,+)?#/g,"");integralSymbols=integralSymbols.replace(/(,+)-/g,"-");integralSymbols=integralSymbols.replace(/_0_/g,"0");decimalSymbols=decimalSymbols.replace(/0/g,"_0_");for(var i=0,l=decimal.length;i<l;i++){var sidx=decimalSymbols.indexOf("#");var zidx=decimalSymbols.indexOf("_0_");if(-1<sidx&&(zidx===-1||sidx<zidx))decimalSymbols=decimalSymbols.replace("#",decimal.charAt(i));else if(-1<zidx&&(sidx===-1||zidx<sidx)){decimalSymbols=decimalSymbols.replace("_0_",(decimal.charAt(i)==="0"?"_z_":decimal.charAt(i)));};};decimalSymbols=decimalSymbols.replace(/#(,+)?/g,"");decimalSymbols=decimalSymbols.replace(/0+$/g,"");decimalSymbols=decimalSymbols.replace(/_0_/g,"0");decimalSymbols=decimalSymbols.replace(/_z_/g,"0");if(decimalSymbols.match(/^\d/))decimalSymbols="."+decimalSymbols;return MAPION.lang.Snippets.reverseString(integralSymbols)+decimalSymbols;};MAPION.formatter.NumberFormatter.formatMeterOrKilometer=function(value,meterFormatSymbols,kilometerFormatSymbols,conditionFunc){if(typeof value!=="number")throw new Error("MAPION.formatter.NumberFormatter::formatMeterOrKilometer() Illegal argumented error...");meterFormatSymbols=meterFormatSymbols||"#############m";kilometerFormatSymbols=kilometerFormatSymbols||"#############.#km";if(typeof conditionFunc!=="function")conditionFunc=function(v){return v>=1000;};if(!!conditionFunc(value))return MAPION.formatter.NumberFormatter.format(value/1000,kilometerFormatSymbols);else return MAPION.formatter.NumberFormatter.format(value,meterFormatSymbols);};MAPION.formatter.NumberFormatter.REV="$Rev: 1257 $";try{MAPION.Package.register("MAPION.formatter","NumberFormatter");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.JSON=function(param){if(typeof(MAPION.event.EventDispatcher)=="undefined"){alert("EventDispatcher has not been loaded !");return;};MAPION.event.EventDispatcher.implement(this);this.numId=MAPION.net.JSON.scriptCounter;this.responseData=null;var obj=this;MAPION.net.JSON.JSONCALLBACK[this.numId]=function(){obj.clearTimeoutFunc();obj.responseData=arguments;if(obj.canceled)return;obj.dispatchEvent(new MAPION.event.EventObject("onload",obj));};this.scriptId='Jscript2Id'+MAPION.net.JSON.scriptCounter++;this.callbackParamName=MAPION.net.JSON.defaultCallbackParamName;if(param&&param["callbackFuncName"]&&param["callbackFuncName"].toString()){if(window[param["callbackFuncName"].toString()]!==undefined){throw new Error("window."+param["callbackFuncName"].toString()+" is alread declared...");};this.callbackFuncName=param["callbackFuncName"].toString();}else{var d=new Date();this.callbackFuncName="JSONCallback"+this.scriptId+d.getTime();};var makeCallback=this.callbackFuncName+"=function(){MAPION.net.JSON.JSONCALLBACK["+this.numId+"].apply(null,arguments);}";eval(makeCallback);this.timeOutMS=5000;this.noCacheIE=false;this.charset="utf-8";if(param){if(param["fullUrl"])this.fullUrl=param["fullUrl"];if(param["callbackParamName"])this.callbackParamName=param["callbackParamName"];if(param["charset"])this.charset=param["charset"];if(param["timeOutMS"])this.timeOutMS=+param["timeOutMS"];if(param["noCacheIE"])this.noCacheIE=!!param["noCacheIE"];};this.headLoc=document.getElementsByTagName("head").item(0);this.timerID=null;this.canceled=false;};MAPION.net.JSON.REV="$Rev: 1766 $";MAPION.net.JSON.JSONCALLBACK=new Array();MAPION.net.JSON.prototype.setTimeoutFunc=function(func,timeValue){var jsonpr=this;var arg=[];for(var i=2;i<arguments.length;++i){arg.push(arguments[i]);};jsonpr.timerID=setTimeout(function(){func.apply(jsonpr,arg)},timeValue);};MAPION.net.JSON.prototype.clearTimeoutFunc=function(){var jsonpr=this;if(jsonpr.timerID)jsonpr.timerID=clearTimeout(jsonpr.timerID);jsonpr.timerID=null;};MAPION.net.JSON.prototype.buildScriptTag=function(){this.scriptObj=document.createElement("script");this.scriptObj.setAttribute("type","text/javascript");this.scriptObj.setAttribute("charset",this.charset);this.scriptObj.setAttribute("src",this.fullUrl+(this.noCacheIE?this.getNoCacheParameterValue():""));this.scriptObj.setAttribute("id",this.scriptId);};MAPION.net.JSON.prototype.getNoCacheParameterValue=function(){return"&noCacheIE="+new Date().getTime();};MAPION.net.JSON.prototype.removeScriptTag=function(){try{this.headLoc.removeChild(this.scriptObj);}catch(e){};};MAPION.net.JSON.prototype.addScriptTag=function(){this.headLoc.appendChild(this.scriptObj);};MAPION.net.JSON.scriptCounter=0;MAPION.net.JSON.defaultCallbackParamName="callback";MAPION.net.JSON.prototype.get=function(fullUrl,charset,callbackParamName){if(fullUrl)this.fullUrl=fullUrl;if(callbackParamName)this.callbackParamName=callbackParamName;if(charset)this.charset=charset;if(typeof(this.fullUrl)!="string"){alert(this.id+"\nrequestURL is not string!\ntype=>"+typeof(this.fullUrl));return;};if(typeof(this.callbackParamName)!="string"){alert(this.id+"\ncallbackParamName is not string!\ntype=>"+typeof(this.callbackParamName));return;};if(this.fullUrl.match(/[?|&]([^=]+)=\?/)){this.callbackParamName=RegExp.$1;this.fullUrl=this.fullUrl.replace(this.callbackParamName+"=?",this.callbackParamName+"="+this.callbackFuncName);}else if(this.fullUrl.indexOf(this.callbackParamName)!=-1){this.fullUrl.match(new RegExp(".*("+this.callbackParamName+"=.*)"));if(RegExp.$1.indexOf("&")!=-1){this.fullUrl=this.fullUrl.replace(new RegExp(this.callbackParamName+"=.*&"),"");}else{this.fullUrl=this.fullUrl.replace(new RegExp("&"+this.callbackParamName+"=.*"),"");};this.fullUrl=this.fullUrl+(this.fullUrl.indexOf("?")>-1?"&":"?")+this.callbackParamName+"="+this.callbackFuncName;}else{this.fullUrl=this.fullUrl+(this.fullUrl.indexOf("?")>-1?"&":"?")+this.callbackParamName+"="+this.callbackFuncName;};this.clearTimeoutFunc();this.removeScriptTag();var obj=this;this.buildScriptTag();this.setTimeoutFunc(function(){obj.clearTimeoutFunc();obj.dispatchEvent(new MAPION.event.EventObject("onerror",obj));},this.timeOutMS);this.canceled=false;this.addScriptTag();};MAPION.net.JSON.prototype.cancel=function(){this.clearTimeoutFunc();this.removeScriptTag();this.canceled=true;};MAPION.net.JSONP=function(){};MAPION.net.JSONP=MAPION.net.JSON;MAPION.net.JSONP.REV="$Rev: 669 $";try{MAPION.Package.register("MAPION.net","JSONP");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.Ajax=function(param){if(typeof(MAPION.event.EventDispatcher)==="undefined"){alert("EventDispatcher has not been loaded !");return;};MAPION.event.EventDispatcher.implement(this);this.responseXML=null;this.responseText=null;this.id='XHRRequestId'+MAPION.net.Ajax.counter++;this.timerId=null;this.timeOutMS=5000;this.httpobj=null;if(param){if(param["fullUrl"])this.fullUrl=param["fullUrl"];if(param["timeOutMS"])this.timeOutMS=param["timeOutMS"];};};MAPION.net.Ajax.REV="$Rev: 1883 $";MAPION.net.Ajax.counter=0;MAPION.net.Ajax.getXMLHttp=function(){var xmlhttp;try{xmlhttp=new XMLHttpRequest();}catch(e){try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xmlhttp=null;};};};return xmlhttp;};MAPION.net.Ajax.prototype.get=function(fullUrl){if(!this.httpobj){this.httpobj=MAPION.net.Ajax.getXMLHttp();if(!this.httpobj){alert(this.id+"\nXMLHttpRequest is not available!");return;};}else{var obj=this;clearTimeout(this.timerId);this.timerId=null;this.httpobj.abort();delete this.httpobj;this.httpobj=MAPION.net.Ajax.getXMLHttp();};if(fullUrl)this.fullUrl=fullUrl;if(typeof(this.fullUrl)!="string"){alert(this.id+"\nrequestURL is not string!\ntype=>"+typeof(this.fullUrl));return;};var obj=this;var xmlhttp=this.httpobj;xmlhttp.open("GET",this.fullUrl,true);xmlhttp.onreadystatechange=function(){try{if(xmlhttp.readyState===4){window.clearTimeout(obj.timerId);obj.timerId=null;if(xmlhttp.status===200||xmlhttp.status===304){obj.responseXML=xmlhttp.responseXML;obj.responseText=xmlhttp.responseText;obj.dispatchEvent(new MAPION.event.EventObject("onload",obj));}else if(xmlhttp.status===404){obj.dispatchEvent(new MAPION.event.EventObject("onerror",obj));};};}catch(e){obj.dispatchEvent(new MAPION.event.EventObject("onerror",obj));};};obj.timerId=window.setTimeout(function(){window.clearTimeout(obj.timerId);obj.timerId=null;xmlhttp.abort();obj.dispatchEvent(new MAPION.event.EventObject("onerror",obj));},obj.timeOutMS);xmlhttp.send(null);};MAPION.net.Ajax.prototype.cancel=function(){if(this.httpobj)this.httpobj.abort();if(this.timerId){window.clearTimeout(this.timerId);this.timerId=null;};};try{MAPION.Package.register("MAPION.net","Ajax");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.SolrMapper=function(params,callbackFuncName){var F=function(){this.config={searchPath:"http://www.mapion.co.jp/search/",callbackKey:"json.wrf",params:{key:"mapion",wt:"json"}};if(params&&typeof params=="object"){this.config.params=this.setParams(params);};if(typeof MAPION.net.JSONP=="undefined"){alert("JSON has not been loaded!");}else{var timeoutMS=this.config.params["timeOutMS"]?this.config.params["timeOutMS"]:5000;this.json=new MAPION.net.JSON({"timeOutMS":timeoutMS,"callbackFuncName":callbackFuncName||null});};};F.prototype=MAPION.net.SolrMapper.prototype;return new F;};MAPION.net.SolrMapper.REV="$Rev: 2101 $";MAPION.net.SolrMapper.prototype={setCore:function(core){if(core){this.core=core;};return this;},Local:function(core){if(core){this.core=core+"/local";};return this;},Select:function(core){if(core){this.core=core+"/select";};return this;},Ippatsu:function(){this.core="ippatsu/select";return this;},Suggest:function(){this.core="suggest/select";return this;},prevCbFunc:null,prevErrFunc:null,load:function(params,cbFunc,errFunc){if(!this.core)return false;var prms=this.setParams(params);var requestUrl=this.generateURL(this.core,prms);if(this.prevCbFunc)this.json.removeEventListener("onload",this.prevCbFunc);if(this.prevErrFunc)this.json.removeEventListener("onerror",this.prevErrFunc);if(cbFunc){this.prevCbFunc=function(e){cbFunc.apply(null,e.target.responseData);};this.json.addEventListener("onload",this.prevCbFunc);};if(errFunc){this.prevErrFunc=errFunc;this.json.addEventListener("onerror",errFunc);};this.json.get(requestUrl,"utf-8",this.config.callbackKey);this.core="";return this;},callBackNameGenerate:function(){var date=new Date();return"_SMCB"+Math.floor(Math.random()*100)+date.getTime();},setParams:function(params){var prms=this.objectClone(this.config.params);if(params&&typeof params=="object"){for(var key in params){prms[key]=params[key];};};return prms;},generateURL:function(core,params){var url=this.config.searchPath+core+"?";if(params&&typeof params=="object"){var paramStr=[];for(var key in params){paramStr.push(key+"="+params[key]);};url+=paramStr.join("&");};return url;},objectClone:function(o){var Obj=function(){};Obj.prototype=o;return new Obj;},getCondition:function(genreCode,genreArray,defaultCondition){var condition;var queryObj;if(!genreCode||!genreArray){return"";};switch(genreCode){case"hotpepper":queryObj=(genreArray.length>0)?this.genQueryObj(genreArray):"";break;case"rentacar":queryObj={"taxonomy":"nfs_reserve"};break;case"station":queryObj=null;break;case"nature":queryObj={"category1_code":genreCode};break;case"qlife":queryObj=(genreArray.length>0)?this.genQueryObj(genreArray,["emergency_flag","wordofmouth_num"]):"";break;case"photo":queryObj=null;break;case"gogogs":queryObj=(genreArray.length>0)?this.genQueryObj(genreArray,["flag_24h","flag_self"]):"";break;case"search":queryObj=(genreArray.length>0)?this.genQueryObj(genreArray):"";break;default:if(genreArray&&genreArray.length>0){queryObj=this.genQueryObj(genreArray);}else{queryObj={"category1_code":genreCode};};break;};condition=this.generateQuery(queryObj);if(defaultCondition)condition+=defaultCondition;return condition;},genQueryObj:function(arr,optionArr){var optObj={};if(optionArr){for(var i=0;i<optionArr.length;i++){optObj[optionArr[i]]=true;};};var query={"OR":{}};var options={"OR":{}};var optFlag=false;var queryFlag=false;if(!arr||arr.length===0){query=false;}else{for(var i=0;i<arr.length;i++){var values=arr[i].split(":");if(optObj[values[0]]){if(!options["OR"][values[0]]){options["OR"][values[0]]=values[1];}else{if(typeof options["OR"][values[0]]=="string"){var option_str=options["OR"][values[0]];options["OR"][values[0]]=[option_str];};options["OR"][values[0]].push(values[1]);};optFlag=true;}else{if(!query["OR"][values[0]]){query["OR"][values[0]]=[];};query["OR"][values[0]].push(values[1]);queryFlag=true;};};if(queryFlag&&optFlag){query={"AND":[query,options]};}else if(!queryFlag&&optFlag){query=options;}else{};};return query;},generateQuery:function(queryObj){var parents=[];var result;var closure=function(obj){var res=[];var str="";var parentArrayFlag=false;var parentKey=parents.length>0?parents[parents.length-1]:null;for(var key in obj){if(typeof obj[key]=="object"){parents.push(key.toLowerCase());var result=closure(obj[key]);if(result&&typeof result=="object"){var lowerKey=key.toLowerCase();if(lowerKey=="and"||lowerKey=="or"){str+=result.join("+"+lowerKey.toUpperCase()+"+");if(0<result.length){str="("+str+")";};}else if(lowerKey=="not"){for(var notkey in result){var notStr=result[notkey];if(notStr.match(/^\((.*)\)$/i)===null){notStr="("+notStr+")";};str+="+NOT"+notStr;};}else{if(typeof key=="number")parentArrayFlag=true;if(isNaN(key)){res=result;}else{res.push(result);};};}else{res.push(result);};}else if(typeof obj[key]=="string"){if(isNaN(key)){res.push(key+":"+obj[key]);}else{res.push(parentKey+":"+obj[key]);};};};if(str){res.push(str);};if(parentKey){if(!parentArrayFlag)parents.pop();};return res;};if(queryObj instanceof Array){result=queryObj.join("+");}else if(typeof queryObj=="object"){var r=closure(queryObj);result=r.join("");}else{result=queryObj;};return result;},q:function(key,value){if(value&&value!=="")return key+":"+value.toString();else return"";},not:function(value){if(value&&value!=="")return"NOT("+value.toString()+")";else return"";},_arrayJoin:function(s,a){var args=[];if(a[0]instanceof Array){for(var i=0;i<a[0].length;i++)if(a[0][i]!=="")args.push(a[0][i]);}else{for(var i=0;i<a.length;i++)if(a[i]!=="")args.push(a[i]);};if(args.length>1){return"("+args.join(s)+")";}else{return args.join(s);};},plus:function(){return this._arrayJoin("+",arguments);},and:function(){return this._arrayJoin("+AND+",arguments);},or:function(){return this._arrayJoin("+OR+",arguments);}};try{MAPION.Package.register("MAPION.net","SolrMapper");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net._JSONscriptRequest_=function(fullUrl,charset,noCacheIE){this.fullUrl=fullUrl;this.charset=(charset==null||charset=='')?"UTF-8":charset;this.noCacheIE=noCacheIE;this.headLoc=document.getElementsByTagName("head").item(0);this.scriptId='JscriptId'+MAPION.net._JSONscriptRequest_.scriptCounter++;this.timeoutMSec=null;this.timeoutFunc=null;this.timerID=null;};MAPION.net._JSONscriptRequest_.REV="$Rev: 576 $";MAPION.net._JSONscriptRequest_.scriptCounter=1;MAPION.net._JSONscriptRequest_.prototype.setTimeoutFunc=function(func,timeValue){var jsonpr=this;var arg=[];for(var i=2;i<arguments.length;++i){arg.push(arguments[i]);};jsonpr.timeoutFunc=function(){func.apply(jsonpr,arg)};jsonpr.timeoutMSec=timeValue;jsonpr.timerID=window.setTimeout(jsonpr.timeoutFunc,jsonpr.timeoutMSec);};MAPION.net._JSONscriptRequest_.prototype.clearTimeoutFunc=function(){var jsonpr=this;if(jsonpr.timerID)jsonpr.timerID=window.clearTimeout(jsonpr.timerID);jsonpr.timerID=null;jsonpr.timeoutFunc=null;jsonpr.timeoutMSec=null;};MAPION.net._JSONscriptRequest_.prototype.buildScriptTag=function(){this.scriptObj=document.createElement("script");this.scriptObj.setAttribute("type","text/javascript");this.scriptObj.setAttribute("charset",this.charset);this.scriptObj.setAttribute("src",this.fullUrl+(this.noCacheIE?this.getNoCacheParameterValue():""));this.scriptObj.setAttribute("id",this.scriptId);};MAPION.net._JSONscriptRequest_.prototype.getNoCacheParameterValue=function(){return"&noCacheIE="+new Date().getTime();};MAPION.net._JSONscriptRequest_.prototype.removeScriptTag=function(){try{this.headLoc.removeChild(this.scriptObj);}catch(e){};};MAPION.net._JSONscriptRequest_.prototype.addScriptTag=function(){this.headLoc.appendChild(this.scriptObj);};try{MAPION.Package.register("MAPION.net","_JSONscriptRequest_");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.HTTPService=function(parameterForInvoker){MAPION.event.EventDispatcher.implement(this);this.id="HTTPService"+(MAPION.net.HTTPService.idCounter++);this.url=null;this.urlExpression=null;this.parsedExpression=null;this.context=null;this.loading=false;this.concurrency=MAPION.net.HTTPService.CONCURRENCY_LAST;this.invokerClass=MAPION.net.JSONP;this.parameterForInvoker=parameterForInvoker||{};this.invoker=null;this.callback=null;this.queue=[];this.operations=[];this.preoperations=[];this.onerrorCallback=null;this.onerrorOperation=null;};MAPION.net.HTTPService.idCounter=0;MAPION.net.HTTPService.prototype.setURL=function(urlExpression){if(typeof urlExpression==="string"){var previousUrlExpression=this.urlExpression;this.urlExpression=urlExpression;if(previousUrlExpression!==this.urlExpression)this.dispatchEvent("urlExpressionChanged");}else{throw new Error("Illegal argumented error in MAPION.net.HTTPService.prototype.setURL...")};return this;};MAPION.net.HTTPService.prototype.setContext=function(context){this.context=context;this.parsedExpression=null;return this;};MAPION.net.HTTPService.prototype.triggerEvent=function(target,eventType){if(!target||typeof target.addEventListener!=="function")return this;var that=this;target.addEventListener(eventType,function(event){if(typeof event.target._dispatchingSearchTriggerEvent==="string"){if(event.target._dispatchingSearchTriggerEvent.indexOf(that.id)===-1){event.target._dispatchingSearchTriggerEvent=event.target._dispatchingSearchTriggerEvent+"_"+that.id;that.fire();};}else{that.fire();};});return this;};MAPION.net.HTTPService.prototype.triggerDomEvent=function(target,eventType){if(!target)return this;var orgHandler=typeof target[eventType]==="function"?target[eventType]:function(){};var that=this;target[eventType]=function(event){var ret=orgHandler.call(this,event);that.fire();return ret;};return this;};MAPION.net.HTTPService.prototype.concurrencyMultiple=function(){if(this.concurrency!==MAPION.net.HTTPService.CONCURRENCY_MULTIPLE){this.concurrency=MAPION.net.HTTPService.CONCURRENCY_MULTIPLE;this.dispatchEvent("concurrencyChanged");};return this;};MAPION.net.HTTPService.prototype.concurrencySingle=function(){if(this.concurrency!==MAPION.net.HTTPService.CONCURRENCY_SINGLE){this.concurrency=MAPION.net.HTTPService.CONCURRENCY_SINGLE;this.dispatchEvent("concurrencyChanged");};return this;};MAPION.net.HTTPService.prototype.concurrencyLast=function(){if(this.concurrency!==MAPION.net.HTTPService.CONCURRENCY_LAST){this.concurrency=MAPION.net.HTTPService.CONCURRENCY_LAST;this.dispatchEvent("concurrencyChanged");};return this;};MAPION.net.HTTPService.CONCURRENCY_MULTIPLE="multiple";MAPION.net.HTTPService.CONCURRENCY_SINGLE="single";MAPION.net.HTTPService.CONCURRENCY_LAST="last";MAPION.net.HTTPService.prototype.preprocessor=function(func){if(typeof func==="function")this.preoperations.push({type:"validation",func:func});return this;};MAPION.net.HTTPService.prototype.filter=function(func){if(typeof func==="function")this.operations.push({type:"filter",func:func});return this;};MAPION.net.HTTPService.prototype.catchError=function(func){if(typeof func==="function")this.operations.push({type:"catchError",func:func});return this;};MAPION.net.HTTPService.prototype.onerror=function(func){if(typeof func==="function")this.onerrorOperation=func;return this;};MAPION.net.HTTPService.prototype.output=function(target,prop){if(!target)throw new Error("Illegal argumented error in MAPION.net.HTTPService.prototype.output...");this.operations.push({type:"output",func:function(val){if(typeof target[prop]==="function")target[prop](val);else target[prop]=val;}});return this;};MAPION.net.HTTPService.prototype.setParameterForInvoker=function(key,value){this.parameterForInvoker[key]=value;return this;};MAPION.net.HTTPService.prototype.fire=function(){if(this.loading&&this.concurrency===MAPION.net.HTTPService.CONCURRENCY_SINGLE){return this;};for(var i=0,l=this.preoperations.length;i<l;i++){var ret=this.preoperations[i].func.apply(this.context);if(ret===false)return this;};this.parsedExpression=this.parsedExpression||this.parseExpression(this.urlExpression);var previousUrl=this.url;this.url=this.parsedExpression.join("");if(previousUrl!==this.url)this.dispatchEvent("urlChanged");switch(this.concurrency){case MAPION.net.HTTPService.CONCURRENCY_MULTIPLE:if(this.loading){this.queue.push(this.url);return this;};case MAPION.net.HTTPService.CONCURRENCY_SINGLE:case MAPION.net.HTTPService.CONCURRENCY_LAST:this.invoke(this.url);break;};return this;};MAPION.net.HTTPService.prototype.cancel=function(){if(this.invoker){while(this.queue.length)this.queue.shift();this.invoker.cancel();this.invoker.removeEventListener("onload",this.callback);this.invoker.removeEventListener("onerror",this.onerrorCallback);this.callback=null;this.onerrorCallback=null;this.invoker=null;var loading=this.loading;this.loading=false;if(loading)this.dispatchEvent("loadingChanged");};};MAPION.net.HTTPService.prototype.invoke=function(url){if(this.invoker){this.invoker.cancel();this.invoker.removeEventListener("onload",this.callback);this.invoker.removeEventListener("onerror",this.onerrorCallback);};var that=this;this.callback=function(event){that.onloadHandler(event.target.responseData[0]);};this.onerrorCallback=function(event){if(typeof that.onerrorOperation==="function")that.onerrorOperation();};this.invoker=new this.invokerClass(this.parameterForInvoker);this.invoker.addEventListener("onload",this.callback);this.invoker.addEventListener("onerror",this.onerrorCallback);var previousLoading=this.loading;this.loading=true;if(previousLoading!==this.loading)this.dispatchEvent("loadingChanged");this.invoker.get(url);};MAPION.net.HTTPService.prototype.onloadHandler=function(responseData){var rets=[responseData];var context=this.context;var ops=this.operations;var err=null;for(var i=0,l=ops.length;i<l;i++){var op=ops[i];try{if(err){if(op.type==="catchError"){op.func.apply(context,[err]);err=null;};}else{if(op.type==="filter"){var ret=op.func.apply(context,rets);rets.unshift(ret);}else if(op.type==="output"){op.func.apply(context,rets);};};}catch(e){err=e;};};if(this.queue.length>0){this.invoke(this.queue.shift());}else{this.invoker.cancel();this.invoker.removeEventListener("onload",this.callback);this.invoker.removeEventListener("onerror",this.onerrorCallback);this.callback=null;this.onerrorCallback=null;this.invoker=null;this.loading=false;this.dispatchEvent("loadingChanged");};};MAPION.net.HTTPService.prototype.parseExpression=function(source){var sm=MAPION.net.HTTPService.START_MARKER,em=MAPION.net.HTTPService.END_MARKER;var formNS=MAPION.net.HTTPService.FORMBINDING_NAMESPACE;var _d=window.document;var sourceGetRegExp=/([^\.]+)(.*)\.(.+)/g;var functionRegExp=/(\w+?)\((.+)\)/g;var that=this;that.context=that.context||window;function createObjectProperty(contextProp,path,targetProp,functionName,expOrigin){try{var evalTargetString;if(targetProp){evalTargetString="that.context."+contextProp+(path?"."+path:"");}else{evalTargetString="that.context";targetProp=contextProp;};var targetRef=eval(evalTargetString);var functionRef=null;if(functionName){var evalFunctionString="that.context."+functionName;functionRef=eval(evalFunctionString);};return{toString:function(){try{var value=targetRef[targetProp];if(functionRef)value=functionRef.call(that.context,value);return typeof value==="function"?value():value.toString();}catch(err){throw new Error("Illegal expression : "+expOrigin);};}};}catch(err){throw new Error("Illegal expression : "+expOrigin);};};function getValue(formName,inputName){var elms=_d[formName][inputName];var values=[];var elm;if(elms.nodeName){elm=elms;elms=[elm];}else{elm=elms[0];};switch(elm.nodeName.toLowerCase()){case"input":case"textarea":for(var i=0,l=elms.length;i<l;i++){switch(elms[i].type.toLowerCase()){case"radio":case"checkbox":if(elms[i].checked)values[values.length]=elms[i].value;break;default:values[values.length]=elms[i].value;break;};};break;case"select":for(var i=0,l=elms.length;i<l;i++){var options=elms[i].options;var selectedIndex=elms[i].selectedIndex;var selectedOption=options[selectedIndex];if(selectedOption)values[values.length]=selectedOption.value;};break;};return values.join(MAPION.net.HTTPService.FORMBINDING_JOINT_STRING);};function createFormValue(formName,inputName,functionName,expOrigin){try{var functionRef=null;if(functionName){var evalFunctionString="that.context."+functionName;functionRef=eval(evalFunctionString);};return{toString:function(){try{var value=getValue(formName,inputName);if(functionRef)value=functionRef.call(that.context,value);return value;}catch(err){throw new Error("Illegal expression : "+expOrigin);};}};}catch(err){throw new Error("Illegal expression : "+expOrigin);};};var s=0,e=0,i=0,a=[],l=source.length,sml=sm.length,eml=em.length;while(i<l){s=source.indexOf(sm,i);e=source.indexOf(em,i);if(s>-1&&e>s){a.push(source.substring(i,s));var exp=source.substring(s+sml,e);var expOrigin=sm+exp+em;var functionName=null;if(exp.match(functionRegExp)){functionName=RegExp.$1;exp=RegExp.$2;};if(exp.match(sourceGetRegExp)){var contextProp=RegExp.$1;var path=RegExp.$2;var targetProp=RegExp.$3;if(contextProp===formNS){a.push(createFormValue(path.substring(1),targetProp,functionName,expOrigin));}else{a.push(createObjectProperty(contextProp,path,targetProp,functionName,expOrigin));};}else{a.push(createObjectProperty(exp,null,null,functionName,null));};i=e+eml;}else{a.push(source.substring(i));i=l;};};return a;};MAPION.net.HTTPService.START_MARKER="{";MAPION.net.HTTPService.END_MARKER="}";MAPION.net.HTTPService.FORMBINDING_NAMESPACE="$F";MAPION.net.HTTPService.FORMBINDING_JOINT_STRING=",";MAPION.net.HTTPService.REV="$Rev: 1521 $";try{MAPION.Package.register("MAPION.net","HTTPService");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.CompositHTTPService=function(){MAPION.event.EventDispatcher.implement(this);this.loading=false;this.operations=[];this.onerrorOperation=null;this.services=[];var that=this,_w=window,tid=null;var args=arguments[0]instanceof Array?arguments[0]:arguments;for(var i=0,l=args.length;i<l;i++)if(args[i]instanceof MAPION.net.HTTPService)this.services.push(args[i]);var array=this.services;var response=[];function isLoading(){for(var i=0,l=array.length;i<l;i++)if(array[i].loading)return true;return false;};for(var i=0,l=array.length;i<l;i++){(function(service,key){service.filter(function(data){response[key]=data;if(tid)_w.clearTimeout(tid);tid=_w.setTimeout(function(){if(!isLoading())doOperations(response);},10);});})(array[i],i);response[i]=null;MAPION.event.Binding(array[i],"loading",{setLoading:function(value){if(value&&!that.loading){that.loading=value;that.dispatchEvent("loadingChanged");};}},"setLoading");};function doOperations(data){var rets=[data];var ops=that.operations;var err=null;for(var i=0,l=ops.length;i<l;i++){var op=ops[i];try{if(err){if(op.type==="catchError"){op.func.apply(that,[err]);err=null;};}else{if(op.type==="filter"){var ret=op.func.apply(that,rets);rets.unshift(ret);}else if(op.type==="output"){op.func.apply(that,rets);};};}catch(e){err=e;};};that.loading=false;that.dispatchEvent("loadingChanged");};};MAPION.net.CompositHTTPService.prototype.setURL=function(urlExpression){return this;};MAPION.net.CompositHTTPService.prototype.setContext=function(context){return this;};MAPION.net.CompositHTTPService.prototype.triggerEvent=function(target,eventType){if(!target||typeof target.addEventListener!=="function")return this;var that=this;target.addEventListener(eventType,function(event){that.fire();});return this;};MAPION.net.CompositHTTPService.prototype.triggerDomEvent=function(target,eventType){if(!target)return this;var orgHandler=typeof target[eventType]==="function"?target[eventType]:function(){};var that=this;target[eventType]=function(event){var ret=orgHandler.call(this,event);that.fire();return ret;};return this;};MAPION.net.CompositHTTPService.prototype.concurrencyMultiple=function(){for(var i=0,l=this.services.length;i<l;i++)this.services[i].concurrencyMultiple();return this;};MAPION.net.CompositHTTPService.prototype.concurrencySingle=function(){for(var i=0,l=this.services.length;i<l;i++)this.services[i].concurrencySingle();return this;};MAPION.net.CompositHTTPService.prototype.concurrencyLast=function(){for(var i=0,l=this.services.length;i<l;i++)this.services[i].concurrencyLast();return this;};MAPION.net.CompositHTTPService.prototype.filter=function(func){this.operations.push({type:"filter",func:func});return this;};MAPION.net.CompositHTTPService.prototype.catchError=function(func){this.operations.push({type:"catchError",func:func});return this;};MAPION.net.CompositHTTPService.prototype.onerror=function(func){return this;};MAPION.net.CompositHTTPService.prototype.output=function(target,prop){if(!target)throw new Error("Illegal argumented error in MAPION.net.CompositHTTPService.prototype.output...");this.operations.push({type:"output",func:function(val){if(typeof target[prop]==="function")target[prop](val);else target[prop]=val;}});return this;};MAPION.net.CompositHTTPService.prototype.setParameterForInvoker=function(key,value){return this;};MAPION.net.CompositHTTPService.prototype.fire=function(){for(var i=0,l=this.services.length;i<l;i++)this.services[i].fire();return this;};MAPION.net.CompositHTTPService.prototype.cancel=function(){for(var i=0,l=this.services.length;i<l;i++)this.services[i].cancel();return this;};MAPION.net.CompositHTTPService.REV="$Rev: 1521 $";try{MAPION.Package.register("MAPION.net","CompositHTTPService");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.Domain=function(currentDomain,secure){var that={};var _currentDomain=currentDomain||location.host;_currentDomain=_currentDomain.toString();var _isSecure=(function isSecureFunc(){if(typeof secure==="boolean"){return secure;}else if(typeof secure==="string"){return secure.indexOf("https:")===0;}else{return location.protocol.toString().indexOf("https:")===0;};})();var _hash=(function getHash(){var releaseFlg=false;var stagingFlg=false;releaseFlg=!!MAPION.net.Domain.regardAsReleaseDomainList[_currentDomain];if(!releaseFlg){for(var i=0,l=MAPION.net.Domain.regardAsReleaseDomainRegExp.length;i<l;i++){releaseFlg=!!_currentDomain.match(MAPION.net.Domain.regardAsReleaseDomainRegExp[i]);if(releaseFlg)i=l;};if(!releaseFlg){stagingFlg=!!MAPION.net.Domain.regardAsStagingDomainList[_currentDomain];if(!stagingFlg){for(var i=0,l=MAPION.net.Domain.regardAsStagingDomainRegExp.length;i<l;i++){stagingFlg=!!_currentDomain.match(MAPION.net.Domain.regardAsStagingDomainRegExp[i]);if(stagingFlg)i=l;};};};};if(releaseFlg){return MAPION.net.Domain.releaseDomainHash;}else if(stagingFlg){return MAPION.net.Domain.stagingDomainHash;}else{if(MAPION.net.Domain.priorityRelease>MAPION.net.Domain.priorityStaging){return MAPION.net.Domain.releaseDomainHash;}else{return MAPION.net.Domain.stagingDomainHash;};};})();function getDomain(key){return _hash[key]?_hash[key]:"";};that.getDomain=getDomain;function getKeys(){var a=[];for(var i in _hash)a.push(i);return a;};that.getKeys=getKeys;function getDomainWithProtocol(key){var domain=that.getDomain(key);var protocol=(_isSecure?"https://":"http://");return domain?(protocol+domain):"";};that.getDomainWithProtocol=getDomainWithProtocol;function getCurrentDomain(){return _currentDomain;};that.getCurrentDomain=getCurrentDomain;function isSecure(){return _isSecure;};that.isSecure=isSecure;return that;};MAPION.net.Domain.priorityRelease=100;MAPION.net.Domain.priorityStaging=0;MAPION.net.Domain.REV="$Rev: 1166 $";MAPION.net.Domain.releaseDomainHash={};MAPION.net.Domain.stagingDomainHash={};MAPION.net.Domain.putDomain=function(key,releaseDomain,stagingDomain){MAPION.net.Domain.releaseDomainHash[key]=releaseDomain;MAPION.net.Domain.stagingDomainHash[key]=stagingDomain;};MAPION.net.Domain.regardAsReleaseDomainList={};MAPION.net.Domain.regardAsReleaseDomainRegExp=[];MAPION.net.Domain.addReleaseDomain=function(domain){if(domain instanceof RegExp){MAPION.net.Domain.regardAsReleaseDomainRegExp.push(domain);}else{MAPION.net.Domain.regardAsReleaseDomainList[domain]=domain;};};MAPION.net.Domain.regardAsStagingDomainList={};MAPION.net.Domain.regardAsStagingDomainRegExp=[];MAPION.net.Domain.addStagingDomain=function(domain){if(domain instanceof RegExp){MAPION.net.Domain.regardAsStagingDomainRegExp.push(domain);}else{MAPION.net.Domain.regardAsStagingDomainList[domain]=domain;};};MAPION.net.Domain.putDomain("v3","www.mapion.co.jp","v3stg.mapion.co.jp");MAPION.net.Domain.putDomain("vip","vip.mapion.co.jp","v3stg.mapion.co.jp");MAPION.net.Domain.putDomain("lbs","lbs.mapion.co.jp","lbs-stg.mapion.co.jp");MAPION.net.Domain.putDomain("bap","bap.mapion.co.jp","lbs-stg.mapion.co.jp");MAPION.net.Domain.putDomain("map","bm01.mapion.co.jp","map-stg.mapion.co.jp");MAPION.net.Domain.putDomain("bm","bm01.mapion.co.jp","map-stg.mapion.co.jp");MAPION.net.Domain.putDomain("omap","cm01.mapion.co.jp","map-stg.mapion.co.jp");MAPION.net.Domain.putDomain("cm","cm01.mapion.co.jp","map-stg.mapion.co.jp");MAPION.net.Domain.putDomain("sasp","sasp.mapion.co.jp","sasp-stg.mapion.co.jp");MAPION.net.Domain.putDomain("searchapi","searchapi.mapion.co.jp","searchapi-stg.mapion.co.jp");MAPION.net.Domain.addReleaseDomain("www.mapion.co.jp");MAPION.net.Domain.addReleaseDomain("vip.mapion.co.jp");MAPION.net.Domain.addReleaseDomain("lbs.mapion.co.jp");MAPION.net.Domain.addReleaseDomain("bap.mapion.co.jp");MAPION.net.Domain.addReleaseDomain("sasp.mapion.co.jp");MAPION.net.Domain.addStagingDomain("v3stg.mapion.co.jp");MAPION.net.Domain.addStagingDomain("lbs-stg.mapion.co.jp");MAPION.net.Domain.addStagingDomain("sasp-stg.mapion.co.jp");MAPION.net.Domain.addStagingDomain(/.+?\.office\.mapion\.co\.jp/);MAPION.net.Domain.addStagingDomain(/.+?\.sys\.mapion\.co\.jp/);MAPION.net.Domain.addStagingDomain(/.+?\.dev\.mapion\.co\.jp/);MAPION.net.Domain.addStagingDomain(/.+?\.vdev\.mapion\.co\.jp/);try{MAPION.Package.register("MAPION.net","Domain");}catch(e){};window.MAPION=window.MAPION||{};MAPION.net=MAPION.net||{};MAPION.net.ParallelAjax=function(param){MAPION.event.EventDispatcher.implement(this);this.param=param;this.ajaxs=[];this.counter=0;this._errorUrlList=[];this._xmlData={};this.hit=0;this.responseData={};};MAPION.net.ParallelAjax.REV="$Rev: 1894 $";MAPION.net.ParallelAjax.prototype.get=function(key,fullUrl){this.counter++;var ajax=new MAPION.net.Ajax(this.param);this.ajaxs.push(ajax);var that=this;ajax.addEventListener("onload",function(event){window.setTimeout(function(){that.responseData[key]=event.target.responseText;that._xmlData[key]=event.target.responseXML;that.counter--;that.hit++;if(that.counter===0){that.responseData._errorUrlList=that._errorUrlList;that.responseData._xmlData=that._xmlData;that.dispatchEvent(new MAPION.event.EventObject("onload",that.responseData));};},10);});ajax.addEventListener("onerror",function(event){window.setTimeout(function(){that._errorUrlList.push(event.target.fullUrl);that.counter--;that.dispatchEvent(new MAPION.event.EventObject("onerror",that));if(that.counter===0&&that.hit>0){that.responseData._errorUrlList=that._errorUrlList;that.responseData._xmlData=that._xmlData;that.dispatchEvent(new MAPION.event.EventObject("onload",that.responseData));};},10);});ajax.get(fullUrl);};MAPION.net.ParallelAjax.prototype.getForHash=function(hash){for(var key in hash){this.get(key,hash[key]);};};MAPION.net.ParallelAjax.prototype.cancel=function(){for(var i=0,l=this.ajaxs.length;i<l;i++)this.ajaxs[i].cancel();this.ajaxs=[];this.counter=0;this.hit=0;this.responseData={};this._errorUrlList=[];this._xmlData={};};try{MAPION.Package.register("MAPION.net","ParallelAjax");}catch(e){};window.MAPION=window.MAPION||{};MAPION.tmpl=MAPION.tmpl||{};MAPION.tmpl.Template=function(tagMap,parameters){this.idTagName=MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_START_MARKER+MAPION.tmpl.Template.DEFAULT_ID_TAG_VALUE+MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_END_MARKER;this.idTagValue=MAPION.tmpl.Template.DEFAULT_ID_TAG_VALUE;this.sfxAttributeName=MAPION.tmpl.Template.DEFAULT_SFX_ATTRIBUTE_NAME;this.tagDirectiveStartMarker=MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_START_MARKER;this.tagDirectiveEndMarker=MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_END_MARKER;this.scriptDirectiveStartMarker=MAPION.tmpl.Template.DEFAULT_SCRIPT_DIRECTIVE_START_MARKER;this.scriptDirectiveEndMarker=MAPION.tmpl.Template.DEFAULT_SCRIPT_DIRECTIVE_END_MARKER;this.variableDirectiveStartMarker=MAPION.tmpl.Template.DEFAULT_VARIABLE_DIRECTIVE_START_MARKER;this.variableDirectiveEndMarker=MAPION.tmpl.Template.DEFAULT_VARIABLE_DIRECTIVE_END_MARKER;this.functionArgumentName=MAPION.tmpl.Template.DEFAULT_FUNCTION_ARGUMENT_NAME;this.returnVarString=MAPION.tmpl.Template.DEFAULT_RETURN_VAR_STRING;this.banpei=this.tagDirectiveStartMarker+this.tagDirectiveStartMarker+this.tagDirectiveStartMarker+this.tagDirectiveStartMarker;this.tagMap=tagMap||null;this.parameters=parameters;};MAPION.tmpl.Template.REV="$Rev: 867 $";MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_START_MARKER="@";MAPION.tmpl.Template.DEFAULT_TAG_DIRECTIVE_END_MARKER="@";MAPION.tmpl.Template.DEFAULT_ID_TAG_VALUE="id";MAPION.tmpl.Template.DEFAULT_SFX_ATTRIBUTE_NAME="sfx";MAPION.tmpl.Template.DEFAULT_SCRIPT_DIRECTIVE_START_MARKER="<!--$";MAPION.tmpl.Template.DEFAULT_SCRIPT_DIRECTIVE_END_MARKER="$-->";MAPION.tmpl.Template.DEFAULT_VARIABLE_DIRECTIVE_START_MARKER="%=";MAPION.tmpl.Template.DEFAULT_VARIABLE_DIRECTIVE_END_MARKER="%";MAPION.tmpl.Template.DEFAULT_FUNCTION_ARGUMENT_NAME="data";MAPION.tmpl.Template.DEFAULT_RETURN_VAR_STRING="___S___";MAPION.tmpl.Template.randamString=function(){return new Date().getTime()+"_"+parseInt(Math.random()*99999999);};MAPION.tmpl.Template.prototype.compile=function(source,parameters){if(typeof(source)!=="string")throw new Error("MAPION.tmpl.Template::compile() Illegal argumented error...");parameters=parameters?parameters:this.parameters;if(!parameters)parameters={};var addSfx=parameters.addSfx;if(typeof(addSfx)==="undefined")addSfx=false;var tagMap=this.tagMap||this.getTagMap(source);tagMap[this.idTagName]=tagMap[this.idTagName]||this.idTagValue;source=this.banpei+source+this.banpei;var target="function_"+MAPION.tmpl.Template.randamString();var s1=addSfx?this.addSfxTag(source):source;var s2=this.splitElement(s1,tagMap);var s3=this.buildFunctionString(s2);var s4=target+"="+s3;eval("var "+s4);return eval(target);};MAPION.tmpl.Template.prototype.getTagMap=function(source){var s=0,e=0,tagMap={},tdsm=this.tagDirectiveStartMarker,tdem=this.tagDirectiveEndMarker,lp;var tdsml=tdsm.length,tdeml=tdem.length;while(true){s=source.indexOf(tdsm,s);e=source.indexOf(tdem,s+tdsml);if(s>-1&&e>-1){if(tdem===")"){lp=source.indexOf("(",s+tdsml);while(lp!==-1&&e!==-1&&lp<e){e=source.indexOf(tdem,e+1);lp=source.indexOf("(",lp+1);};if(e===-1)throw new Error("Illega format... near:"+source.substring(s,s+20)+"...");};var value=source.substring(s+tdsml,e);tagMap[tdsm+value+tdem]=value;s=e+tdeml;}else{return tagMap;};};};MAPION.tmpl.Template.prototype.addSfxTag=function(source){var r=null;r=source.match(/(?:<[^\/|!][^>]*[\/]?[^-]>|<[^\/|!|>|-]{1}>)/g);if(r){for(var i=0,l=r.length;i<l;i++){var orgStr=r[i];var idTag=this.idTagName;if(orgStr.match(/\/>$/g)){var repStr=orgStr.replace(/\/>/g," "+this.sfxAttributeName+"=\""+idTag+"\" />")}else{var repStr=orgStr.replace(/>/g," "+this.sfxAttributeName+"=\""+idTag+"\" >")};source=source.replace(orgStr,repStr);};};return source;};MAPION.tmpl.Template.prototype.splitElement=function(source,tagMap){var i,l,i2,l2,ret,a,a1=[source],a2=[],s,si,ei,ps,s2,si2,ei2,ps2,vdsm=this.variableDirectiveStartMarker,vdem=this.variableDirectiveEndMarker,sdsm=this.scriptDirectiveStartMarker,sdem=this.scriptDirectiveEndMarker;var vdsml=vdsm.length,vdeml=vdem.length,sdsml=sdsm.length,sdeml=sdem.length;for(var tag in tagMap){ret=[];for(i=0,l=a1.length;i<l;i++){s=a1[i];if(s.t){ret.push(s);}else{a=s.split(tag);for(i2=0,l2=a.length;i2<l2;i2++){ret[ret.length]=a[i2];if(typeof(a[i2+1])!=="undefined"){var str=tagMap[tag].toString();var r1=str.match(/[^()\s]+/g);if(r1.length===2){ret[ret.length]={t:"ft",sf:r1[0],st:r1[1],tag:tag};}else{var r2=str.match(/[^\|\s]+/g);if(r2.length===2){ret[ret.length]={t:"ft",sf:r2[1],st:r2[0],tag:tag};}else{ret[ret.length]={t:"t",s:str,tag:tag};};};};};};};a1=ret;};for(i=0,l=a1.length;i<l;i++){s=a1[i];if(s.t){a2[a2.length]=s;}else{si=0,ei=0,ps=0;while(si>-1){ps=si;si=s.indexOf(vdsm,si);ei=s.indexOf(vdem,si+vdeml);if(si>-1&&ei>-1){s2=s.substring(ps,si);si2=0,ei2=0,ps2=0;while(si2>-1){ps2=si2;si2=s2.indexOf(sdsm,si2);ei2=s2.indexOf(sdem,si2+sdeml);if(si2>-1&&ei2>-1){a2[a2.length]=s2.substring(ps2,si2);a2[a2.length]={t:"s",s:s2.substring(si2+sdsml,ei2)};si2=ei2+sdeml;}else{a2[a2.length]=s2.substring(ps2);};};a2[a2.length]={t:"v",s:s.substring(si+vdsml,ei)};si=ei+vdeml;}else{s2=s.substring(ps);si2=0,ei2=0,ps2=0;while(si2>-1){ps2=si2;si2=s2.indexOf(sdsm,si2);ei2=s2.indexOf(sdem,si2+sdeml);if(si2>-1&&ei2>-1){a2[a2.length]=s2.substring(ps2,si2);a2[a2.length]={t:"s",s:s2.substring(si2+sdsml,ei2)};si2=ei2+sdeml;}else{a2[a2.length]=s2.substring(ps2);};};};};};};return a2;};MAPION.tmpl.Template.prototype.buildFunctionString=function(elements){var arg=this.functionArgumentName;var sb=this.returnVarString;var s=[];var q=/'/g,q2=/"/g;var regR=new RegExp("\r","g"),regN=new RegExp("\n","g");s[s.length]="function("+arg+"){var "+sb+"=[];";for(var i=0,l=elements.length;i<l;i++){var element=elements[i];if(element===this.banpei)continue;if(element.t==="s"){s[s.length]=(element.s);}else if(element.t==="v"){s[s.length]=(sb+".push("+element.s+");");}else if(element.t==="t"){s[s.length]=("try{if(typeof "+arg+"."+element.s+"==='function'){"+sb+".push("+arg+"."+element.s+"());}else{"+sb+".push("+arg+"."+element.s+");};}catch(error){"+sb+".push('"+element.tag+"')};");}else if(element.t==="ft"){s[s.length]=("try{"+sb+".push("+arg+"."+element.sf+"("+arg+"."+element.st+"));}catch(error){"+sb+".push('"+element.tag+"')};");}else{while(element.indexOf(this.banpei)>-1)element=element.replace(this.banpei,"");element=element.replace(q,"\\'").replace(q2,'\\"').replace(regR,"\\r").replace(regN,"\\n");s[s.length]=sb+".push('"+element+"');";};};s[s.length]="return "+sb+".join('');}";return s.join("");};MAPION.tmpl.Template.jsmf=(function(){var t=new MAPION.tmpl.Template();t.tagDirectiveStartMarker="$(";t.tagDirectiveEndMarker=")";t.scriptDirectiveStartMarker="#$";t.scriptDirectiveEndMarker="$#";t.variableDirectiveStartMarker="#=";t.variableDirectiveEndMarker="#";return t;})();try{MAPION.Package.register("MAPION.tmpl","Template");}catch(e){};window.MAPION=window.MAPION||{};MAPION.tmpl=MAPION.tmpl||{};MAPION.tmpl.TemplateHelper=function(template){MAPION.event.EventDispatcher.implement(this);this.template=template||new MAPION.tmpl.Template();};MAPION.tmpl.TemplateHelper.REV="$Rev: 1887 $";MAPION.tmpl.TemplateHelper.prototype.compileWithDom=function(elementId,contextDocument){var contextDocument=contextDocument||window.document;var element=contextDocument.getElementById(elementId);var content=element.value||element.innerHTML;content=content.replace(/&lt;/g,"<").replace(/&gt;/g,">");return this.template.compile(content);};MAPION.tmpl.TemplateHelper.prototype.compileWithURL=function(url){var that=this;var ajax=new MAPION.net.Ajax();ajax.addEventListener("onload",function(){var eventObj=new MAPION.event.EventObject("onload");eventObj.templateFunction=that.template.compile(ajax.responseText);eventObj.target=that;that.dispatchEvent(eventObj);});ajax.addEventListener("onerror",function(){that.dispatchEvent("onerror");});ajax.get(url);};try{MAPION.Package.register("MAPION.tmpl","TemplateHelper");}catch(e){};window.MAPION=window.MAPION||{};MAPION.debug=MAPION.debug||{};MAPION.debug.Tools=function(){MAPION.event.EventDispatcher.implement(this);var self=this;this.processTime=0;this.setProcessTime=function(time){self.processTime=time;self.dispatchEvent("processTimeChanged");};this.toString=function(){return"processTime="+this.processTime;};};MAPION.debug.Tools.REV="$Rev: 609 $";MAPION.debug.Tools.prototype.measureProcessTime=function(targetObj,targetFunc){targetObj=targetObj||window;var start=new Date().getTime();for(var i=2,l=arguments.length,args=[];i<l;i++)args.push(arguments[i]);var ret=targetFunc.apply(targetObj,args);var end=new Date().getTime();this.setProcessTime(end-start);return ret;};try{MAPION.Package.register("MAPION.debug","Tools");}catch(e){};
