/* www.dalion.ua, build 1150 */ function JsHttpRequest(){var t=this;t.onreadystatechange=null;t.readyState=0;t.responseText=null;t.responseXML=null;t.status=200;t.statusText="OK";t.responseJS=null;t.caching=false;t.loader=null;t.session_name="PHPSESSID";t._ldObj=null;t._reqHeaders=[];t._openArgs=null;t._errors={inv_form_el:"Invalid FORM element detected: name=%, tag=%",must_be_single_el:"If used, <form> must be a single HTML element in the list.",js_invalid:"JavaScript code generated by backend is invalid!\n%",url_too_long:"Cannot use so long query with GET request (URL is larger than % bytes)",unk_loader:"Unknown loader: %",no_loaders:"No loaders registered at all, please check JsHttpRequest.LOADERS array",no_loader_matched:"Cannot find a loader which may process the request. Notices are:\n%"};t.abort=function(){with(this){if(_ldObj&&_ldObj.abort){_ldObj.abort();}_cleanup();if(readyState==0){return;}if(readyState==1&&!_ldObj){readyState=0;return;}_changeReadyState(4,true);}};t.open=function(_2,_3,_4,_5,_6){with(this){if(_3.match(/^((\w+)\.)?(GET|POST)\s+(.*)/i)){this.loader=RegExp.$2?RegExp.$2:null;_2=RegExp.$3;_3=RegExp.$4;}try{if(document.location.search.match(new RegExp("[&?]"+session_name+"=([^&?]*)"))||document.cookie.match(new RegExp("(?:;|^)\\s*"+session_name+"=([^;]*)"))){_3+=(_3.indexOf("?")>=0?"&":"?")+session_name+"="+this.escape(RegExp.$1);}}catch(e){}_openArgs={method:(_2||"").toUpperCase(),url:_3,asyncFlag:_4,username:_5!=null?_5:"",password:_6!=null?_6:""};_ldObj=null;_changeReadyState(1,true);return true;}};t.send=function(_7){if(!this.readyState){return;}this._changeReadyState(1,true);this._ldObj=null;var _8=[];var _9=[];if(!this._hash2query(_7,null,_8,_9)){return;}var _a=null;if(this.caching&&!_9.length){_a=this._openArgs.username+":"+this._openArgs.password+"@"+this._openArgs.url+"|"+_8+"#"+this._openArgs.method;var _b=JsHttpRequest.CACHE[_a];if(_b){this._dataReady(_b[0],_b[1]);return false;}}var _c=(this.loader||"").toLowerCase();if(_c&&!JsHttpRequest.LOADERS[_c]){return this._error("unk_loader",_c);}var _d=[];var _e=JsHttpRequest.LOADERS;for(var _f in _e){var ldr=_e[_f].loader;if(!ldr){continue;}if(_c&&_f!=_c){continue;}var _11=new ldr(this);JsHttpRequest.extend(_11,this._openArgs);JsHttpRequest.extend(_11,{queryText:_8.join("&"),queryElem:_9,id:(new Date().getTime())+""+JsHttpRequest.COUNT++,hash:_a,span:null});var _12=_11.load();if(!_12){this._ldObj=_11;JsHttpRequest.PENDING[_11.id]=this;return true;}if(!_c){_d[_d.length]="- "+_f.toUpperCase()+": "+this._l(_12);}else{return this._error(_12);}}return _f?this._error("no_loader_matched",_d.join("\n")):this._error("no_loaders");};t.getAllResponseHeaders=function(){with(this){return _ldObj&&_ldObj.getAllResponseHeaders?_ldObj.getAllResponseHeaders():[];}};t.getResponseHeader=function(_13){with(this){return _ldObj&&_ldObj.getResponseHeader?_ldObj.getResponseHeader(_13):null;}};t.setRequestHeader=function(_14,_15){with(this){_reqHeaders[_reqHeaders.length]=[_14,_15];}};t._dataReady=function(_16,js){with(this){if(caching&&_ldObj){JsHttpRequest.CACHE[_ldObj.hash]=[_16,js];}responseText=responseXML=_16;responseJS=js;if(js!==null){status=200;statusText="OK";}else{status=500;statusText="Internal Server Error";}_changeReadyState(2);_changeReadyState(3);_changeReadyState(4);_cleanup();}};t._l=function(_18){var i=0,p=0,msg=this._errors[_18[0]];while((p=msg.indexOf("%",p))>=0){var a=_18[++i]+"";msg=msg.substring(0,p)+a+msg.substring(p+1,msg.length);p+=1+a.length;}return msg;};t._error=function(msg){msg=this._l(typeof(msg)=="string"?arguments:msg);msg="JsHttpRequest: "+msg;if(!window.Error){throw msg;}else{if((new Error(1,"test")).description=="test"){throw new Error(1,msg);}else{throw new Error(msg);}}};t._hash2query=function(_1e,_1f,_20,_21){if(_1f==null){_1f="";}if((""+typeof(_1e)).toLowerCase()=="object"){var _22=false;if(_1e&&_1e.parentNode&&_1e.parentNode.appendChild&&_1e.tagName&&_1e.tagName.toUpperCase()=="FORM"){_1e={form:_1e};}for(var k in _1e){var v=_1e[k];if(v instanceof Function){continue;}var _25=_1f?_1f+"["+this.escape(k)+"]":this.escape(k);var _26=v&&v.parentNode&&v.parentNode.appendChild&&v.tagName;if(_26){var tn=v.tagName.toUpperCase();if(tn=="FORM"){_22=true;}else{if(tn=="INPUT"||tn=="TEXTAREA"||tn=="SELECT"){}else{return this._error("inv_form_el",(v.name||""),v.tagName);}}_21[_21.length]={name:_25,e:v};}else{if(v instanceof Object){this._hash2query(v,_25,_20,_21);}else{if(v===null){continue;}if(v===true){v=1;}if(v===false){v="";}_20[_20.length]=_25+"="+this.escape(""+v);}}if(_22&&_21.length>1){return this._error("must_be_single_el");}}}else{_20[_20.length]=_1e;}return true;};t._cleanup=function(){var _28=this._ldObj;if(!_28){return;}JsHttpRequest.PENDING[_28.id]=false;var _29=_28.span;if(!_29){return;}_28.span=null;var _2a=function(){_29.parentNode.removeChild(_29);};JsHttpRequest.setTimeout(_2a,50);};t._changeReadyState=function(s,_2c){with(this){if(_2c){status=statusText=responseJS=null;responseText="";}readyState=s;if(onreadystatechange){onreadystatechange();}}};t.escape=function(s){return escape(s).replace(new RegExp("\\+","g"),"%2B");};}JsHttpRequest.COUNT=0;JsHttpRequest.MAX_URL_LEN=2000;JsHttpRequest.CACHE={};JsHttpRequest.PENDING={};JsHttpRequest.LOADERS={};JsHttpRequest._dummy=function(){};JsHttpRequest.TIMEOUTS={s:window.setTimeout,c:window.clearTimeout};JsHttpRequest.setTimeout=function(b,c){window.JsHttpRequest_tmp=JsHttpRequest.TIMEOUTS.s;if(typeof(b)=="string"){d=window.JsHttpRequest_tmp(b,c);}else{var d=null;var a=function(){b();delete JsHttpRequest.TIMEOUTS[d];
};d=window.JsHttpRequest_tmp(a,c);JsHttpRequest.TIMEOUTS[d]=a;}window.JsHttpRequest_tmp=null;return d;};JsHttpRequest.clearTimeout=function(b){window.JsHttpRequest_tmp=JsHttpRequest.TIMEOUTS.c;delete JsHttpRequest.TIMEOUTS[b];var a=window.JsHttpRequest_tmp(b);window.JsHttpRequest_tmp=null;return a;};JsHttpRequest.query=function(a,f,d,c){var b=new this();b.caching=!c;b.onreadystatechange=function(){if(b.readyState==4){d(b.responseJS,b.responseText);}};b.open(null,a,true);b.send(f);};JsHttpRequest.dataReady=function(b){var a=this.PENDING[b.id];delete this.PENDING[b.id];if(a){a._dataReady(b.text,b.js);}else{if(a!==false){throw"dataReady(): unknown pending id: "+b.id;}}};JsHttpRequest.extend=function(b,c){for(var a in c){b[a]=c[a];}};JsHttpRequest.LOADERS.xml={loader:function(req){JsHttpRequest.extend(req._errors,{xml_no:"Cannot use XMLHttpRequest or ActiveX loader: not supported",xml_no_diffdom:"Cannot use XMLHttpRequest to load data from different domain %",xml_no_headers:"Cannot use XMLHttpRequest loader or ActiveX loader, POST method: headers setting is not supported, needed to work with encodings correctly",xml_no_form_upl:"Cannot use XMLHttpRequest loader: direct form elements using and uploading are not implemented"});this.load=function(){if(this.queryElem.length){return["xml_no_form_upl"];}if(this.url.match(new RegExp("^([a-z]+://[^\\/]+)(.*)","i"))){if(RegExp.$1.toLowerCase()!=document.location.protocol+"//"+document.location.hostname.toLowerCase()){return["xml_no_diffdom",RegExp.$1];}}var xr=null;if(window.XMLHttpRequest){try{xr=new XMLHttpRequest();}catch(e){}}else{if(window.ActiveXObject){try{xr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}if(!xr){try{xr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}}}}if(!xr){return["xml_no"];}var _40=window.ActiveXObject||xr.setRequestHeader;if(!this.method){this.method=_40&&this.queryText.length?"POST":"GET";}if(this.method=="GET"){if(this.queryText){this.url+=(this.url.indexOf("?")>=0?"&":"?")+this.queryText;}this.queryText="";if(this.url.length>JsHttpRequest.MAX_URL_LEN){return["url_too_long",JsHttpRequest.MAX_URL_LEN];}}else{if(this.method=="POST"&&!_40){return["xml_no_headers"];}}this.url+=(this.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+(req.caching?"0":this.id)+"-xml";var id=this.id;xr.onreadystatechange=function(){if(xr.readyState!=4){return;}xr.onreadystatechange=JsHttpRequest._dummy;req.status=null;try{req.status=xr.status;req.responseText=xr.responseText;}catch(e){}if(!req.status){return;}try{eval("JsHttpRequest._tmp = function(id) { var d = "+req.responseText+"; d.id = id; JsHttpRequest.dataReady(d); }");}catch(e){return req._error("js_invalid",req.responseText);}JsHttpRequest._tmp(id);JsHttpRequest._tmp=null;};xr.open(this.method,this.url,true,this.username,this.password);if(_40){for(var i=0;i<req._reqHeaders.length;i++){xr.setRequestHeader(req._reqHeaders[i][0],req._reqHeaders[i][1]);}xr.setRequestHeader("Content-Type","application/octet-stream");}xr.send(this.queryText);this.span=null;this.xr=xr;return null;};this.getAllResponseHeaders=function(){return this.xr.getAllResponseHeaders();};this.getResponseHeader=function(_43){return this.xr.getResponseHeader(_43);};this.abort=function(){this.xr.abort();this.xr=null;};}};JsHttpRequest.LOADERS.script={loader:function(a){JsHttpRequest.extend(a._errors,{script_only_get:"Cannot use SCRIPT loader: it supports only GET method",script_no_form:"Cannot use SCRIPT loader: direct form elements using and uploading are not implemented"});this.load=function(){if(this.queryText){this.url+=(this.url.indexOf("?")>=0?"&":"?")+this.queryText;}this.url+=(this.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+this.id+"-"+"script";this.queryText="";if(!this.method){this.method="GET";}if(this.method!=="GET"){return["script_only_get"];}if(this.queryElem.length){return["script_no_form"];}if(this.url.length>JsHttpRequest.MAX_URL_LEN){return["url_too_long",JsHttpRequest.MAX_URL_LEN];}var g=this,j=document,f=null,c=j.body;if(!window.opera){this.span=f=j.createElement("SCRIPT");var h=function(){f.language="JavaScript";if(f.setAttribute){f.setAttribute("src",g.url);}else{f.src=g.url;}c.insertBefore(f,c.lastChild);};}else{this.span=f=j.createElement("SPAN");f.style.display="none";c.insertBefore(f,c.lastChild);f.innerHTML="Workaround for IE.<s"+"cript></"+"script>";var h=function(){f=f.getElementsByTagName("SCRIPT")[0];f.language="JavaScript";if(f.setAttribute){f.setAttribute("src",g.url);}else{f.src=g.url;}};}JsHttpRequest.setTimeout(h,10);return null;};}};JsHttpRequest.LOADERS.form={loader:function(a){JsHttpRequest.extend(a._errors,{form_el_not_belong:'Element "%" does not belong to any form!',form_el_belong_diff:'Element "%" belongs to a different form. All elements must belong to the same form!',form_el_inv_enctype:'Attribute "enctype" of the form must be "%" (for IE), "%" given.'});this.load=function(){var g=this;if(!g.method){g.method="POST";}g.url+=(g.url.indexOf("?")>=0?"&":"?")+"JsHttpRequest="+g.id+"-"+"form";if(g.method=="GET"){if(g.queryText){g.url+=(g.url.indexOf("?")>=0?"&":"?")+g.queryText;}if(g.url.length>JsHttpRequest.MAX_URL_LEN){return["url_too_long",JsHttpRequest.MAX_URL_LEN];}var f=g.url.split("?",2);g.url=f[0];g.queryText=f[1]||"";}var j=null;var h=false;if(g.queryElem.length){if(g.queryElem[0].e.tagName.toUpperCase()=="FORM"){j=g.queryElem[0].e;h=true;g.queryElem=[];}else{j=g.queryElem[0].e.form;for(var k=0;k<g.queryElem.length;k++){var l=g.queryElem[k].e;if(!l.form){return["form_el_not_belong",l.name];
}if(l.form!=j){return["form_el_belong_diff",l.name];}}}if(g.method=="POST"){var c="multipart/form-data";var b=(j.attributes.encType&&j.attributes.encType.nodeValue)||(j.attributes.enctype&&j.attributes.enctype.value)||j.enctype;if(b!=c){return["form_el_inv_enctype",c,b];}}}var m=j&&(j.ownerDocument||j.document)||document;var r="jshr_i_"+g.id;var t=g.span=m.createElement("DIV");t.style.position="absolute";t.style.display="none";t.style.visibility="hidden";t.innerHTML=(j?"":"<form"+(g.method=="POST"?' enctype="multipart/form-data" method="post"':"")+"></form>")+'<iframe name="'+r+'" id="'+r+'" style="width:0px; height:0px; overflow:hidden; border:none"></iframe>';if(!j){j=g.span.firstChild;}m.body.insertBefore(t,m.body.lastChild);var q=function(x,y){var d=[];var u=x;if(x.mergeAttributes){var u=m.createElement("form");u.mergeAttributes(x,false);}for(var w=0;w<y.length;w++){var s=y[w][0],p=y[w][1];d[d.length]=[s,u.getAttribute(s)];u.setAttribute(s,p);}if(x.mergeAttributes){x.mergeAttributes(u,false);}return d;};var o=function(){top.JsHttpRequestGlobal=JsHttpRequest;var v=[];if(!h){for(var p=0,x=j.elements.length;p<x;p++){v[p]=j.elements[p].name;j.elements[p].name="";}}var w=g.queryText.split("&");for(var p=w.length-1;p>=0;p--){var s=w[p].split("=",2);var u=m.createElement("INPUT");u.type="hidden";u.name=unescape(s[0]);u.value=s[1]!=null?unescape(s[1]):"";j.appendChild(u);}for(var p=0;p<g.queryElem.length;p++){g.queryElem[p].e.name=g.queryElem[p].name;}var d=q(j,[["action",g.url],["method",g.method],["onsubmit",null],["target",r]]);j.submit();q(j,d);for(var p=0;p<w.length;p++){j.lastChild.parentNode.removeChild(j.lastChild);}if(!h){for(var p=0,x=j.elements.length;p<x;p++){j.elements[p].name=v[p];}}};JsHttpRequest.setTimeout(o,100);return null;};}};function Answer(b,a){this.id=b;this.text=a;this.getID=function(){return this.id;};this.getQuestionID=function(){var c=this.id.split("-");return c[0];};this.getText=function(){return this.text;};this.stateToArray=function(){return{id:this.id,text:this.text};};}Answer.stateFromArray=function(a){return new Answer(a["id"],a["text"]);};Answer.stateFromArraySerialize=function(a){var b=unserialize(a);return Answer.stateFromArray(b);};function Cache(){}Cache.valueList=new Array();Cache.memorize=function(a,b){Cache.valueList[a]=b;};Cache.remember=function(a){if("undefined"==typeof Cache.valueList[a]){return null;}return Cache.valueList[a];};Cache.forget=function(a){Cache.valueList[a]=null;};function ChoiceN(b,a){this.n=b;this.entityList=a;this.currentPosition=0;this.MAX_QTY_ELEMENT=5000;this.MAX_END_DISTANCE_FOR_REQUIRE_NEW_ENTITY_LIST=Math.round(this.n*1.5);this.QTY_REQUIRE_NEW_ENTITY=b*5*2;this.getCurrentPosition=function(){return this.currentPosition;};this.getEntityList=function(){return this.entityList;};this.inflate=function(c){for(var d=0;d<c.length;d++){this.entityList.push(c[d]);}};this.setCurrentPosition=function(c){this.currentPosition=c;};this.isRequireAddNewEntity=function(){return((this.currentPosition!=0)&&(this.entityList.length<this.MAX_QTY_ELEMENT)&&(this.entityList.length-this.currentPosition)<this.MAX_END_DISTANCE_FOR_REQUIRE_NEW_ENTITY_LIST);};this.getShowEntityList=function(){var d=new Array();for(var c=0;(c<this.entityList.length)&&(c<this.n);c++){d.push((this.currentPosition+c>=this.entityList.length)?null:this.entityList[this.currentPosition+c]);}return d;};this.previous=function(){if(this.hasPrevious()){this.currentPosition-=this.n;}if(this.currentPosition<0){this.currentPosition=0;}};this.hasPrevious=function(){return(this.currentPosition>0);};this.next=function(){if(this.hasNext()){this.currentPosition+=this.n;}};this.hasNext=function(){return((this.currentPosition+this.n)<this.entityList.length);};this.getEntityByID=function(c){for(var d=0;d<this.entityList.length;d++){e=this.entityList[d];if(e.getID()==c){return e;}}return null;};this.getEntityIDList=function(){var c=new Array();for(var d=0;d<this.entityList.length;d++){e=this.entityList[d];c.push(e.getID());}return c;};this.clear=function(){this.entityList=new Array();this.currentPosition=0;};this.excludeEntity=function(h,m){var l=new Array();var d=0;for(var g=0;g<h.length;g++){var c=h[g];for(var f=0;f<m.length;f++){if(c.getID()==m[f]){c=null;break;}}if(c!=null){l[d++]=c;}}return l;};}function Entity(b,a){this.id=b;this.entityName=a;this.getID=function(){return this.id;};this.getEntityName=function(){return this.entityName;};this.showActivity=function(d,c){c.showActivity(d,c);};this.hideActivity=function(d,c){c.hideActivity(d);};}function RequestAJAX(){this.preloadWorkImage=function(){var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){var filePathWorkImageList=request.responseJS.resultList;preloadImage(filePathWorkImageList);}};request.caching=true;request.open(null,"../classes/Backend/getWorkImage.php",true);request.send();};this.inflateGiftListForChoice=function(qtyStart,qtyResult,excludeEntityIDList,selectedAnswerIDList){if(RequestAJAX.isRunInflateGiftListForChoice){return;}if(!(RequestAJAX.isRationalInflateGiftListForChoice)){return;}RequestAJAX.isRunInflateGiftListForChoice=true;var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){RequestAJAX.isRunInflateGiftListForChoice=false;if(page.getCurrentPage()!=page.pageChoiceAndSelectedGift){return;}var giftList=new Array();var giftStateList=request.responseJS.stateList;if(giftStateList==null){return;}for(var i=0;i<giftStateList.length;i++){var giftState=giftStateList[i];
var gift=Gift.stateFromArray(giftState);giftList.push(gift);}RequestAJAX.isRationalInflateGiftListForChoice=((giftList.length>0));var giftListCurrentPosition=ThroughInfo.rememberValue("SystemStateGuide","giftListCurrentPosition");giftListCurrentPosition=(((giftListCurrentPosition==null)||(giftListCurrentPosition==""))?0:parseInt(giftListCurrentPosition));page.getCurrentPage().inflateAndShow(giftList,giftListCurrentPosition);}};request.caching=true;request.open(null,"../classes/Backend/getGiftStateListForChoice.php",true);request.send({selectedAnswerIDList:selectedAnswerIDList,qtyStart:qtyStart,qtyResult:qtyResult});};this.createCountryList=function(){var countryCode1List=Cache.remember("countryCode1List");var countryNameList=Cache.remember("countryNameList");if((countryCode1List!=null)&&(countryNameList!=null)){RequestAJAX.createCountryListDoOnReady(countryCode1List,countryNameList);return;}if(RequestAJAX.isRunCreateCountryList){return;}RequestAJAX.isRunCreateCountryList=true;var request=new JsHttpRequest();request.onreadystatechange=function(){if((request.readyState==4)&&((page.getCurrentPage()==page.pageFeedback))){RequestAJAX.isRunCreateCountryList=false;Cache.memorize("countryCode1List",request.responseJS.countryCode1List);Cache.memorize("countryNameList",request.responseJS.countryNameList);RequestAJAX.createCountryListDoOnReady(request.responseJS.countryCode1List,request.responseJS.countryNameList);}};request.caching=true;request.open(null,"../classes/Backend/createCountryList.php",true);request.send({});};this.createCityNameListByCountryCode1=function(countryCode1){if(countryCode1==null){return;}var cityNameList=Cache.remember("cityNameList_"+countryCode1);if(cityNameList!=null){RequestAJAX.createCityNameListByCountryCode1DoOnReady(cityNameList);return;}var request=new JsHttpRequest();request.onreadystatechange=function(){if((request.readyState==4)&&(page.getCurrentPage()==page.pageFeedback)){Cache.memorize("cityNameList_"+countryCode1,request.responseJS.cityNameList);RequestAJAX.createCityNameListByCountryCode1DoOnReady(request.responseJS.cityNameList);}};request.caching=true;request.open(null,"../classes/Backend/createCityNameListByCountryCode1.php",true);request.send({countryCode1:countryCode1});};this.sendFeedbackMessage=function(countryName,cityName,text,name,email){var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){if(page.getCurrentPage()!=page.pageFeedback){return;}var isResultOK=request.responseJS.isResultOK;if((isResultOK!=null)&&(isResultOK=="true")){page.getCurrentPage().showUpdate_Success();}else{page.getCurrentPage().showUpdate_Exception(request.responseJS.text);}}};request.caching=false;request.open(null,"../classes/Backend/sendFeedbackMessage.php",true);request.send({countryName:countryName.isFrameAboveSmallBrackets()?"":countryName,cityName:cityName.isFrameAboveSmallBrackets()?"":cityName,text:text.isFrameAboveSmallBrackets()?"":text,name:name.isFrameAboveSmallBrackets()?"":name,email:email.isFrameAboveSmallBrackets()?"":email});};this.showQuestionListBlock=function(entityClassName){var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){if(null==page.pageQuestionListBlock){return;}var isResultOK=request.responseJS.isResultOK;if((isResultOK!=null)&&(isResultOK=="true")){var questionList=new Array();var stateList=request.responseJS.stateQuestionList;for(var i=0;i<stateList.length;i++){questionList[i]=Question.stateFromArray(stateList[i]);}var pageSelectedQA=page.getCurrentPage().getPageSelectedQA();page.pageQuestionListBlock.showQuestionListBlock(questionList,pageSelectedQA);}else{page.pageQuestionListBlock.showQuestionListBlock_Exception(request.responseJS.resultText);}}};request.caching=true;request.open(null,"../classes/Backend/getQuestionStateList.php",true);request.send({entityClassName:entityClassName});};this.switchToPageQuestionOneAndAnswerList=function(questionID,selectedAnswerIDList){var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){if(null==page.pageQuestionListBlock){return;}var state=request.responseJS.stateQuestion;var isResultOK=request.responseJS.isResultOK;if((isResultOK!=null)&&(isResultOK=="true")){var fullPathFileName="http://dalion.ua/scripts/Page/PageQuestionOneAnswerList.js";var runInstructions=(""+'var p = PageQuestionOneAnswerList.initFromStringStatus("'+toSourceObject(state)+'");'+"p.show();");page.loadAndCallback(fullPathFileName,runInstructions);}else{page.setActivePageQuestionOneAndAnswerList_Exception(question,request.responseJS.resultText);}}};request.caching=true;request.open(null,"../classes/Backend/getQuestionState.php",true);request.send({questionID:questionID,selectedAnswerIDList:selectedAnswerIDList});};this.loadTooltipContent=function(url,contentID,whither,isCreateCloseButton,data){var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){var s="";if(isCreateCloseButton){s+=""+'<div style="border-bottom: 1px solid #fff; margin-bottom: 5px; text-align: right;">'+'<a href="Javascript:void(0);"'+' title="Закрыть"'+" onclick=\"var windowID = 'tooltipLoader_"+request.responseJS.contentID+"'; window[windowID].hideContent();\""+">"+"х"+"</a>"+"</div>";}s+=request.responseJS.contentHTML;getHTMLTagById(whither).innerHTML=s;}};request.caching=true;request.open(null,url,true);request.send({contentID:contentID,params:data});};this.loadContentInTagID=function(pathTemplatePage,params,whither,jsCommand,isShowWait,isAllowCaching){var tagID=getHTMLTagById(whither);
if(tagID===null){throw new Exception("Tag with ID ["+whither+"] not found.");}if(isShowWait){var s=('<img src="http://dalion.ua/images/loading-m.gif"'+' width="24" height="24"'+' title="Пожалуйста, подождите"'+">");setTimeout(function(){var t="#"+whither+"[data-status=must load later]";if($(t).length>0){$(t).html(s);$(t).attr("data-status","loading");}},1400,whither,s);}var request=new JsHttpRequest();request.onreadystatechange=function(){if(request.readyState==4){var t="#"+whither;$(t).attr("data-status","complete");var tagID=getHTMLTagById(whither);if(tagID!=null){tagID.innerHTML=request.responseJS.contentHTML;if((RequestAJAX.loadContentInTagID_jsCommand!==null)&&(RequestAJAX.loadContentInTagID_jsCommand!=="")){eval(RequestAJAX.loadContentInTagID_jsCommand);RequestAJAX.loadContentInTagID_jsCommand="";}}}};RequestAJAX.loadContentInTagID_jsCommand=jsCommand;request.caching=(("undefined"==typeof isAllowCaching)?true:isAllowCaching);request.open(null,"http://dalion.ua/classes/Backend/loadPage.php",true);request.send({pathTemplatePage:pathTemplatePage,params:params});};}RequestAJAX.loadContentInTagID_jsCommand="";RequestAJAX.createCountryListDoOnReady=function(a,b){page.getCurrentPage().showUpdateCountryList(a,b);};RequestAJAX.createCityNameListByCountryCode1DoOnReady=function(a){page.getCurrentPage().showUpdateCityList(a);};RequestAJAX.isRunInflateGiftListForChoice=false;RequestAJAX.isRunInflateShopListForChoice=false;RequestAJAX.isRunInflateQAOne=false;RequestAJAX.isRunCreateCountryList=false;RequestAJAX.thisLoadContentInTagID=null;RequestAJAX.isRationalInflateGiftListForChoice=true;RequestAJAX.isRationalInflateShopListForChoice=true;RequestAJAX.isRationalInflateQAOne=true;function Gift(c,a,b){this.id=c;this.name=a;this.infoList=b;this.categoryIDList=new Array();this.addCategoryID=function(d){var g=d;if(!(Array.prototype.isPrototypeOf(d))){g=new Array();g.push(d);}for(var f=0;f<g.length;f++){this.categoryIDList.push(g[f]);}};this.getID=function(){return this.id;};this.getName=function(){return this.name;};this.getInfoList=function(){return this.infoList;};this.isInvaluable=function(){return this.infoList["isInvaluable"];};this.getCategoryIDList=function(){return this.categoryIDList;};this.stateToArray=function(){return{id:this.id,name:this.name,infoList:this.infoList,categoryIDList:this.categoryIDList};};}Gift.getImageSignByImagePath=function(a){var b=a.lastIndexOf(".gif");return a.charAt(b-1);};Gift.getImageNumberByImagePath=function(a){var c=a.lastIndexOf(".gif")-2;var b=a.indexOf("-")+1;return a.substr(b,c-b);};Gift.stateFromArray=function(b){var c=new Gift(b["id"],b["name"],b["infoList"]);var a=createListFromObject(b["categoryIDList"]);c.addCategoryID(a);return c;};Gift.stateFromArraySerialize=function(a){var b=unserialize(a);return Gift.stateFromArray(b);};function IllegalArgumentException(a){this.message=a;this.getMessage=function(){return this.message;};this.toString=function(){return this.getMessage();};}function MyEvent(b,a){this.id=b;this.infoList=a;this.getID=function(){return this.id;};this.getInfo=function(c){for(var d in this.infoList){if(c==this.infoList[d]){return this.infoList[d];}}return null;};this.getInfoList=function(){return this.infoList;};}MyEvent.stateFromArray=function(a){return new MyEvent(a["id"],a["infoList"]);};function EnvelopePageLocationPlace(a){this.strLocationPlace=a;this.show=function(){getHTMLTagById("locationPlace").innerHTML=this.strLocationPlace;};this.changeLocationPlace=function(b){this.strLocationPlace=b;this.show();};}function ImagePageChoiceGift(){this.show=function(f){if(!this.isCreatedPageStructure()){if(getHTMLTagById("entityChoiceVariantList")==null){return;}updateTagHTML("entityChoiceVariantList",this.createPageStructure());}for(var b=0;b<f.length;b++){var a=(((f[b]!=null)&&(!f[b].isInvaluable()))?MenuItem.createHTMLChoiceShop(f[b],b+1,true):"&nbsp;");updateTagHTML("giftChoiceMenuTopList"+(b+1),a);var c="giftChoiceVariant"+(b+1);var d=((f[b]==null)?((b==1)?"&nbsp;":("<img "+' src="images/loading-m.gif"'+' alt="Загрузка....."'+"/>")):this.createHTMLImage(f[b],b+1));updateTagHTML(c,d);c+="Title";d=((f[b]==null)?"&nbsp;":f[b].getName());updateTagHTML(c,d);}};this.createPageStructure=function(){var a=(""+'<div class="giftChoiceBlock">'+'<div id="giftChoiceMenuTopList1" class="giftChoiceMenuTopList">'+"</div>"+'<div id="giftChoiceVariant1" class="giftChoiceVariant">'+"</div>"+'<div id="giftChoiceVariant1Title" class="giftChoiceVariantTitle">'+"</div>"+"</div>"+'<div class="giftChoiceBlock">'+'<div id="giftChoiceMenuTopList2" class="giftChoiceMenuTopList">'+"</div>"+'<div id="giftChoiceVariant2" class="giftChoiceVariant">'+"</div>"+'<div id="giftChoiceVariant2Title" class="giftChoiceVariantTitle">'+"</div>"+"</div>"+'<div id="addGift" class="menuChoiceVariant">'+"</div>");return a;};this.isCreatedPageStructure=function(){return(getHTMLTagById("giftChoiceMenuTopList1")!=null);};this.createHTMLImage=function(c,b){var a=(""+"http://dalion.ua/ui/getGiftImage.php"+"?giftID="+c.getID()+"&n=1"+"&size=m");var f="giftChoiceVariant"+b;var d="gift/"+c.getID();var g=(""+'<a class="notUnderline"'+' href="'+d+'"'+' title="'+c.getName()+'"'+">"+"<img"+' src="'+a+'"'+' alt="'+c.getName()+'"'+' width="212" height="131"'+' onmouseover="'+"getHTMLTagById('"+f+"').style.background = "+"'url(/images/marker_242x155_1.gif) no-repeat left top';"+'"'+' onmouseout="'+"getHTMLTagById('"+f+"').style.background = "+"'none';"+'"'+" />"+"</a>");return g;};}function ImagePageSelectedGift(){this.show=function(d){if(!this.isCreatedPageStructure()){getHTMLTagById("entitySelectedVariantList").innerHTML=this.createPageStructure();
}for(var a=0;a<d.length;a++){var c=((d[a]==null)?"":this.createHTMLText(d[a],a+1));var b="entitySelectedVariant"+(a+1);updateTagHTML(b,c);}for(var a=d.length;a<5;a++){var b="entitySelectedVariant"+(a+1);updateTagHTML(b,"");}};this.createPageStructure=function(){var a=""+'<div id="entitySelectedVariant1" class="giftSelectedVariant">'+"</div>"+'<div id="entitySelectedVariant2" class="giftSelectedVariant">'+"</div>"+'<div id="entitySelectedVariant3" class="giftSelectedVariant">'+"</div>"+'<div id="entitySelectedVariant4" class="giftSelectedVariant">'+"</div>"+'<div id="entitySelectedVariant5" class="giftSelectedVariant">'+"</div>"+"";return a;};this.isCreatedPageStructure=function(){return(getHTMLTagById("entitySelectedVariant1")!=null);};this.createHTMLText=function(c,b){var a=(""+"http://dalion.ua/ui/getGiftImage.php"+"?giftID="+c.getID()+"&n=1"+"&size=m");var d=""+'<div class="fadeButton">'+""+"<img"+' src="'+a+'"'+' width="95" height="59"'+" />"+""+'<div class="selectedGiftInfo">'+'<a href="http://dalion.ua/gift/'+c.getID()+'"'+' title="Где приобрести"'+">"+"<img"+' src="images/menu/menu_choice_shop_over.gif"'+' alt="Где приобрести"'+' width="47" height="29"'+" />"+"</a>"+"</div>"+""+'<div class="selectedGiftExclude">'+'<a href="Javascript:void(0);"'+' onClick="'+"page.pageSelected5Gift.throwEntity('"+c.getID()+"');"+" page.pageSelected5Gift.show();"+" if (!(is_ie)) { this.blur(); }"+'"'+' title="Исключить из списка"'+">"+"<img"+' src="images/menu/menu_exclude_gift_from_selected_over.gif"'+' alt="Исключить из списка"'+' width="23" height="14"'+" />"+"</a>"+"</div>"+""+"<div"+' id="'+this.createTagEntitySelectedName(c.getID())+'"'+' class="giftName"'+">"+c.getName()+"</div>"+""+"</div>"+"";return d;};this.createTagWhither=function(a){return"tiSelectedGiftID"+a;};this.createTagEntitySelectedName=function(a){return"entity"+a+"SelectedName";};}MenuItem.STATE_ACTIVE=1;MenuItem.STATE_NOT_ACTIVE=2;MenuItem.STATE_NOT_SHOW=3;function MenuItem(c,b,g,d,a,f){this.content=c;this.href=b;this.doCode=g;this.state=d;this.classTagName=a;this.targetPage=((f==null)?"_self":f);this.getState=function(){return this.state;};this.isShow=function(){return(this.state!=MenuItem.STATE_NOT_SHOW);};this.toImageHTML=function(){var k="";var h="";var j="";switch(this.state){case MenuItem.STATE_ACTIVE:k=""+"<a"+' href="'+this.href+'"'+' target="'+this.targetPage+'"'+' class="'+this.classTagName+'"'+" "+this.doCode+">";h=this.content;j="</a>";break;case MenuItem.STATE_NOT_ACTIVE:k=""+"<span"+' class="menuItemStateNotActive"'+">";h=this.content;j="</span>";break;case MenuItem.STATE_NOT_SHOW:k="";h="";j="";break;default:throw new IllegalArgumentException("Illegal status."+" Status: "+this.state);}return(k+h+j);};}MenuItem.createHTMLChoiceShop=function(c,a,b){var d="gift/"+c.getID();var g="menu_choice_shop_"+a;var f=(""+'<a class="notUnderline"'+' href="'+d+'"'+' onClick="'+"if (!(is_ie)) { this.blur(); }"+'"'+' title="'+c.getName()+" – Где приобрести"+'"'+">"+"<img"+' id="'+g+'"'+(b?' style="margin-left: 50px;"':"")+' src="images/menu/menu_choice_shop_over.gif"'+' alt="Где приобрести"'+' width="47" height="29"'+' align="left"'+" />"+(b?('<div style="text-align: left; padding-top: 0px;"'+' title="Где приобрести подарок – '+c.getName().toLowerCase()+'?"'+">"+'<span style="font-size: 77%;">'+"Где приобрести<br>этот подарок »»"+"</span>"+"</div>"):"")+"</a>");return f;};function Page(){this.pageChoiceAndSelectedGift=null;this.pageFeedback=null;this.pageSelected5Gift=null;this.pageQuestionListBlock=null;this.pageShopListBlock=null;this.pageList=new Array();this.envelopePageLocationPlace=null;this.currentPageInnerName=null;this.isShowMenuGeneral1=false;this.getCurrentPage=function(){return this.getPageByName(this.currentPageInnerName);};this.isCurrentPage=function(a){return(this.currentPageInnerName==a);};this.update=function(b,a){this.getCurrentPage().update(b,a);};this.getPageByName=function(a){switch(a){case"PageChoiceAndSelectedGift":return this.pageChoiceAndSelectedGift;case"PageFeedback":return this.pageFeedback;case"PageSelected5Gift":return this.pageSelected5Gift;}for(var b=0;b<page.pageList.length;b++){if(page.pageList[b].getInnerName()==a){return page.pageList[b];}}throw new IllegalArgumentException("Не известное название страницы."+" Получено: ["+a+"]");};this.createPageByNameSimply=function(b,a){this.createPageByNameSimplyWithParams(b,null,a);};this.createPageByNameSimplyWithParams=function(c,d,b){var a=new Array(b+c+".js");this.createPageByName(c,d,a);};this.createPageByNameSimplyWithParamsAndClasses=function(d,g,c,h){if("undefined"==typeof h){h=new Array();}var a=new Array();for(var b=0;b<h.length;b++){var f=c+h[b]+".js";a.push(f);}var f=c+d+".js";a.push(f);this.createPageByName(d,g,a);};this.loadAndCallback=function(b,a){Page.runCurrentInstructionsAfterLoad=a;createScript(b,"utf-8");};this.createPageByName=function(a,g,c){if(("undefined"==typeof c)||(c==null)){throw new Exception("Не указаны страницы для загрузки.");}var h=null;var d=0;for(d=0;d<c.length-1;d++){this.loadAndCallback(c[d],h);}var b=(((g!=null)&&("object"==typeof g))?toSourceObject(g):"null");var f="new "+a+"("+b+");";h=(""+' var p = eval("'+f+'");'+" page.pageList.push(p);"+" page.switchToPageByName("+'"'+a+'"'+", "+b+");");this.loadAndCallback(c[d],h);};this.createPageByNameWithInitPageAfterRequireAndShow=function(a,h,f){if(("undefined"==typeof f)||(f==null)){throw new Exception("Не указаны страницы для загрузки.");}var c=new Array(f+a+".js");var j=null;var d=0;
for(d=0;d<c.length-1;d++){this.loadAndCallback(c[d],j);}var b=(((h!=null)&&("object"==typeof h))?toSourceObject(h):"null");var g="new "+a+"("+b+");";j=(""+' var p = eval("'+g+'");'+" page.pageList.push(p);"+" page.initPageAfterRequireAndShow("+'"'+a+'"'+");");this.loadAndCallback(c[d],j);};this.switchToPageByName=function(a,c){switch(a){case"PageChoiceAndSelectedGift":this.switchToPageChoiceAndSelectedGift();this.setActiveTopMenuGeneral();return;case"PageFeedback":this.switchToPageFeedback();this.setActiveTopMenuGeneral();return;}for(var b=0;b<page.pageList.length;b++){if(page.pageList[b].getInnerName()==a){this.requireAndShow(page.pageList[b]);return;}}throw new IllegalArgumentException("Не известное внутреннее название страницы."+" Получено: ["+a+"]");};this.requireAndShow=function(c){var a=page.getCurrentPage();var b=new JsHttpRequest();b.onreadystatechange=function(){if(b.readyState==4){getHTMLTagById("pageCenterContent").innerHTML=b.responseJS.imagePageHTML;page.initPageAfterRequireAndShow(a.getInnerName());}};b.caching=true;b.open(null,"http://dalion.ua/classes/Backend/createImagePageHTML.php",true);b.send({page:c.getInnerName(),currentLocationPlaceText:a.getCurrentLocationPlaceText(),params:c.getParams()});};this.initPageAfterRequireAndShow=function(a){this.currentPageInnerName=a;var b=this.getCurrentPage();this.envelopePageLocationPlace=new EnvelopePageLocationPlace(b.getLocationPlace());this.envelopePageLocationPlace.show();if("undefined"==typeof b.isShowMenuGeneralAfterLoad){this.setActiveTopMenuGeneral();}else{if(b.isShowMenuGeneralAfterLoad()){this.setActiveTopMenuGeneral();}}if("function"==typeof b.runAfterLoadAndActive){b.runAfterLoadAndActive();}};this.setCurrentPageShowAndUpdate=function(c){this.currentPageInnerName=c.getInnerName();var b=this.getCurrentPage();b.show();var a=b.getLocationPlace();this.envelopePageLocationPlace=new EnvelopePageLocationPlace(a);this.envelopePageLocationPlace.show();};this.setCurrentPageShowAndUpdate_Exception=function(c){this.currentPageInnerName=c.getInnerName();var b=this.getCurrentPage();b.showException();var a=b.getLocationPlace();this.envelopePageLocationPlace=new EnvelopePageLocationPlace(a);this.envelopePageLocationPlace.show();};this.hideMenuLeft=function(){getHTMLTagById("menuLeft").innerHTML="";};this.switchToPageChoiceAndSelectedGift=function(){if(this.pageChoiceAndSelectedGift==null){var c=new Array();var h=new Array();this.pageChoiceAndSelectedGift=new PageChoiceAndSelectedGift(c,h);var k=ThroughInfo.rememberValue("SystemStateGuide","giftListCurrentPosition");k=(((k==null)||(k==""))?0:parseInt(k));var b=ThroughInfo.rememberValue("SystemStateGuide","selectedAnswerStateList",true);var a=null;if(b==null){a=this.pageChoiceAndSelectedGift.getSelectedAnswerList();}if(a==null){a=createObjectListFromStateList(b,"Answer");}var f=new PageSelectedQA(a);this.pageChoiceAndSelectedGift.setPageSelectedQA(f);RequestAJAX.isRationalInflateGiftListForChoice=true;var d=new RequestAJAX();var g=0;var j=(k+this.pageChoiceAndSelectedGift.pageChoice.choice.QTY_REQUIRE_NEW_ENTITY);d.inflateGiftListForChoice(g,j,new Array(),f.getShowEntityIDNotEmptyList());}this.clearPageBlock("border_left_middle");this.clearPageBlock("border_right_middle");this.setActivePageQuestionListBlock("Gift");this.setCurrentPageShowAndUpdate(this.pageChoiceAndSelectedGift);};this.clearPageBlock=function(a){updateTagHTML(a,"");};this.switchToPageFeedback=function(){this.pageFeedback=new PageFeedback();this.setCurrentPageShowAndUpdate(this.pageFeedback);};this.setActiveTopMenuGeneral=function(){getHTMLTagById("topMenuBlockList").style.display="block";};this.setActivePageSelected5Gift=function(){if(this.pageSelected5Gift==null){var a=new Array();var d=new ImagePageSelectedGift();this.pageSelected5Gift=new PageSelected5Gift(a,d);}if(!this.pageSelected5Gift.isCreatedPageStructure()){getHTMLTagById("pageSelectedContent").innerHTML=this.pageSelected5Gift.createPageStructure();}this.pageSelected5Gift.show();var c=this.getCurrentPage();var b=c.getLocationPlace();this.envelopePageLocationPlace=new EnvelopePageLocationPlace(b);this.envelopePageLocationPlace.show();};this.setActivePageQuestionListBlock=function(a){updateTagHTML("border_left_middle",'<div id="menuLeft"></div>');this.pageQuestionListBlock=new PageQuestionListBlock(a);page.pageQuestionListBlock.show();};this.switchSetActivePage_SelectedGiftMenuGeneral=function(){if((page.pageMenuGeneral!=null)&&page.pageMenuGeneral.isCreatedPageStructure()&&(page.pageSelected5Gift!=null)&&!page.pageSelected5Gift.isCreatedPageStructure()){this.setActivePageSelected5Gift();}else{this.setActiveTopMenuGeneral();}};this.isCurrentPage=function(a){return(this.currentPageInnerName.toLowerCase()==a.toLowerCase());};}Page.createRedirectURL=function(){return"http://dalion.ua/";};Page.createBodyRedirectText=function(a){return""+"Это <strong>фотография</strong> существующей страницы."+"<br>Через 5 секунд Вы будете переадресованы на динамическую страницу сайта,"+" где сможете продолжить поиск."+"<br>Для моментального перехода"+", <a"+' href="'+a+'"'+' title="Далион - Перейти к оригиналу страницы"'+">"+" нажмите на эту ссылку: "+a+"</a>"+"";};Page.createTitle=function(a){return a.title;};Page.createContentType=function(a){return"text/html; charset=UTF-8";};Page.createCSSStyleLinkHREFList=function(d){var c=new Array();var a=d.getElementsByTagName("link");for(var b=0;b<a.length;b++){c[b]=a[b].href;}return c;};Page.createDescription=function(a){var c="";var b=Page.createBodyTagTextList(document,"h1","").concat(Page.createBodyTagTextList(document,"h2","")).concat(Page.createBodyTagTextList(document,"h3",""));
c=b.toStringList(", ",true);return(""+"Подарок – это Знак внимания, дружбы, чувств, понимания..."+" Выбирайте. Находите. Любите. Дарите. Будьте счастливы!"+" Здесь Вы найдёте: "+c.toLowerCase()+((c=="")?"":"."));};Page.createKeywords=function(c,d){var a=Page.createKeywordListByTagName(c,"h1");var b=a.implode(" ");a=Page.createKeywordListByTagName(c,"h2");b=b.trim()+" "+a.implode(" ");a=Page.createKeywordListByTagName(c,"h3");b=b.trim()+" "+a.implode(" ");a=Page.createKeywordListByTagName(c,"a");b=b.trim()+" "+a.implode(" ");b=b.minLengthWord(4," ");b=("выбор подарка, "+b).uniqueWords(" ");b=b.replace(/^,/,"");b=b.replace(/,$/,"");if(d>0){b=b.substr(0,b.lastIndexOf(" ",d));}return b;};Page.createBodyTagTextList=function(g,d,a){var c=g.getElementsByTagName(d);var j=new Array();var f=0;for(var b=0;b<c.length;b++){var h=(((a==null)||(a==""))?getElementText(c[b]):(("undefined"==c[b][a])?"":c[b][a]));j[f]=h.trim();f++;}return j;};Page.createBodyOtherText=function(b,a){return"";};Page.createKeywordListByTagName=function(g,c){var b=g.getElementsByTagName(c);var f=new Array();for(var a=0;a<b.length;a++){var d=getElementText(b[a]).trim();f[a]=d.withoutSpecialSymbols().toLowerCase();}return f;};Page.createParamsFromLocation=function(a){var c=(a+" ").trim();var g=new Object();var h=c.lastIndexOf("#");if(h==false){return null;}var d=c.substr(h+1);var b=d.substr(0,1);var f=d.substr(1);g[b]=f;return g;};Page.createPublicCode=function(b,a){return md5(b.trim()+"_"+a.trim());};Page.createAnchorLocation=function(a,b){var c=(a+" ").trim();var d=c.indexOf("#");if(d!=-1){c=c.substr(0,d);}return(c+"#"+b);};Page.countWaitLoadScripts=0;Page.runCurrentInstructionsAfterLoad=null;function PageChoice0(a,b){this.entity=a;this.imagePage=b;this.getInnerName=function(){return"PageChoice0";};this.show=function(){this.imagePage.show();};this.createPageStructure=function(){var c=(""+'<div id="centerBoxChoice">'+'<div id="entityChoiceContent">'+'<div id="entityChoiceTitle">'+"</div>"+'<div id="entityChoice">'+""+"</div>"+"</div>");return c;};this.isCreatedPageStructure=function(){return(getHTMLTagById("entityChoiceContent")!=null);};this.getEntity=function(){return this.entity;};}callbackInstructionsAfterLoadFromPage();function PageChoice2(a,b){this.choice=new ChoiceN(2,a);this.imagePage=b;this.getInnerName=function(){return"PageChoice2";};this.setCurrentPosition=function(c){this.choice.setCurrentPosition(c);};this.show=function(){var c=this.choice.getShowEntityList();if(c.length==0){return;}this.imagePage.show(c);this.showArrows();};this.createPageStructure=function(){var c=(""+'<div id="centerBoxChoice">'+'<div id="entityChoiceContent">'+'<div id="entityChoiceTitle">'+"</div>"+'<div id="arrowEntityChoicePrevious" class="arrowEntityChoicePreviousNext">'+"</div>"+'<div id="entityChoiceVariantList">'+""+"</div>"+'<div id="arrowEntityChoiceNext" class="arrowEntityChoicePreviousNext">'+"</div>"+"</div>");return c;};this.isCreatedPageStructure=function(){return(getHTMLTagById("entityChoiceVariantList")!=null);};this.showArrows=function(){this.showArrowPrevious();this.showArrowNext();};this.showArrowPrevious=function(){var d=page.pageChoiceAndSelectedGift.getCurrentPosition();var c=""+"page.getCurrentPage().pageChoice.choice.previous();"+" page.getCurrentPage().showPageChoice();"+" if (!(is_ie)) { this.blur(); }"+" var currentPosition ="+" page.pageChoiceAndSelectedGift.getCurrentPosition();"+" ThroughInfo.memorizeValue("+"'SystemStateGuide'"+", 'giftListCurrentPosition'"+", currentPosition"+");"+""+"";var f="";if(this.choice.hasPrevious()){f+=""+'<a class="notUnderline"'+' href="Javascript:void(0);"'+((is_ie)?(' onClick="'+c+'"'):(' onFocus="'+c+'"'))+' title="Предыдущий"'+" onMouseOver=\"rolloverImage('arrow_big_left', 1, 'images/');\""+" onMouseOut=\"rolloverImage('arrow_big_left', 0, 'images/');\""+">";}f+=""+'<img name="arrow_big_left"'+' id="arrow_big_left"'+' src="images/'+(this.choice.hasPrevious()?"arrow_big_left.gif":"arrow_big_left_not_active.gif")+'"'+' alt="«"'+" />";if(this.choice.hasPrevious()){f+="</a>";}updateTagHTML("arrowEntityChoicePrevious",f);};this.showArrowNext=function(){var c=""+"page.getCurrentPage().pageChoice.choice.next();"+" page.getCurrentPage().showPageChoice();"+" if (!(is_ie)) { this.blur(); }"+" if (page.getCurrentPage().pageChoice.choice.isRequireAddNewEntity())"+" {"+" page.getCurrentPage().requestInfo();"+" }"+" var currentPosition ="+" page.pageChoiceAndSelectedGift.getCurrentPosition();"+" ThroughInfo.memorizeValue("+"'SystemStateGuide'"+", 'giftListCurrentPosition'"+", currentPosition"+");"+""+"";var d="";if(this.choice.hasNext()){d+=""+'<a class="notUnderline"'+' href="Javascript:void(0);"'+' title="Следующий"'+((is_ie)?(' onClick="'+c+'"'):(' onFocus="'+c+'"'))+" onMouseOver=\"rolloverImage('arrow_big_right', 1, 'images/');\""+" onMouseOut=\"rolloverImage('arrow_big_right', 0, 'images/');\""+">";}d+=""+'<img name="arrow_big_right"'+' id="arrow_big_right"'+' src="images/'+(this.choice.hasNext()?"arrow_big_right.gif":"arrow_big_right_not_active.gif")+'"'+' alt="»"'+" />";if(this.choice.hasNext()){d+="</a>";}updateTagHTML("arrowEntityChoiceNext",d);};this.inflateAndShow=function(d,c){this.choice.inflate(d);this.choice.setCurrentPosition(c);this.show();};this.excludeEntity=function(c,d){return this.choice.excludeEntity(c,d);};this.getCurrentPosition=function(){return this.choice.getCurrentPosition();};this.getEntityList=function(){return this.choice.getEntityList();};this.getShowEntityList=function(){return this.choice.getShowEntityList();
};this.hasPrevious=function(){return this.choice.hasPrevious();};this.hasNext=function(){return this.choice.hasNext();};this.getEntityByID=function(c){return this.choice.getEntityByID(c);};this.clear=function(){return this.choice.clear();};}callbackInstructionsAfterLoadFromPage();function PageChoice5(a,b){this.choice=new ChoiceN(5,a);this.imagePage=b;this.getInnerName=function(){return"PageChoice5";};this.show=function(){this.imagePage.show(this.choice.getShowEntityList());};this.createPageStructure=function(){var c=(""+'<div id="centerBoxChoice1">'+'<div id="entityChoiceVariant5List">'+""+"</div>"+"</div>");return c;};this.isCreatedPageStructure=function(){return(getHTMLTagById("entityChoiceVariant5List")!=null);};this.inflateAndShow=function(c){this.choice.inflate(c);this.show();};this.excludeEntity=function(c,d){return this.choice.excludeEntity(c,d);};this.getCurrentPosition=function(){return this.choice.currentPosition;};this.getEntityList=function(){return this.choice.entityList;};this.getShowEntityList=function(){return this.choice.getShowEntityList();};this.hasPrevious=function(){return this.choice.hasPrevious();};this.hasNext=function(){return this.choice.hasNext();};this.getEntityByID=function(c){return this.choice.getEntityByID(c);};this.clear=function(){return this.choice.clear();};}callbackInstructionsAfterLoadFromPage();function PageChoiceAndSelectedGift(a,b){this.imagePageChoice=new ImagePageChoiceGift();this.pageChoice=new PageChoice2(a,this.imagePageChoice);this.pageSelectedQA=new PageSelectedQA(new Array());this.getInnerName=function(){return"PageChoiceAndSelectedGift";};this.getLocationPlace=function(){return("&#155;&nbsp;"+this.getCurrentLocationPlaceText());};this.getCurrentLocationPlaceText=function(){return"Выбор подарка";};this.setCurrentPosition=function(c){this.pageChoice.setCurrentPosition(c);};this.getPageSelectedQA=function(){return this.pageSelectedQA;};this.getSelectedAnswerList=function(){return this.pageSelectedQA.getShowEntityList();};this.setPageSelectedQA=function(c){this.pageSelectedQA=c;};this.show=function(){this.showPageChoice();};this.showPageSelected=function(){page.setActivePageSelected5Gift();};this.showPageChoice=function(){if(!this.pageChoice.isCreatedPageStructure()){getHTMLTagById("pageCenterContent").innerHTML=this.pageChoice.createPageStructure();}this.pageChoice.show();};this.inflateAndShow=function(d,c){this.pageChoice.inflateAndShow(d,c);this.show();};this.putAndShow=function(d){var c=this.getEntityByID(d);if(page.pageSelected5Gift.isPresentInSelected(c)){var f=page.pageSelected5Gift.pageImage.createTagEntitySelectedName(d);blinkByID(f,0);return;}page.pageSelected5Gift.putEntity(c);this.showPageSelected();};this.requestInfo=function(){var c=new RequestAJAX();c.inflateGiftListForChoice(this.pageChoice.choice.entityList.length,this.pageChoice.choice.QTY_REQUIRE_NEW_ENTITY,this.pageChoice.choice.getEntityIDList(),this.pageSelectedQA.getShowEntityIDNotEmptyList());};this.getCurrentPosition=function(){return this.pageChoice.getCurrentPosition();};this.getEntityByID=function(c){return this.pageChoice.getEntityByID(c);};}callbackInstructionsAfterLoadFromPage();function PageFeedback(){this.getInnerName=function(){return"PageFeedback";};this.getLocationPlace=function(){var a=(""+'&#155;&nbsp;<a href="Javascript:void(0);" title="Перейти к выбору подарка" onFocus="page.switchToPageChoiceAndSelectedGift(); if (!(is_ie)) { this.blur(); }">Выбор подарка</a>&nbsp;'+"&#155;&nbsp;"+this.getCurrentLocationPlaceText()+"&nbsp;"+"");return((is_ie)?a.replace(/onFocus/ig,"onClick"):a);};this.getCurrentLocationPlaceText=function(){return'<span title="Написать письмо">Ваше сообщение</span>';};this.show=function(){getHTMLTagById("pageCenterContent").innerHTML=this.createPageStructure();this.showUpdateCountryList(new Array(),new Array());this.requireUpdateCountryList();this.showUpdateCityList(new Array());getHTMLTagById("fieldText").innerHTML=this.createFieldText();getHTMLTagById("fieldName").innerHTML=this.createFieldName();getHTMLTagById("fieldEmail").innerHTML=this.createFieldEmail();};this.createPageStructure=function(){var a=""+'<div id="centerBoxContacts">'+'<div id="entityChoiceTitle">'+'<h2 class="locationPlaceStyle">'+"&nbsp;"+"</h2>"+"<h1>"+this.getCurrentLocationPlaceText()+"</h1>"+"</div>"+'<div id="feedback">'+'<form id="formFeedback"'+' name="formFeedback"'+' onsubmit="return false;"'+">"+'<div id="fieldText">'+"</div>"+'<div id="fieldName">'+"</div>"+'<div id="fieldEmail">'+"</div>"+'<div id="fieldCountry">'+"</div>"+'<div id="fieldCity">'+"</div>"+'<div id="buttonSend" style="margin-top: 5px; margin-bottom: 14px;">'+'<input type="submit"'+' name="submit"'+' class="textSubmit"'+' value="Отправить сообщение »»"'+' onclick="page.getCurrentPage().requireSend(); return false;"'+' disabled=""'+">"+"</div>"+"</form>"+"</div>"+"<br>"+'<span title="Позвонить по телефону"><img'+' src="http://dalion.ua/images/phone_23x14.gif"'+' width="23"'+' height="14"'+' alt="телефон"'+">"+" +38 044 383-60-34</span>"+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span title="Связаться через ICQ"><img'+' src="http://web.icq.com/whitepages/online?icq=262799810&img=27"'+' width="16"'+' height="16"'+' alt="icq"'+">"+" 262799810</span>"+"";return a;};this.createFieldText=function(){var a="<Текст Вашего сообщения>";return""+'<textarea name="text"'+' class="pageContactsField"'+' style="height: 140px;"'+this.createActionForField(a)+">"+a+"</textarea>";};this.createFieldName=function(){var a="<Ваше имя>";return""+'<input name="name" type="text"'+' class="pageContactsField"'+' value="'+a+'"'+this.createActionForField(a)+' title="Ваше имя"'+">";
};this.createFieldEmail=function(){var a="<E-mail>";return""+'<input name="email" type="text"'+' class="pageContactsField"'+' value="'+a+'"'+this.createActionForField(a)+' title="E-mail"'+">";};this.createActionForField=function(a){var b=""+' onFocus="'+"if (this.value == '"+a+"')"+"{"+"this.value = '';"+"}"+'"'+' onBlur="'+"if (this.value.trim() == '')"+"{"+"this.value = '"+a+"';"+"}"+'"'+' onKeyUp="'+"page.pageFeedback.checkPrepareFormForSend();"+'"'+"";return((is_ie)?b.replace(/onFocus/ig,"onClick"):b);};this.requireUpdateCountryList=function(){var a=new RequestAJAX();a.createCountryList();};this.showUpdateCountryList=function(c,f){var a=((c.length>0)?"<Страна>":"<Страна&nbsp;&#151; Получение списка стран>");var d=('<select name="country" class="pageContactsField"'+((f.length>0)?"":' disabled="true"')+' onchange="page.getCurrentPage().requireUpdateCityList(this.value);"'+' title="Страна"'+">");d+='<option value="" selected="true">'+a+"</option>";for(var b=0;b<f.length;b++){d+='<option value="'+c[b]+'">'+f[b]+"</option>";}d+="</select>";getHTMLTagById("fieldCountry").innerHTML=d;};this.requireUpdateCityList=function(b){var a=new RequestAJAX();a.createCityNameListByCountryCode1(b);};this.showUpdateCityList=function(d){var a=((d.length>0)?"<Город>":"<Город&nbsp;&#151; Выберите страну>");var c=('<select name="city" class="pageContactsField"'+((d.length>0)?"":' disabled="true"')+' title="Город"'+">");c+='<option value="" selected="true">'+a+"</option>";for(var b=0;b<d.length;b++){c+='<option value="'+d[b]+'">'+d[b]+"</option>";}c+="</select>";getHTMLTagById("fieldCity").innerHTML=c;};this.requireSend=function(){var a=new RequestAJAX();var b=document.forms["formFeedback"];a.sendFeedbackMessage(b.country.value,b.city.value,b.text.value,b.name.value,b.email.value);this.showUpdate_Send();};this.showUpdate_Send=function(){var a=""+"<blink>"+"Отправка сообщения....."+"</blink>"+"";getHTMLTagById("feedback").innerHTML=a;};this.showUpdate_Success=function(){var a=""+"Сообщение отправлено."+"";a+="<br><br>"+'<div class="menuItem">'+this.createMenuItemReturnToChoiceGift().toImageHTML()+"</div>";getHTMLTagById("feedback").innerHTML=a;};this.showUpdate_Exception=function(b){var c="info@dalion.ua";var a=""+'<div style="color: #c00;">'+"Сообщение не удалось отправить."+"</div>"+"<br>Приносим извинения за неудобство."+"<br>Попробуйте позже или воспользуйтесь адресом:"+' <a href="mailto:'+c+'"'+' title="Отправить письмо по электронной почте"'+">"+c+"</a>"+"<br><br>"+'<textarea name="description"'+' class="pageContactsField"'+' style="height: 140px;"'+' readonly="true"'+">"+b+"</textarea>";a+="<br><br>"+'<div class="menuItem">'+this.createMenuItemReturnToChoiceGift().toImageHTML()+"</div>";getHTMLTagById("feedback").innerHTML=a;};this.createMenuItemReturnToChoiceGift=function(){var a='onFocus="page.switchToPageChoiceAndSelectedGift(); if (!(is_ie)) { this.blur(); }"';return new MenuItem("Вернуться к выбору подарков","#",((is_ie)?a.replace(/onFocus/ig,"onClick"):a),MenuItem.STATE_ACTIVE);};this.checkPrepareFormForSend=function(){var a=document.forms["formFeedback"];var b=(!a.text.value.isFrameAboveSmallBrackets()&&(a.text.value.length>5));a.submit.disabled=b?"":true;};}callbackInstructionsAfterLoadFromPage();function PageQuestionListBlock(a){this.entityClassName=a;this.idTimeoutShowTitle=null;this.getInnerName=function(){return"PageQuestionListBlock";};this.getLocationPlace=function(){throw new Exception("Не должно вызываться");};this.getCurrentLocationPlaceText=function(){throw new Exception("Не должно вызываться");};this.show=function(){if(!this.isCreatedPageStructure()){getHTMLTagById("menuLeft").innerHTML=this.createPageStructure();}this.showTitleQuestionListBlock();var b=new RequestAJAX();b.showQuestionListBlock(this.entityClassName);};this.createPageStructure=function(){var b=(""+'<div id="pageQuestionListBlock">'+'<div id="currentQuestionName">'+"</div>"+'<div id="allQuestionList">'+'<div class="questionLine">'+'<div id="placeQ-age" class="question">'+"</div>"+'<div id="placeQ-sex" class="question">'+"</div>"+"</div>"+'<div class="questionLine">'+'<div id="placeQ-hascomputer" class="question">'+"</div>"+'<div id="placeQ-cause" class="question">'+"</div>"+"</div>"+'<div class="questionLine">'+'<div id="placeQ-likesouvenir" class="question">'+"</div>"+'<div id="placeQ-hobby" class="question">'+"</div>"+"</div>"+'<div class="questionLine">'+'<div id="placeQ-whorecipient" class="question">'+"</div>"+'<div id="placeQ-whatsee" class="question">'+"</div>"+"</div>"+'<div class="questionLine">'+'<div id="placeQ-profession" class="question">'+"</div>"+'<div id="placeQ-function" class="question">'+"</div>"+"</div>"+"</div>"+'<div id="dropQuestionMenuItem">'+"</div>"+"</div>");return b;};this.isCreatedPageStructure=function(){return(getHTMLTagById("pageQuestionListBlock")!=null);};this.showTitleQuestionListBlockTimeout=function(){this.idTimeoutShowTitle=setTimeout("page.pageQuestionListBlock.showTitleQuestionListBlock();",500);};this.showTitleQuestionListBlock=function(){var b="currentQuestionName";var c=(""+"<h2>"+"Уточняющие<br>вопросы"+"</h2>");updateTagHTML(b,c);};this.showQuestionListBlock=function(c,l){var r=c[0].getID();var d=l.isPresentInSelectedForQuestionID(r);var p=0;for(var m=0;m<c.length;m++){var j=c[m];var b=j.getID();var g="placeQ-"+b;var f=l.isPresentInSelectedForQuestionID(b);if(f){p++;}if(!d&&(b!=r)){updateTagHTML(g,"");if(getHTMLTagById(g)!=null){getHTMLTagById(g).style.background="none";}continue;}var u=j.getText();
var k=j.getAnswerList();var t=l.getSelectedAnswerForQuestionID(b);var h=((t==null)?j.getText():(j.getText()+" – "+"&laquo;"+t.getText()+"&raquo;"));var o=((t==null)?j.getText():(j.getText()+"<br>–&nbsp;"+"<i>"+"&laquo;"+t.getText()+"&raquo;"+"</i>"));var v=(""+'<a href="Javascript:void(0);"'+' class="notUnderline"'+" onMouseOver=\"page.pageQuestionListBlock.showOverQuestion('"+o+"');\""+' onMouseOut="page.pageQuestionListBlock.showTitleQuestionListBlockTimeout();"'+' onClick="page.pageQuestionListBlock.showAnswerForChoice('+"'"+b+"'"+");"+" this.blur();"+'"'+">"+"<img"+' width="47" height="29"'+' hspace="0" vspace="0"'+' alt="'+h+'"'+' title="'+h+'"'+' src="'+PATH_REPOSITORIE_GIFT+"question/image/"+b+(f?"-is":"")+".gif"+'"'+"/>"+"</a>");updateTagHTML(g,v);}var q="dropQuestionMenuItem";var v="";if(p>0){v=(""+'<a href="Javascript:void(0);"'+' title="Ответить заново"'+' onClick="'+" ThroughInfo.memorizeValue("+"'SystemStateGuide'"+", 'selectedAnswerStateList'"+", new Array()"+");"+" ThroughInfo.memorizeValue("+"'SystemStateGuide'"+", 'giftListCurrentPosition'"+", 0"+");"+""+" page.getCurrentPage().pageChoice.clear();"+" page.getCurrentPage().pageSelectedQA.clear();"+" page.switchToPageChoiceAndSelectedGift();"+" RequestAJAX.isRationalInflateGiftListForChoice = true;"+" page.getCurrentPage().requestInfo();"+" if (!(is_ie)) { this.blur(); }"+'"'+">"+((p==1)?"Забыть ответ":"Забыть ответы")+"</a>"+"<br>&nbsp;");}updateTagHTML(q,v);};this.showQuestionListBlock_Exception=function(d){var c=(""+"Получить список вопросов не удалось.");var b="allQuestionList";updateTagHTML(b,c);};this.showOverQuestion=function(b){if(this.idTimeoutShowTitle!=null){clearTimeout(this.idTimeoutShowTitle);this.idTimeoutShowTitle=null;}var d=b;var c="currentQuestionName";updateTagHTML(c,d);};this.showAnswerForChoice=function(d){var b=new RequestAJAX();var c=page.getCurrentPage().pageSelectedQA.getShowEntityIDList();b.switchToPageQuestionOneAndAnswerList(d,c);};}callbackInstructionsAfterLoadFromPage();function PageSelected5Gift(b,a){this.selected=new Selected(b,5);this.pageImage=a;this.getInnerName=function(){return"PageSelected5Gift";};this.show=function(){var c=this.selected.getShowEntityList();this.pageImage.show(c);};this.getSelectedGiftList=function(){return this.getShowEntityList();};this.getShowEntityList=function(){return this.selected.getShowEntityList();};this.getShowEntityIDList=function(){return this.selected.getShowEntityIDList();};this.getSelectedGiftNotEmptyList=function(){var d=new Array();var f=this.selected.getShowEntityIDList();for(var c=0;c<entityIDList.length;c++){if(entityIDList[c]!=null){d[d.length]=entityIDList[c];}}return d;};this.getShowEntityIDList=function(){return this.selected.getShowEntityIDList();};this.getShowEntityIDList=function(){return this.selected.getShowEntityIDList();};this.createPageStructure=function(){var c=(""+'<div id="boxSelected5Gift">'+'<div id="boxSelected">'+'<div id="entitySelectedContent">'+'<div id="entitySelectedVariantList">'+"</div>"+"</div>"+"</div>"+"</div>");return c;};this.isCreatedPageStructure=function(){return(getHTMLTagById("boxSelected5Gift")!=null);};this.putEntity=function(c){this.selected.putEntity(c);};this.getLastAdded=function(){return this.selected.getLastAdded();};this.throwEntity=function(c){this.selected.throwEntity(c);};this.isPresentInSelected=function(c){return this.selected.isPresentInSelected(c);};this.isFull=function(){return this.selected.isFull();};this.isEmpty=function(){return this.selected.isEmpty();};this.getEntityByID=function(c){return this.selected.getEntityByID(c);};}callbackInstructionsAfterLoadFromPage();function PageSelectedQA(a){this.selected=new Selected(a,0);this.getInnerName=function(){return"PageSelectedQA";};this.getShowEntityList=function(){return this.selected.getShowEntityList();};this.getShowEntityIDList=function(){var c=new Array();var d=this.selected.getShowEntityList();for(var b=0;b<d.length;b++){c[c.length]=d[b].getID();}return c;};this.getShowEntityIDNotEmptyList=function(){var c=new Array();var d=this.selected.getShowEntityList();for(var b=0;b<d.length;b++){var f=d[b].getID();if(f.substr(f.indexOf("-")+1)!="0"){c[c.length]=f;}}return c;};this.setNewAnswer=function(g){var c=false;for(var d=0;d<this.selected.entityList.length;d++){var f=this.selected.entityList[d].getID();var b=g.getID();if(f.substr(0,f.indexOf("-"))==b.substr(0,b.indexOf("-"))){this.selected.entityList[d]=g;c=true;break;}}if(!(c)){this.selected.entityList[this.selected.entityList.length]=g;}};this.putEntity=function(b){this.selected.putEntity(b);};this.getLastAdded=function(){return this.selected.getLastAdded();};this.throwEntity=function(b){this.selected.throwEntity(b);};this.isPresentInSelected=function(b){return this.selected.isPresentInSelected(b);};this.isPresentInSelectedForQuestionID=function(c){var b=this.getSelectedAnswerForQuestionID(c);return(b!=null);};this.getSelectedAnswerForQuestionID=function(f){var c=this.selected.getShowEntityList();for(var b=0;b<c.length;b++){var d=c[b];if(d.getQuestionID().toLowerCase()===f.toLowerCase()){return d;}}return null;};this.isFull=function(){return this.selected.isFull();};this.clear=function(){return this.selected.clear();};}callbackInstructionsAfterLoadFromPage();function Question(c,b,a){this.id=c;this.text=b;this.answerList=a;this.getID=function(){return this.id;};this.getText=function(){return this.text;};this.getAnswerList=function(){return this.answerList;};}Question.stateFromArray=function(c){var b=new Array();
for(var a=0;a<c["answerIDList"].length;a++){b[a]=new Answer(c["answerIDList"][a],c["answerTextList"][a]);}return new Question(c["id"],c["text"],b);};function Selected(a,b){this.MAX_COUNT_SELECTED_ENTITY=b;this.entityList=a;this.getShowEntityList=function(){var d=new Array();for(var c=0;c<this.entityList.length;c++){d.push((c>=this.entityList.length)?null:this.entityList[c]);}return d;};this.getShowEntityIDList=function(){var d=new Array();for(var c=0;c<this.entityList.length;c++){d.push((c>=this.entityList.length)?null:this.entityList[c].getID());}return d;};this.putEntity=function(c){if(this.isPresentInSelected(c)){return;}if(this.isFull()){return;}this.entityList.push(c);};this.getLastAdded=function(){return this.entityList[length-1];};this.throwEntity=function(c){var f=new Array();for(var d=0;d<this.entityList.length;d++){var g=this.entityList[d];if(g.getID()==c){continue;}f.push(g);}this.entityList=f;};this.throwLast=function(){this.entityList=this.entityList.slice(0,this.entityList.length-1);};this.throwFirst=function(){this.entityList=this.entityList.slice(1,this.entityList.length);};this.isPresentInSelected=function(c){for(var d=0;d<this.entityList.length;d++){var f=this.entityList[d];if(f.getID()==c.getID()){return true;}}return false;};this.isFull=function(){return((this.MAX_COUNT_SELECTED_ENTITY!=0)&&(this.entityList.length>=this.MAX_COUNT_SELECTED_ENTITY));};this.isEmpty=function(){return(this.getShowEntityList().length==0);};this.getEntityByID=function(c){for(var d=0;d<this.entityList.length;d++){e=this.entityList[d];if(e.getID()==c){return e;}}return null;};this.clear=function(){this.entityList=new Array();};}function Shop(d,a,c,b){this.id=d;this.address=a;this.title=c;this.description=b;this.getID=function(){return this.id;};this.getAddress=function(){return this.address;};this.getTitle=function(){return this.title;};this.getDescription=function(){return this.description;};}Shop.stateFromArray=function(a){return new Shop(a["id"],a["address"],a["title"],a["description"]);};function Store(b,a){if(a==null){throw new IllegalArgumentException(""+"Следует указать конкретное Хранилище.");}this.name=b;this.specificStore=a;this.getName=function(){return this.name;};this.memorize=function(c,d){this.specificStore.memorize(c,d);};this.remember=function(c){return this.specificStore.remember(c);};this.forget=function(c){this.specificStore.forget(c);};}Store.createUID=function(b){var a=Store.createHashByText(b+(Math.random()*500000));return a;};Store.createHashByText=function(a){return md5((a==null)?"0":a);};function StoreCookie(a){this.name=a;this.getName=function(){return this.name;};this.memorize=function(d,g,j){var h=this.createCookieName(this.name,d);var b=null;if("undefined"!=typeof j){var c=new Date();b=new Date(c.getTime()+j);}var f=buildCookieString(g);this.setCookie(h,f,b);};this.remember=function(b){var f=this.createCookieName(this.name,b);var c=this.getCookie(f);var d=((c==null)?null:c.explodeCookieString());return d;};this.forget=function(b){var c=this.createCookieName(this.name,b);this.deleteCookie(c);};this.createCookieName=function(c,b){var d=this.createHash(c+b);return d;};this.createHash=function(b){return Store.createHashByText(b);};this.buildCookieString=function(b){throw new IllegalArgumentException("Перемещено в utils.js");};this.explodeCookieString=function(b){throw new IllegalArgumentException("Перемещено в utils.js");};this.setCookie=function(f,h,c,k,g,j){var b=f+"="+escape(h);var d=""+b+((c)?"; expires="+c.toGMTString():"")+((k)?"; path="+k:"")+((g)?"; domain="+g:"")+((j)?"; secure":"")+"";if(b.length>4000){throw new IllegalArgumentException("Превышение лимита 4000 Кб.");}document.cookie=d;};this.getCookie=function(b){var d=b+"=";var c=document.cookie.indexOf(d);if(c==-1){return null;}var f=document.cookie.indexOf(";",c+d.length);if(f==-1){f=document.cookie.length;}return unescape(document.cookie.substring(c+d.length,f));};this.deleteCookie=function(b,d,c){if(!this.getCookie(b)){return;}document.cookie=""+b+"="+ +((d)?"; path="+d:"")+((c)?"; domain="+c:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"+"";};}function ThroughInfo(a){this.infoList=a;this.createFormatProtocol1=function(){var g="";for(var h in this.infoList){if(("toSourceObject"==h)){continue;}var f=this.infoList[h];if(!(f instanceof Array)){f=new Array();f.push(this.infoList[h]);}var b="";for(var d=0;d<f.length;d++){var c=typeof f[d];switch(c){case"string":case"number":if(null!=f[d]){b+=f[d]+",";}default:continue;}}g+=h+":"+b.substr(0,b.length-1)+";";}return g.substr(0,g.length-1);};}ThroughInfo.memorizeValue=function(d,c,b){switch(d){case"SystemStateGuide":var a=new StoreCookie(d);a.memorize(c,b);break;default:throw new IllegalArgumentException(""+"Справочник отсутствует в списке допустимых."+" Получено: ["+d+"]");}};ThroughInfo.rememberValue=function(d,c){var a=new StoreCookie(d);var b=a.remember(c);return b;};function TooltipLoader(url,contentID,whither,params,isCreateCloseButton){this.url=(null==url)?"/classes/Backend/tooltip.php":url;this.contentID=contentID;this.whither=(null==whither)?("tooltipInline_"+contentID):whither;this.isCreateCloseButton=isCreateCloseButton&&true;this.idForTimeoutLoad=null;this.idForTimeoutHide=null;this.params=(null==params)?new Object():params;this.data=(("undefined"==typeof params)||(null==params)||("undefined"==typeof params.data)?null:params.data);this.getURL=function(){return this.url;};this.loadContent=function(e){var windowID="tooltipLoader_"+this.contentID;var node=getHTMLTagById(this.whither);
addHandler(node,"mouseout",function(e){var target=e.relatedTarget||e.toElement;if(!isParent(target,node)){window[windowID].hideContentWithPause();}});if(this.params.isLeaveWindowOnMouseOut!=true){addHandler(node,"mouseover",function(e){var target=e.relatedTarget||e.toElement;if(!isParent(target,node)){window[windowID].cancelHideContent();}});}var coords=mousePageXY(e);var coordsX=coords.x;var deltaX=("undefined"==typeof this.params.deltaX)?-221:this.params.deltaX;var x=coordsX+deltaX;if(x<14){x=14;}var coordsY=coords.y;var deltaY=("undefined"==typeof this.params.deltaY)?-77:this.params.deltaY;var y=coordsY+deltaY;if(y<14){y=14;}node.style.left=x+"px";node.style.top=y+"px";node.innerHTML=""+"<img "+' src="images/loading-m.gif"'+' alt="Загрузка....."'+"/>";node.style.display="block";var request=new RequestAJAX();request.loadTooltipContent(this.url,this.contentID,this.whither,this.isCreateCloseButton,this.data);};this.loadContentWithPause=function(e){this.loadContentByTimer(e,4100);};this.loadContentByTimer=function(e,waitTime){var windowID="tooltipLoader_"+this.contentID;this.idForTimeoutLoad=(setTimeout('window["'+windowID+'"]'+'.loadContentBySourceEvent("'+toSourceObject(e)+'");',waitTime));};this.loadContentBySourceEvent=function(sourceEvent){var e=eval("new Object("+sourceEvent+");");this.loadContent(e);};this.cancelLoadContent=function(){clearTimeout(this.idForTimeoutLoad);this.idForTimeoutLoad=null;};this.hideContent=function(){getHTMLTagById(this.whither).style.display="none";getHTMLTagById(this.whither).innerHTML="";};this.hideContentWithPause=function(){var windowID="tooltipLoader_"+this.contentID;this.idForTimeoutHide=(setTimeout('window["'+windowID+'"]'+'.hideContent("'+this.whither+'");',950));};this.cancelHideContent=function(){clearTimeout(this.idForTimeoutHide);this.idForTimeoutHide=null;};}var UTF8={encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var f=0;f<b.length;f++){var d=b.charCodeAt(f);if(d<128){a+=String.fromCharCode(d);}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128);}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128);}}}return a;},decode:function(a){var b="";var d=0;var f=c1=c2=0;while(d<a.length){f=a.charCodeAt(d);if(f<128){b+=String.fromCharCode(f);d++;}else{if((f>191)&&(f<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((f&31)<<6)|(c2&63));d+=2;}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((f&15)<<12)|((c2&63)<<6)|(c3&63));d+=3;}}}return b;}};var page=new Page();window.onload=function start(){};function loadPage(a){var d=a;var f=getParamsForThisPage();var c="http://dalion.ua/scripts/Page/";try{page.createPageByNameSimplyWithParams(d,f,c);}catch(b){throw b;}}function getStartPage(){var a=null;if((a==null)||(a=="")){if("undefined"!=typeof locationParamList["page"]){a=locationParamList["page"];}}if((a==null)||(a=="")){a="PageChoiceAndSelectedGift";}return a;}function getParamsForThisPage(){var f=new Object();var c=window.location.search.createHREFParamList();for(var a in c){var b=c[a];var g=a.indexOf("params.");if(("string"==typeof b)&&(g==0)){var d=a.split(".");f[d[1]]=b;}}return f;}PATH_REPOSITORIE_ENTITY="repositories/dalion/searchdalion/";PATH_REPOSITORIE_GIFT="repositories/dalion/searchdalion/gift/";PATH_REPOSITORIE_SHOP="repositories/dalion/searchdalion/shop/";PATH_REPOSITORIE_DELIVERY="repositories/dalion/searchdalion/delivery/";var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var is_nav=((agt.indexOf("mozilla")!=-1)&&(agt.indexOf("spoofer")==-1)&&(agt.indexOf("compatible")==-1)&&(agt.indexOf("opera")==-1)&&(agt.indexOf("webtv")==-1)&&(agt.indexOf("hotjava")==-1));var is_nav2=(is_nav&&(is_major==2));var is_nav3=(is_nav&&(is_major==3));var is_nav4=(is_nav&&(is_major==4));var is_nav4up=(is_nav&&(is_major>=4));var is_navonly=(is_nav&&((agt.indexOf(";nav")!=-1)||(agt.indexOf("; nav")!=-1)));var is_nav6=(is_nav&&(is_major==5));var is_nav6up=(is_nav&&(is_major>=5));var is_gecko=(agt.indexOf("gecko")!=-1);var is_chrome=(agt.indexOf("chrome")!=-1);var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var is_ie3=(is_ie&&(is_major<4));var is_ie4=(is_ie&&(is_major==4)&&(agt.indexOf("msie 4")!=-1));var is_ie4up=(is_ie&&(is_major>=4));var is_ie5=(is_ie&&(is_major==4)&&(agt.indexOf("msie 5.0")!=-1));var is_ie5_5=(is_ie&&(is_major==4)&&(agt.indexOf("msie 5.5")!=-1));var is_ie5up=(is_ie&&!is_ie3&&!is_ie4);var is_ie5_5up=(is_ie&&!is_ie3&&!is_ie4&&!is_ie5);var is_ie6=(is_ie&&(is_major==4)&&(agt.indexOf("msie 6.")!=-1));var is_ie6up=(is_ie&&!is_ie3&&!is_ie4&&!is_ie5&&!is_ie5_5);var is_aol=(agt.indexOf("aol")!=-1);var is_aol3=(is_aol&&is_ie3);var is_aol4=(is_aol&&is_ie4);var is_aol5=(agt.indexOf("aol 5")!=-1);var is_aol6=(agt.indexOf("aol 6")!=-1);var is_opera=(agt.indexOf("opera")!=-1);var is_opera2=(agt.indexOf("opera 2")!=-1||agt.indexOf("opera/2")!=-1);var is_opera3=(agt.indexOf("opera 3")!=-1||agt.indexOf("opera/3")!=-1);var is_opera4=(agt.indexOf("opera 4")!=-1||agt.indexOf("opera/4")!=-1);var is_opera5=(agt.indexOf("opera 5")!=-1||agt.indexOf("opera/5")!=-1);var is_opera6=(agt.indexOf("opera 6")!=-1||agt.indexOf("opera/6")!=-1);var is_opera5up=(is_opera&&!is_opera2&&!is_opera3&&!is_opera4);var is_webtv=(agt.indexOf("webtv")!=-1);var is_TVNavigator=((agt.indexOf("navio")!=-1)||(agt.indexOf("navio_aoltv")!=-1));var is_AOLTV=is_TVNavigator;var is_hotjava=(agt.indexOf("hotjava")!=-1);
var is_hotjava3=(is_hotjava&&(is_major==3));var is_hotjava3up=(is_hotjava&&(is_major>=3));var is_js;if(is_nav2||is_ie3){is_js=1;}else{if(is_nav3){is_js=1.1;}else{if(is_opera5up){is_js=1.3;}else{if(is_opera){is_js=1.1;}else{if((is_nav4&&(is_minor<=4.05))||is_ie4){is_js=1.2;}else{if((is_nav4&&(is_minor>4.05))||is_ie5){is_js=1.3;}else{if(is_hotjava3up){is_js=1.4;}else{if(is_nav6||is_gecko){is_js=1.5;}else{if(is_nav6up){is_js=1.5;}else{if(is_ie5up){is_js=1.3;}else{is_js=0;}}}}}}}}}}var hexcase=0;var b64pad="";var chrsz=8;function md5(a){return hex_md5(a);}function hex_md5(a){return binl2hex(core_md5(str2binl(a),a.length*chrsz));}function b64_md5(a){return binl2b64(core_md5(str2binl(a),a.length*chrsz));}function str_md5(a){return binl2str(core_md5(str2binl(a),a.length*chrsz));}function hex_hmac_md5(a,b){return binl2hex(core_hmac_md5(a,b));}function b64_hmac_md5(a,b){return binl2b64(core_hmac_md5(a,b));}function str_hmac_md5(a,b){return binl2str(core_hmac_md5(a,b));}function md5_vm_test(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72";}function core_md5(r,l){r[l>>5]|=128<<((l)%32);r[(((l+64)>>>9)<<4)+14]=l;var q=1732584193;var p=-271733879;var o=-1732584194;var m=271733878;for(var h=0;h<r.length;h+=16){var k=q;var j=p;var g=o;var f=m;q=md5_ff(q,p,o,m,r[h+0],7,-680876936);m=md5_ff(m,q,p,o,r[h+1],12,-389564586);o=md5_ff(o,m,q,p,r[h+2],17,606105819);p=md5_ff(p,o,m,q,r[h+3],22,-1044525330);q=md5_ff(q,p,o,m,r[h+4],7,-176418897);m=md5_ff(m,q,p,o,r[h+5],12,1200080426);o=md5_ff(o,m,q,p,r[h+6],17,-1473231341);p=md5_ff(p,o,m,q,r[h+7],22,-45705983);q=md5_ff(q,p,o,m,r[h+8],7,1770035416);m=md5_ff(m,q,p,o,r[h+9],12,-1958414417);o=md5_ff(o,m,q,p,r[h+10],17,-42063);p=md5_ff(p,o,m,q,r[h+11],22,-1990404162);q=md5_ff(q,p,o,m,r[h+12],7,1804603682);m=md5_ff(m,q,p,o,r[h+13],12,-40341101);o=md5_ff(o,m,q,p,r[h+14],17,-1502002290);p=md5_ff(p,o,m,q,r[h+15],22,1236535329);q=md5_gg(q,p,o,m,r[h+1],5,-165796510);m=md5_gg(m,q,p,o,r[h+6],9,-1069501632);o=md5_gg(o,m,q,p,r[h+11],14,643717713);p=md5_gg(p,o,m,q,r[h+0],20,-373897302);q=md5_gg(q,p,o,m,r[h+5],5,-701558691);m=md5_gg(m,q,p,o,r[h+10],9,38016083);o=md5_gg(o,m,q,p,r[h+15],14,-660478335);p=md5_gg(p,o,m,q,r[h+4],20,-405537848);q=md5_gg(q,p,o,m,r[h+9],5,568446438);m=md5_gg(m,q,p,o,r[h+14],9,-1019803690);o=md5_gg(o,m,q,p,r[h+3],14,-187363961);p=md5_gg(p,o,m,q,r[h+8],20,1163531501);q=md5_gg(q,p,o,m,r[h+13],5,-1444681467);m=md5_gg(m,q,p,o,r[h+2],9,-51403784);o=md5_gg(o,m,q,p,r[h+7],14,1735328473);p=md5_gg(p,o,m,q,r[h+12],20,-1926607734);q=md5_hh(q,p,o,m,r[h+5],4,-378558);m=md5_hh(m,q,p,o,r[h+8],11,-2022574463);o=md5_hh(o,m,q,p,r[h+11],16,1839030562);p=md5_hh(p,o,m,q,r[h+14],23,-35309556);q=md5_hh(q,p,o,m,r[h+1],4,-1530992060);m=md5_hh(m,q,p,o,r[h+4],11,1272893353);o=md5_hh(o,m,q,p,r[h+7],16,-155497632);p=md5_hh(p,o,m,q,r[h+10],23,-1094730640);q=md5_hh(q,p,o,m,r[h+13],4,681279174);m=md5_hh(m,q,p,o,r[h+0],11,-358537222);o=md5_hh(o,m,q,p,r[h+3],16,-722521979);p=md5_hh(p,o,m,q,r[h+6],23,76029189);q=md5_hh(q,p,o,m,r[h+9],4,-640364487);m=md5_hh(m,q,p,o,r[h+12],11,-421815835);o=md5_hh(o,m,q,p,r[h+15],16,530742520);p=md5_hh(p,o,m,q,r[h+2],23,-995338651);q=md5_ii(q,p,o,m,r[h+0],6,-198630844);m=md5_ii(m,q,p,o,r[h+7],10,1126891415);o=md5_ii(o,m,q,p,r[h+14],15,-1416354905);p=md5_ii(p,o,m,q,r[h+5],21,-57434055);q=md5_ii(q,p,o,m,r[h+12],6,1700485571);m=md5_ii(m,q,p,o,r[h+3],10,-1894986606);o=md5_ii(o,m,q,p,r[h+10],15,-1051523);p=md5_ii(p,o,m,q,r[h+1],21,-2054922799);q=md5_ii(q,p,o,m,r[h+8],6,1873313359);m=md5_ii(m,q,p,o,r[h+15],10,-30611744);o=md5_ii(o,m,q,p,r[h+6],15,-1560198380);p=md5_ii(p,o,m,q,r[h+13],21,1309151649);q=md5_ii(q,p,o,m,r[h+4],6,-145523070);m=md5_ii(m,q,p,o,r[h+11],10,-1120210379);o=md5_ii(o,m,q,p,r[h+2],15,718787259);p=md5_ii(p,o,m,q,r[h+9],21,-343485551);q=safe_add(q,k);p=safe_add(p,j);o=safe_add(o,g);m=safe_add(m,f);}return Array(q,p,o,m);}function md5_cmn(j,f,d,c,h,g){return safe_add(bit_rol(safe_add(safe_add(f,j),safe_add(c,g)),h),d);}function md5_ff(h,g,m,l,f,k,j){return md5_cmn((g&m)|((~g)&l),h,g,f,k,j);}function md5_gg(h,g,m,l,f,k,j){return md5_cmn((g&l)|(m&(~l)),h,g,f,k,j);}function md5_hh(h,g,m,l,f,k,j){return md5_cmn(g^m^l,h,g,f,k,j);}function md5_ii(h,g,m,l,f,k,j){return md5_cmn(m^(g|(~l)),h,g,f,k,j);}function core_hmac_md5(c,g){var f=str2binl(c);if(f.length>16){f=core_md5(f,c.length*chrsz);}var a=Array(16),d=Array(16);for(var b=0;b<16;b++){a[b]=f[b]^909522486;d[b]=f[b]^1549556828;}var h=core_md5(a.concat(str2binl(g)),512+g.length*chrsz);return core_md5(d.concat(h),512+128);}function safe_add(a,d){var c=(a&65535)+(d&65535);var b=(a>>16)+(d>>16)+(c>>16);return(b<<16)|(c&65535);}function bit_rol(a,b){return(a<<b)|(a>>>(32-b));}function str2binl(d){var c=Array();var a=(1<<chrsz)-1;for(var b=0;b<d.length*chrsz;b+=chrsz){c[b>>5]|=(d.charCodeAt(b/chrsz)&a)<<(b%32);}return c;}function binl2str(c){var d="";var a=(1<<chrsz)-1;for(var b=0;b<c.length*32;b+=chrsz){d+=String.fromCharCode((c[b>>5]>>>(b%32))&a);}return d;}function binl2hex(c){var b=hexcase?"0123456789ABCDEF":"0123456789abcdef";var d="";for(var a=0;a<c.length*4;a++){d+=b.charAt((c[a>>2]>>((a%4)*8+4))&15)+b.charAt((c[a>>2]>>((a%4)*8))&15);}return d;}function binl2b64(d){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var g="";for(var b=0;b<d.length*4;b+=3){var f=(((d[b>>2]>>8*(b%4))&255)<<16)|(((d[b+1>>2]>>8*((b+1)%4))&255)<<8)|((d[b+2>>2]>>8*((b+2)%4))&255);for(var a=0;a<4;a++){if(b*8+a*6>d.length*32){g+=b64pad;}else{g+=c.charAt((f>>6*(3-a))&63);}}}return g;}var IS_DEBUG=false;function addBookmark(c,d){if(!c){c=location.href;
}if(!d){d=document.title;}if((typeof window.sidebar=="object")&&(typeof window.sidebar.addPanel=="function")){window.sidebar.addPanel(d,c,"");}else{if(typeof window.external=="object"){window.external.AddFavorite(c,d);}else{if(window.opera&&document.createElement){var b=document.createElement("A");if(!b){return false;}b.setAttribute("rel","sidebar");b.setAttribute("href",c);b.setAttribute("title",d);b.click();}else{return false;}}}return true;}function showTopSuccess(a){showTopInfo(a,2);}function showTopError(a){showTopInfo(a,1);}function showTopMessage(a){showTopInfo(a,2);}function showTopInfo(a,b){($.browser.msie?setTimeout("showTopInfoAfterDocumentReady('"+a+"', '"+b+"');",1000):showTopInfoAfterDocumentReady(a,b));}function showTopInfoAfterDocumentReady(b,c){$("#idShowTopInfo").remove();var a={color:"#250",backgroundColor:"#cc0",timeShow:5000};if(c==1){var a={color:"#fff",backgroundColor:"#c00",timeShow:5000};}if(c==3){var a={color:"#fff",backgroundColor:"#250",timeShow:5000};}$("body").prepend('<div id="idShowTopInfo" style="position: absolute; z-index: 5000; opacity: 0; width: 100%; left: 0; top: 0; margin-left: 0; margin-right: 0; text-align: center; color: '+a.color+"; background-color: "+a.backgroundColor+';">'+b+"</div>");$("#idShowTopInfo").animate({opacity:"1"},500);if(a.timeShow>0){setTimeout(function(){$("#idShowTopInfo").animate({opacity:"0"},2300);},a.timeShow);}$("#idShowTopInfo").click(function(){$(this).animate({opacity:"0"},500);});}function goFromChild(a){if(opener){if(opener.closed){window.open(a,"");}else{if(opener.location.href.search(a)==-1){opener.location.href=a;}}self.close();return false;}return true;}function blinkByID(b,c){if(c==null){c=0;}if(c>5){return;}var a=getHTMLTagById(b);if(!a){return;}c++;n=new Number(c/2);a.style.display=((n.toFixed(0)==n)?"block":"none");setTimeout("blinkByID("+'"'+b+'"'+", "+c+")",230);}function showhide(b){var a=getHTMLTagById(b);a.style.display=((a.style.display=="none")||(a.style.display=="")?"block":"none");}function show(b){var a=getHTMLTagById(b);a.style.display="block";}function hide(b){var a=getHTMLTagById(b);a.style.display="none";}function updateTagHTML(a,c){var b=getHTMLTagById(a);if(b==null){return;}if(b.innerHTML!=c){b.innerHTML=c;}}function updateTagHREF(a,c){var b=getHTMLTagById(a);if(b==null){return;}if("undefined"!=typeof b.href){b.href=c;}}function changeColorForTagList(c,b){for(var a=0;a<c.length;a++){getHTMLTagById(c[a]).style.color=b;}}function getHTMLTagById(a){return(document.getElementById?document.getElementById(a):(document.all?document.all[a]:(document.layers?document.layers[a]:null)));}function isPresentHTMLTagById(a){return(getHTMLTagById(a)!=null);}function getElementListByName(c,b){var f=document.getElementsByTagName(b);var a=new Array();for(var d=0;d<f.length;d++){if(f[d].name==c){a[a.length]=f[d];}}return a;}function addHandler(c,a,b){if(c.addEventListener){c.addEventListener(a,b,false);}else{c.attachEvent("on"+a,b);}}function isParent(c,b){if(!c||!b){return false;}while(true){if(c==b){return true;}try{if(c.parentElement){c=c.parentElement;}else{if(c.parentNode){c=c.parentNode;}else{return false;}}}catch(a){return false;}}}function getBoundsByID(a){return getBounds(getHTMLTagById(a));}function getBounds(a){var d=a.offsetLeft;var c=a.offsetTop;for(var b=a.offsetParent;b;b=b.offsetParent){d+=b.offsetLeft-b.scrollLeft;c+=b.offsetTop-b.scrollTop;}return{left:d,top:c,width:a.offsetWidth,height:a.offsetHeight};}function unrollWindowByHeight(){if((getWindowHeight()+24)>=screen.availHeight){return;}var a=Math.round((1-getWindowHeight()/screen.availHeight)*50);window.resizeBy(0,(a<=0)?1:a);setTimeout(function(){unrollWindowByHeight();},23);}function getScrollXY(){var b=0;var a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft;}}}return{x:b,y:a};}function getDocumentHeight(){return((document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight);}function getDocumentWidth(){return((document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth);}function getWindowHeight(){return(self.innerHeight?self.innerHeight:(document.documentElement&&document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body?document.body.clientHeight:640);}function getWindowWidth(){return(self.innerWidth?self.innerWidth:(document.documentElement&&document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body?document.body.clientWidth:800);}function createScript(c,d){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("charset",d);a.setAttribute("src",c);var b=document.getElementsByTagName("head").item(0);b.insertBefore(a,b.firstChild);}function callbackInstructionsAfterLoadFromPage(){if("undefined"===typeof Page){return;}if(null===Page.runCurrentInstructionsAfterLoad){return;}eval(Page.runCurrentInstructionsAfterLoad);Page.runCurrentInstructionsAfterLoad=null;}function mousePageXY(b){var a=0,c=0;if(!b){b=window.event;}if(b.pageX||b.pageY){a=b.pageX;c=b.pageY;}else{if(b.clientX||b.clientY){a=(b.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft);
c=(b.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop);}}return{"x":a,"y":c};}function getElementText(a){return a.text||a.textContent||(function(d){var c="";if(d==null){return c;}var f=d.childNodes;var b=0;while(b<f.length){var g=f.item(b);switch(g.nodeType){case 1:case 5:c+=arguments.callee(g);break;case 3:case 2:case 4:c+=g.nodeValue;break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:break;}b++;}return c;}(a));}function rolloverImage(a,g,d,j,f){var b=((j==null)?"gif":j);var h=((g==1)?(a+"_over."+b):(a+"."+b));var c=(d==null)?"":d;getHTMLTagById((f==null)?a:f).src=c+h;}function rolloverBackground(c,a){var b=((a==1)?(c+"_over.gif"):(c+".gif"));getHTMLTagById(c).style.backgroundImage="url(/images/"+b+")";}function rolloverBackgroundColor(f,d,b,c){var a=((c==1)?d:b);getHTMLTagById(f).style.backgroundColor=a;}function preloadImage(a){if("undefined"==typeof a){return;}var c=new Array();for(var b=0;b<a.length;b++){c[b]=new Image();c[b].src=a[b];}}function isEmpty(a){return((a==null)||(a.trim()==""));}if("undefined"==typeof String.prototype.ltrim){String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};}if("undefined"==typeof String.prototype.rtrim){String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};}if("undefined"==typeof String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};}if("undefined"==typeof String.prototype.trimCollapse){String.prototype.trimCollapse=function(){return this.replace(/\s+/g," ").trim();};}if("undefined"==typeof String.prototype.withoutSpecialSymbols){String.prototype.withoutSpecialSymbols=function(){var a=this.changeHTMLSpecialOnHTMLVisual();a=a.replace(/[^a-zA-Zа-яА-Я]+/g," ").trimCollapse();return a;};}if("undefined"==typeof String.prototype.changeHTMLSpecialOnHTMLVisual){String.prototype.changeHTMLSpecialOnHTMLVisual=function(){var a=this;a=a.replace(/&(quot|#34);/,'"');a=a.replace(/&(amp|#38);/,"&");a=a.replace(/&(lt|#60);/,"<");a=a.replace(/&(gt|#62);/,">");a=a.replace(/&(trade|#153);/,"TM");a=a.replace(/&(nbsp|#160);/," ");a=a.replace(/&(iexcl|#161);/,"-");a=a.replace(/&(cent|#162);/,"c");a=a.replace(/&(pound|#163);/,"p");a=a.replace(/&(copy|#169);/,"(C)");a=a.replace(/&(reg|#174);/,"(R)");return a;};}if("undefined"==typeof String.prototype.minLengthWord){String.prototype.minLengthWord=function(b,h){var a=new Array();var c=this.split(h);var f=0;for(var d=0;d<c.length;d++){var g=c[d].trim();if(g.length>=b){a[f]=g;f++;}}return a.implode(h);};}if("undefined"==typeof String.prototype.uniqueWords){String.prototype.uniqueWords=function(g){var c=new Array();var a=this.split(g);var d=0;for(var b=0;b<a.length;b++){var f=a[b].trim();if(!(c.isContain(f))){c[d]=f;d++;}}return c.implode(g);};}if("undefined"==typeof String.prototype.formatAsMoney){String.prototype.formatAsMoney=function(d,f){var c=this.split(" ");var b=Math.floor(c[0]);var g=Math.round((c[0]-b)*100);if(g<10){g="0"+g;}var a=c[1];var h="";if(b==0){h=(d&&f)?1:b;if(!d){h+=","+g;}}else{h=b;if(!d){h+="<sup>"+g+"</sup>";}else{if(g>=50){h++;}}}h+="&nbsp;"+a;return h;};}if("undefined"==typeof String.prototype.createFileInfoFromPath){String.prototype.createFileInfoFromPath=function(){workStr=this.trim();var b=workStr.lastIndexOf("/");if(b<0){b=0;}var a=workStr.indexOf(".",b);if(a<0){a=workStr.length;}return{name:workStr.substr(b+1,a-b-1),extension:workStr.substr(a+1)};};}if("undefined"==typeof String.prototype.parseURL){String.prototype.parseURL=function(){workStrURL=this.trim();var o=0;var m=workStrURL.indexOf("://");if(m<0){m=workStrURL.length;}var d=workStrURL.substr(o,m-o);var k=m+3;var h=workStrURL.indexOf("/",k);if(h<0){h=workStrURL.length;}var f=workStrURL.substr(k,h-k).toLowerCase().replace(/www./,"");var c=h+1;var b=workStrURL.indexOf("?",c);if(b<0){b=workStrURL.length;}var g=workStrURL.substr(c,b-c);var l=b+1;var j=workStrURL.indexOf("#",l);if(j<0){j=workStrURL.length;}var q=workStrURL.substr(l,j-l);var p=j+1;var a=((p>=0)?workStrURL.substr(p):"");return{scheme:d,host:f,path:g,query:q,fragment:a};};}if("undefined"==typeof String.prototype.createHREFParamList){String.prototype.createHREFParamList=function(){var d=((this.indexOf("?")===0)?this.substring(1):this);var b=d.split("&");var a=new Array();for(i=0;i<=b.length-1;i++){var c=b[i].split("=");a[c[0]]=c[1];}return a;};}if("undefined"==typeof String.prototype.explodeCookieString){String.prototype.explodeCookieString=function(){return unserialize(this);};}if("undefined"==typeof String.prototype.isFrameCircleBrackets){String.prototype.isFrameCircleBrackets=function(){var a=this.trim();return((a.indexOf("(")==0)&&(a.lastIndexOf(")")==(a.length-1)));};}if("undefined"==typeof String.prototype.isFrameAboveSmallBrackets){String.prototype.isFrameAboveSmallBrackets=function(){var a=this.trim();return(((a.indexOf("<")==0)||(a.indexOf("&#60;")==0))&&((a.lastIndexOf(">")==(a.length-1))||(a.lastIndexOf("&#62;")==(a.length-"&#62;".length))));};}if("undefined"==typeof String.prototype.isEmail){String.prototype.isEmail=function(){var a=this.trim();return(a.match(/^(.+)@(.+)$/)!=null);};}if("undefined"==typeof String.prototype.toHTML){String.prototype.toHTML=function(){return this.replace(/\r\n/g,"<br>");};}if("undefined"==typeof Array.prototype.toStringList){Array.prototype.toStringList=function(f,g){if("undefined"===typeof f){f=", ";}if("undefined"===typeof g){g=false;}var b="";var a=(g==true)?"":"'";for(var d=0;d<this.length;d++){var c=this[d];if(c instanceof Array){c=this[d].toStringList(f,g);
}else{if(c instanceof Object){c=toSourceObject(this[d]);}}b+=a+c+a+f;}return b.substr(0,b.length-(new String(f)).length);};}if("undefined"==typeof Array.prototype.implode){Array.prototype.implode=function(c){var a="";for(var b=0;b<this.length;b++){a+=this[b]+c;}return a.substr(0,a.length-(new String(c)).length);};}if("undefined"==typeof Array.prototype.isContain){Array.prototype.isContain=function(b){var d=((b==null)?null:b.toLowerCase());for(var a=0;a<this.length;a++){var c=((this[a]==null)?null:this[a].toLowerCase());if(d==c){return true;}}return false;};}if("undefined"==typeof Array.prototype.isContainAll){Array.prototype.isContainAll=function(a){if(a==null){return false;}for(var b=0;b<a.length;b++){if(!this.isContain(a[b])){return false;}}return true;};}if("undefined"==typeof Array.prototype.unique){Array.prototype.unique=function(){var b=[];for(var d=0;d<this.length;d++){for(var c=d+1;c<this.length;c++){if(this[d]==this[c]){c=++d;}}b.push(this[d]);}return b;};}if("undefined"==typeof Array.prototype.pushUnique){Array.prototype.pushUnique=function(b){for(var a=0;a<this.length;a++){if(this[a]==b){return;}}this.push(b);};}if("undefined"==typeof Array.prototype.remove){Array.prototype.remove=function(b){for(var a=0;a<this.length;a++){if(this[a]==b){this.splice(a,1);break;}}};}if("undefined"==typeof Array.prototype.isEmptyString){Array.prototype.isEmptyString=function(){for(var a=0;a<this.length;a++){if((this[a]!==null)&&(this[a]!=="")){return false;}}return true;};}if("undefined"==typeof Array.prototype.createStateListFromObjectList){Array.prototype.createStateListFromObjectList=function(){var a=new Array();for(var b=0;b<this.length;b++){a.push(this[b].stateToArray());}return a;};}if("undefined"==typeof Array.prototype.shuffle){Array.prototype.shuffle=function(){this.sort(function(){return 0.5-Math.random();});return true;};}extend=function(a,c){function b(){}b.prototype=c.prototype;a.prototype=new b();a.prototype.constructor=a;a.baseConstructor=c;a.superClass=c.prototype;};function toSourceObject(f){var b="{ ";var d=null;for(var c in f){d=f[c];var a=f[c];if("object"==typeof d){a="{}";}if("boolean"===typeof d){}if("number"===typeof d){}if("function"===typeof d){continue;}if("undefined"===typeof d){a=null;}if((null!==d)&&(d instanceof Array)){a="new Array("+d.toStringList(undefined,false)+")";}if("string"===typeof d){a="'"+d+"'";}b+=c+": "+a+", ";}if(d!==null){b=b.substr(0,b.length-2);}return(b+" }");}function serialize(f){var g=function(o){var m=typeof o,k;if(m=="object"&&!o){return"null";}if(m=="object"){if(!o.constructor){return"object";}var j=o.constructor.toString();if(k=j.match(/(\w+)\(/)){j=k[1].toLowerCase();}var l=["boolean","number","string","array","function"];for(key in l){if(j==l[key]){m=l[key];break;}}}return m;};var b=g(f);var h;switch(b){case"undefined":h="N";break;case"boolean":h="b:"+(f?"1":"0");break;case"number":h=(Math.round(f)==f?"i":"d")+":"+f;break;case"string":h="s:"+f.length+':"'+f+'"';break;case"array":case"object":h="a";var c=0;var d="";var a;for(key in f){if("function"==typeof f[key]){continue;}a=(key.match(/^[0-9]+$/)?parseInt(key):key);d+=serialize(a)+serialize(f[key]);c++;}h+=":"+c+":{"+d+"}";break;default:h="N";break;}if((b!="object")&&(b!="array")){h+=";";}return h;}function unserialize(d){var a=function(j,k,h,g){throw new window[j](k,h,g);};var f=function(k,m,l){var g=[];var j=k.slice(m,m+1);var h=2;while(j!=l){if((h+m)>k.length){a("Error","Invalid");}g.push(j);j=k.slice(m+(h-1),m+h);h+=1;}return[g.length,g.join("")];};var c=function(k,l,j){buf=[];for(var g=0;g<j;g++){var h=k.slice(l+(g-1),l+g);buf.push(h);}return[buf.length,buf.join("")];};var b=function(B,k){if(!k){k=0;}var y=[];var z=(B.slice(k,k+1)).toLowerCase();var p=k+2;var x=new Function("x","return x");var r=0;var o=0;switch(z){case"i":x=new Function("x","return parseInt(x)");var h=f(B,p,";");var r=h[0];var A=h[1];p+=r+1;break;case"b":x=new Function("x","return (parseInt(x) == 1)");var h=f(B,p,";");var r=h[0];var A=h[1];p+=r+1;break;case"d":x=new Function("x","return parseFloat(x)");var h=f(B,p,";");var r=h[0];var A=h[1];p+=r+1;break;case"n":A=null;break;case"s":var l=f(B,p,":");var r=l[0];var g=l[1];p+=r+2;var h=c(B,p+1,parseInt(g));var r=h[0];var A=h[1];p+=r+2;if(r!=parseInt(g)&&r!=A.length){throw new IllegalArgumentException("SyntaxError. String length mismatch."+" Data: ["+B+"]");}break;case"a":var A={};var w=f(B,p,":");var r=w[0];var q=w[1];p+=r+2;for(var v=0;v<parseInt(q);v++){var j=b(B,p);var s=j[1];var C=j[2];p+=s;var u=b(B,p);var m=u[1];var t=u[2];p+=m;A[C]=t;}p+=1;break;default:throw new IllegalArgumentException("SyntaxError. Unknown / Unhandled data type(s): ["+z+"]"+" Data: ["+B+"]");break;}return[z,p-k,x(A)];};return b(d,0)[2];}function base64_encode(a){}function base64_decode(j){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var c,b,a,o,m,l,k,p,h=ac=0,f="",g=[];j+="";do{o=d.indexOf(j.charAt(h++));m=d.indexOf(j.charAt(h++));l=d.indexOf(j.charAt(h++));k=d.indexOf(j.charAt(h++));p=o<<18|m<<12|l<<6|k;c=p>>16&255;b=p>>8&255;a=p&255;if(l==64){g[ac++]=String.fromCharCode(c);}else{if(k==64){g[ac++]=String.fromCharCode(c,b);}else{g[ac++]=String.fromCharCode(c,b,a);}}}while(h<j.length);f=g.join("");f=utf8_decode(f);return f;}function utf8_encode(d){d=(d+"").replace(/\r\n/g,"\n");var b="";var j,a;var g=0;j=a=0;g=d.length;for(var h=0;h<g;h++){var f=d.charCodeAt(h);var c=null;if(f<128){a++;}else{if((f>127)&&(f<2048)){c=String.fromCharCode((f>>6)|192)+String.fromCharCode((f&63)|128);
}else{c=String.fromCharCode((f>>12)|224)+String.fromCharCode(((f>>6)&63)|128)+String.fromCharCode((f&63)|128);}}if(c!=null){if(a>j){b+=d.substring(j,a);}b+=c;j=a=h+1;}}if(a>j){b+=d.substring(j,d.length);}return b;}function utf8_decode(a){var b=[],c=ac=c1=c2=c3=0;a+="";while(c<a.length){c1=a.charCodeAt(c);if(c1<128){b[ac++]=String.fromCharCode(c1);c++;}else{if((c1>191)&&(c1<224)){c2=a.charCodeAt(c+1);b[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));c+=2;}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));c+=3;}}}return b.join("");}function buildCookieString(a){return serialize(a);}function createObjectListFromStateList(obj,className){var resultList=createListFromObject(obj);var out=new Array();for(var i=0;i<resultList.length;i++){var obj=eval(className+".stateFromArraySerialize('"+serialize(resultList[i])+"');");out.push(obj);}return out;}function createListFromObject(g){var c=new Array();var f=false;for(i in g){var d=typeof i;var b=!isNaN(i);if(("string"==d)&&b&&(i=="0")){f=true;break;}}if(!f){return g;}for(i in g){var d=typeof i;var b=!isNaN(i);if(("string"==d)&&b){var a=g[i];c.push(a);}}return c;}function clone(d){if(!d||("object"!=typeof d)){return d;}var f=(("function"==typeof d.pop)?[]:{});for(var b in d){if(d.hasOwnProperty(b)){var a=d[b];f[b]=((a&&("object"==typeof a))?clone(a):a);}}return f;}function createHash(a){return md5((a==null)?"0":a);}function isRobot(){var c=navigator.userAgent.toLowerCase();var a=new Array("yandex/","yadirectbot/","yandexblog/","yandexsomething/","james bond","googlebot","mediapartners-google","gsa-crawler","stackrambler","ysearch/slurp","msnbot","aportcatalogrobot","ia_archiver","gigablast.com","sape.bot","cuil.com");for(var b=0;b<a.length;b++){if(c.indexOf(a[b])>=0){return true;}}return false;}
