jsFileName="System.js";
function $import(_1,_2){
var i,_4,_5=document.getElementsByTagName("script");
for(i=0;i<_5.length;i++){
if(_5[i].src.match(_1)){
_4=_5[i].src.replace(_1,"");
break;
}
}
document.write("<script src=\""+_4+_2+"\"></script>");
};
addEvent_Bronni=function(el,_7,_8){
if(el.attachEvent){
el.attachEvent("on"+_7,_8);
}else{
if(el.addEventListener){
el.addEventListener(_7,_8,true);
}else{
el["on"+_7]=_8;
}
}
};
function setValuetoField(id,_a){
var _b=document.getElementById(id);
if(_b&&_a>-1){
_b.value=_a;
}
};
function quotesStr(_c){
return "\""+_c+"\"";
};
function strToInt(_d){
if(_d!=null){
var _e=_d.lastIndexOf("px");
if(_e>=0){
_d=_d.substring(0,_e);
}
}
var _f;
_f=parseInt(_d);
if(!isNaN(_f)){
return _f;
}else{
return -1;
}
};
function strToIntArray(str){
var obj=[];
if(str.length>0){
obj=str.split(",");
for(i=0;i<obj.length;i++){
obj[i]=strToInt(obj[i]);
}
}
return obj;
};
function getHref(_12,_13){
if((_13==true)||(_13=="true")){
return "javascript: windowOpen(\""+_12+"\", 950, 600, \"\", \"true\");";
}else{
return _12;
}
};
function getParam(_14){
var _15=new Array();
var _16=new Array();
var _17=new Array();
var _18=location.search;
if(_18!=""){
_15=(_18.substr(1)).split("&");
for(var i=0;i<_15.length;i++){
_16=_15[i].split("=");
_17[_16[0]]=_16[1];
}
}
return _17[_14];
};
function CreateDictionaryFromQueryString(){
var _1a;
var _1b=location.search;
if(_1b!=""){
var _1c=_1b.substring(1).split("&");
var _1d=_1c.length;
_1a=new Array(_1d);
for(var _1e=0;_1e<_1d;_1e++){
var _1f=_1c[_1e].split("=");
_1a[_1f[0]]=_1f[1];
}
}else{
_1a=new Array();
}
return _1a;
};
function CreateScript(_20,_21,_22,_23){
if(_20!=null){
var _24=_20.createElement("script");
_24.setAttribute("id","documentScript");
_24.setAttribute("type","text/javascript");
if(_21!=""){
_24.setAttribute("src",_21);
}
if(_23!=""){
_24.text=_23;
}
var _25=_20.getElementById(_22);
if(_25!=null){
_25.appendChild(_24);
}
}
};
function GetWindowOpenerAcquirableData(_26){
var _27=null;
if(_26!=null){
var _28=_26.opener;
if(_28!=null){
_27=_28.acquirableData;
}
}
return _27;
};
function getHotelImageUriOfParticularType(_29,_2a,_2b,_2c){
var _2d="00000000-0000-0000-0000-000000000000";
if(_29.length>0){
var _2e=null;
if(_2a!=""){
for(var _2f in _29){
if(_29[_2f].type.toLowerCase()==_2a.toLowerCase()){
_2e=_29[_2f];
break;
}
}
}
if(_2e==null){
_2e=_29[0];
}
_2d=_2e.guid;
}
var _30="";
if(_2b!=""){
_30=_2b;
}
var _31="";
if(_2c!=""){
_31=_2c;
}
return remoteUri+"/Handlers/HotelImageHandler.ashx?ImageGuid="+_2d+"&MaximumSize="+_30+","+_31;
};
function getHotelImageOfParticularType(_32,_33,_34,_35){
var _36="";
if(_34!=""){
_36="width='"+_34+"'";
}
var _37="";
if(_35!=""){
_37="height='"+_35+"'";
}
var _38=getHotelImageUriOfParticularType(_32,_33,_34,_35);
if(_38.indexOf("000000")>0){
return "";
}else{
return "<img "+_36+" "+_37+" border='0' src='"+_38+"'>";
}
};
function ChangeFirstDate(){
var fe=document.getElementById("DateFromTextBox");
var se=document.getElementById("DateToTextBox");
var _3b=fe.value;
var _3c=se.value;
var fd=Date.fromFormatString(_3b);
var sd=Date.fromFormatString(_3c);
if(fd>sd){
se.value=fe.value;
}
};
function getReference(_3f,_40,_41,_42,_43){
var _44="";
if(_41!=""){
_44="color: "+_41+";";
}
var _45="";
if(_42!=""){
_45="textDecoration: "+_42+";";
}
var _46="_self";
if(_43!=""){
_46=_43;
}
var _47="";
if(_3f!=null&&_3f!=""){
_47="<a style='"+_44+" "+_45+"' target='"+_46+"' href='"+_3f+"'>"+_40+"</a>";
}
return _47;
};
function windowOpen(url,_49,_4a,_4b){
var _4c;
if((_4b==true)||(_4b=="true")){
_4c="_blank";
}else{
_4c="_self";
}
window.open(url,_4c,"resizable=yes,scrollbars=yes,menubar=no,left=0,top=0,width="+_49+",height="+_4a+"");
};
function windowOpenSelf(url){
window.open(url,"_self");
};
sys=function(){
};
sys.$isIe=function(){
return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
};
sys.$isNetscape7=function(){
return (navigator.userAgent.toLowerCase().indexOf("netscape")!=-1&&navigator.userAgent.toLowerCase().indexOf("7.")!=-1);
};
sys.$isSafari=function(){
return (navigator.userAgent.toLowerCase().indexOf("khtml")!=-1);
};
sys.$isOpera=function(){
return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
};
sys.$isMozilla=function(){
return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
};
sys.$isFireFox=function(){
return /Firefox/i.test(navigator.userAgent);
};
sys.$isArray=function(obj){
return obj instanceof Array;
};
sys.$isObject=function(obj){
return (typeof obj=="object");
};
function contains(_50,_51){
for(var i=0;i<_50.length;i++){
if(_50[i]==_51){
return true;
}
}
return false;
};
function exclude(_53,_54){
if(_53==null||_53.length==null){
return _53;
}
for(var i=0;i<_53.length;i++){
var _56=_53[i];
var _57=_54;
if(_53[i]==_54){
_53.remove(i);
}
}
return _53;
};
function getArrayWithoutNull(_58){
var _59=new Array();
for(var i=0;i<_58.length;i++){
if(_58[i]!=null){
_59.push(_58[i]);
}
}
return _59;
};
function arrayIsEmpty(_5b){
if(_5b!=null&&_5b.length!=null&&_5b.length!=0){
return false;
}else{
return true;
}
};
var gWaitBoxCounter=0;
ToggleWaitBox=function(_5c){
if(jQuery("#WaitingControl")==null){
return;
}
if(_5c=="show"){
gWaitBoxCounter++;
}else{
if(_5c=="hide"){
gWaitBoxCounter--;
}
}
if(gWaitBoxCounter>0){
jQuery("#WaitingControl:not(:visible)").fadeIn();
}else{
jQuery("#WaitingControl:visible").fadeOut();
}
};
jsFileName="DateTime.js";
SetupDateTime=function(){
};
SetupDateTime.LocalDateFormat="%d.%m.%Y";
SetupDateTime.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));
SetupDateTime.is_ie5=(SetupDateTime.is_ie&&/msie 5\.0/i.test(navigator.userAgent));
SetupDateTime.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);
SetupDateTime._FD=0;
SetupDateTime._DN=new Array("воскресенье","понедельник","вторник","среда","четверг","пятница","суббота","воскресенье");
SetupDateTime._SDN=new Array("вск","пон","втр","срд","чет","пят","суб","вск");
SetupDateTime._MN=new Array("январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь");
SetupDateTime._SMN=new Array("янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек");
SetupDateTime.print=function(_5d,str){
if(typeof (str)=="undefined"){
str=SetupDateTime.LocalDateFormat;
}
var m=_5d.getMonth();
var d=_5d.getDate();
var y=_5d.getFullYear();
var wn=_5d.getWeekNumber();
var w=_5d.getDay();
var s={};
var hr=_5d.getHours();
var pm=(hr>=12);
var ir=(pm)?(hr-12):hr;
var dy=_5d.getDayOfYear();
if(ir==0){
ir=12;
}
var min=_5d.getMinutes();
var sec=_5d.getSeconds();
s["%a"]=SetupDateTime._SDN[w];
s["%A"]=SetupDateTime._DN[w];
s["%b"]=SetupDateTime._SMN[m];
s["%B"]=SetupDateTime._MN[m];
s["%C"]=1+Math.floor(y/100);
s["%d"]=(d<10)?("0"+d):d;
s["%e"]=d;
s["%H"]=(hr<10)?("0"+hr):hr;
s["%I"]=(ir<10)?("0"+ir):ir;
s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;
s["%k"]=hr;
s["%l"]=ir;
s["%m"]=(m<9)?("0"+(1+m)):(1+m);
s["%M"]=(min<10)?("0"+min):min;
s["%n"]="\n";
s["%p"]=pm?"PM":"AM";
s["%P"]=pm?"pm":"am";
s["%s"]=Math.floor(_5d.getTime()/1000);
s["%S"]=(sec<10)?("0"+sec):sec;
s["%t"]="\t";
s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;
s["%u"]=w+1;
s["%w"]=w;
s["%y"]=(""+y).substr(2,2);
s["%Y"]=y;
s["%%"]="%";
var re=/%./g;
if(!SetupDateTime.is_ie5&&!SetupDateTime.is_khtml){
return str.replace(re,function(par){
return s[par]||par;
});
}
var a=str.match(re);
for(var i=0;i<a.length;i++){
var tmp=s[a[i]];
if(tmp){
re=new RegExp(a[i],"g");
str=str.replace(re,tmp);
}
}
return str;
};
Date.prototype.getDayOfYear=function(){
var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var _71=new Date(this.getFullYear(),0,0,0,0,0);
var _72=now-_71;
return Math.floor(_72/Date.DAY);
};
Date.prototype.getWeekNumber=function(){
var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var DoW=d.getDay();
d.setDate(d.getDate()-(DoW+6)%7+3);
var ms=d.valueOf();
d.setMonth(0);
d.setDate(4);
return Math.round((ms-d.valueOf())/(7*86400000))+1;
};
Date.prototype.toShortUTCString=function(){
return SetupDateTime.print(this,"%Y-%m-%d");
};
Date.prototype.toRUString=function(){
return SetupDateTime.print(this,"%d.%m.%Y");
};
Date.prototype.toFormatString=function(str){
return SetupDateTime.print(this,str);
};
Date.fromUTCString=function(s){
var b=s.split("T");
var a=b[0].split("-");
return new Date(a[0],a[1]-1,a[2]);
};
Date.fromFormatString=function(s){
var a=s.split(".");
return new Date(a[2],a[1]-1,a[0]);
};
Date.prototype.addDays=function(_7c){
var d=this.getDate();
var _7e=new Date(this);
_7e.setDate(d+_7c);
return _7e;
};
jsFileName="AJS.js";
if(!AJS){
var AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_drag_zones:[],_cur_pos:null,ajaxErrorHandler:null,getQueryArgument:function(_7f){
var _80=window.location.search.substring(1);
var _81=_80.split("&");
for(var i=0;i<_81.length;i++){
var _83=_81[i].split("=");
if(_83[0]==_7f){
return _83[1];
}
}
return null;
},isIe:function(){
return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);
},isNetscape7:function(){
return (navigator.userAgent.toLowerCase().indexOf("netscape")!=-1&&navigator.userAgent.toLowerCase().indexOf("7.")!=-1);
},isSafari:function(){
return (navigator.userAgent.toLowerCase().indexOf("khtml")!=-1);
},isOpera:function(){
return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
},isMozilla:function(){
return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);
},createArray:function(v){
if(AJS.isArray(v)&&!AJS.isString(v)){
return v;
}else{
if(!v){
return [];
}else{
return [v];
}
}
},forceArray:function(_85){
var r=[];
AJS.map(_85,function(elm){
r.push(elm);
});
return r;
},join:function(_88,_89){
try{
return _89.join(_88);
}
catch(e){
var r=_89[0]||"";
AJS.map(_89,function(elm){
r+=_88+elm;
},1);
return r+"";
}
},isIn:function(elm,_8d){
var i=AJS.getIndex(elm,_8d);
if(i!=-1){
return true;
}else{
return false;
}
},getIndex:function(elm,_90,_91){
for(var i=0;i<_90.length;i++){
if(_91&&_91(_90[i])||elm==_90[i]){
return i;
}
}
return -1;
},getFirst:function(_93){
if(_93.length>0){
return _93[0];
}else{
return null;
}
},getLast:function(_94){
if(_94.length>0){
return _94[_94.length-1];
}else{
return null;
}
},update:function(l1,l2){
for(var i in l2){
l1[i]=l2[i];
}
return l1;
},flattenList:function(_98){
var r=[];
var _9a=function(r,l){
AJS.map(l,function(o){
if(o==null){
}else{
if(AJS.isArray(o)){
_9a(r,o);
}else{
r.push(o);
}
}
});
};
_9a(r,_98);
return r;
},map:function(_9e,fn,_a0,_a1){
var i=0,l=_9e.length;
if(_a0){
i=_a0;
}
if(_a1){
l=_a1;
}
for(i;i<l;i++){
fn.apply(null,[_9e[i],i]);
}
},rmap:function(_a4,fn){
var i=_a4.length-1,l=0;
for(i;i>=l;i--){
fn.apply(null,[_a4[i],i]);
}
},filter:function(_a8,fn,_aa,_ab){
var r=[];
AJS.map(_a8,function(elm){
if(fn(elm)){
r.push(elm);
}
},_aa,_ab);
return r;
},partial:function(fn){
var _af=AJS.forceArray(arguments);
return AJS.$b(fn,null,_af.slice(1,_af.length).reverse(),false,true);
},getElement:function(id){
if(AJS.isString(id)||AJS.isNumber(id)){
return document.getElementById(id);
}else{
return id;
}
},getElements:function(){
var _b1=AJS.forceArray(arguments);
var _b2=new Array();
for(var i=0;i<_b1.length;i++){
var _b4=AJS.getElement(_b1[i]);
_b2.push(_b4);
}
return _b2;
},getElementsByTagAndClassName:function(_b5,_b6,_b7){
var _b8=[];
if(!AJS.isDefined(_b7)){
_b7=document;
}
if(!AJS.isDefined(_b5)){
_b5="*";
}
var els=_b7.getElementsByTagName(_b5);
var _ba=els.length;
var _bb=new RegExp("(^|\\s)"+_b6+"(\\s|$)");
for(i=0,j=0;i<_ba;i++){
if(_bb.test(els[i].className)||_b6==null){
_b8[j]=els[i];
j++;
}
}
return _b8;
},_nodeWalk:function(elm,_bd,_be,_bf){
var p=_bf(elm);
var _c1;
if(_bd&&_be){
_c1=function(p){
return AJS.nodeName(p)==_bd&&AJS.hasClass(p,_be);
};
}else{
if(_bd){
_c1=function(p){
return AJS.nodeName(p)==_bd;
};
}else{
_c1=function(p){
return AJS.hasClass(p,_be);
};
}
}
while(p){
if(_c1(p)){
return p;
}
p=_bf(p);
}
return null;
},getParentBytc:function(elm,_c6,_c7){
return AJS._nodeWalk(elm,_c6,_c7,function(m){
return m.parentNode;
});
},getPreviousSiblingBytc:function(elm,_ca,_cb){
return AJS._nodeWalk(elm,_ca,_cb,function(m){
return m.previousSibling;
});
},getNextSiblingBytc:function(elm,_ce,_cf){
return AJS._nodeWalk(elm,_ce,_cf,function(m){
return m.nextSibling;
});
},getFormElement:function(_d1,_d2){
_d1=AJS.$(_d1);
var r=null;
AJS.map(_d1.elements,function(elm){
if(elm.name&&elm.name==_d2){
r=elm;
}
});
return r;
},formContents:function(_d5){
var _d5=AJS.$(_d5);
var r={};
var fn=function(_d8){
AJS.map(_d8,function(e){
if(e.name){
r[e.name]=e.value||"";
}
});
};
fn(AJS.$bytc("input",null,_d5));
fn(AJS.$bytc("textarea",null,_d5));
return r;
},getBody:function(){
return AJS.$bytc("body")[0];
},nodeName:function(elm){
return elm.nodeName.toLowerCase();
},hasParent:function(elm,_dc,_dd){
if(elm==_dc){
return true;
}
if(_dd==0){
return false;
}
return AJS.hasParent(elm.parentNode,_dc,_dd-1);
},isElementHidden:function(elm){
return ((elm.style.display=="none")||(elm.style.visibility=="hidden"));
},documentInsert:function(elm){
if(typeof (elm)=="string"){
elm=AJS.HTML2DOM(elm);
}
document.write("<span id=\"dummy_holder\"></span>");
AJS.swapDOM(AJS.$("dummy_holder"),elm);
},cloner:function(_e0){
return function(){
return _e0.cloneNode(true);
};
},appendToTop:function(elm){
var _e2=AJS.forceArray(arguments).slice(1);
if(_e2.length>=1){
var _e3=elm.firstChild;
if(_e3){
while(true){
var _e4=_e2.shift();
if(_e4){
AJS.insertBefore(_e4,_e3);
}else{
break;
}
}
}else{
AJS.ACN.apply(null,arguments);
}
}
return elm;
},appendChildNodes:function(elm){
if(arguments.length>=2){
AJS.map(arguments,function(n){
if(AJS.isString(n)){
n=AJS.TN(n);
}
if(AJS.isDefined(n)){
elm.appendChild(n);
}
},1);
}
return elm;
},replaceChildNodes:function(elm){
var _e8;
while((_e8=elm.firstChild)){
elm.removeChild(_e8);
}
if(arguments.length<2){
return elm;
}else{
return AJS.appendChildNodes.apply(null,arguments);
}
return elm;
},insertAfter:function(elm,_ea){
_ea.parentNode.insertBefore(elm,_ea.nextSibling);
return elm;
},insertBefore:function(elm,_ec){
_ec.parentNode.insertBefore(elm,_ec);
return elm;
},showElement:function(){
var _ed=AJS.forceArray(arguments);
AJS.map(_ed,function(elm){
elm.style.display="";
});
},hideElement:function(elm){
var _f0=AJS.forceArray(arguments);
AJS.map(_f0,function(elm){
elm.style.display="none";
});
},swapDOM:function(_f2,src){
_f2=AJS.getElement(_f2);
var _f4=_f2.parentNode;
if(src){
src=AJS.getElement(src);
_f4.replaceChild(src,_f2);
}else{
_f4.removeChild(_f2);
}
return src;
},removeElement:function(){
var _f5=AJS.forceArray(arguments);
AJS.map(_f5,function(elm){
AJS.swapDOM(elm,null);
});
},createDOM:function(_f7,_f8){
var i=0,_fa;
elm=document.createElement(_f7);
if(AJS.isDict(_f8[i])){
for(k in _f8[0]){
_fa=_f8[0][k];
if(k=="style"){
elm.style.cssText=_fa;
}else{
if(k=="class"||k=="className"){
elm.className=_fa;
}else{
elm.setAttribute(k,_fa);
}
}
}
i++;
}
if(_f8[0]==null){
i=1;
}
AJS.map(_f8,function(n){
if(n){
if(AJS.isString(n)||AJS.isNumber(n)){
n=AJS.TN(n);
}
elm.appendChild(n);
}
},i);
return elm;
},_createDomShortcuts:function(){
var _fc=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","br","textarea","form","p","select","option","iframe","script","center","dl","dt","dd","small","pre"];
var _fd=function(elm){
var _ff="return AJS.createDOM.apply(null, ['"+elm+"', arguments]);";
var _100="function() { "+_ff+"    }";
eval("AJS."+elm.toUpperCase()+"="+_100);
};
AJS.map(_fc,_fd);
AJS.TN=function(text){
return document.createTextNode(text);
};
},getCssDim:function(dim){
if(AJS.isString(dim)){
return dim;
}else{
return dim+"px";
}
},getCssProperty:function(elm,prop){
elm=AJS.$(elm);
var y;
if(elm.currentStyle){
y=elm.currentStyle[prop];
}else{
if(window.getComputedStyle){
y=document.defaultView.getComputedStyle(elm,null).getPropertyValue(prop);
}
}
return y;
},setStyle:function(){
var args=AJS.forceArray(arguments);
var _107=args.pop();
var _108=args.pop();
AJS.map(args,function(elm){
elm.style[_108]=AJS.getCssDim(_107);
});
},setWidth:function(){
var args=AJS.forceArray(arguments);
args.splice(args.length-1,0,"width");
AJS.setStyle.apply(null,args);
},setHeight:function(){
var args=AJS.forceArray(arguments);
args.splice(args.length-1,0,"height");
AJS.setStyle.apply(null,args);
},setLeft:function(){
var args=AJS.forceArray(arguments);
args.splice(args.length-1,0,"left");
AJS.setStyle.apply(null,args);
},setTop:function(){
var args=AJS.forceArray(arguments);
args.splice(args.length-1,0,"top");
AJS.setStyle.apply(null,args);
},setClass:function(){
var args=AJS.forceArray(arguments);
var c=args.pop();
AJS.map(args,function(elm){
elm.className=c;
});
},addClass:function(){
var args=AJS.forceArray(arguments);
var cls=args.pop();
var _113=function(o){
if(!new RegExp("(^|\\s)"+cls+"(\\s|$)").test(o.className)){
o.className+=(o.className?" ":"")+cls;
}
};
AJS.map(args,function(elm){
_113(elm);
});
},hasClass:function(elm,cls){
if(!elm.className){
return false;
}
return elm.className==cls||elm.className.search(new RegExp(" "+cls))!=-1;
},removeClass:function(){
var args=AJS.forceArray(arguments);
var cls=args.pop();
var _11a=function(o){
o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");
};
AJS.map(args,function(elm){
_11a(elm);
});
},setHTML:function(elm,html){
elm.innerHTML=html;
return elm;
},RND:function(tmpl,ns,_121){
_121=_121||window;
var fn=function(w,g){
g=g.split("|");
var cnt=ns[g[0]];
for(var i=1;i<g.length;i++){
cnt=_121[g[i]](cnt);
}
if(cnt==""){
return "";
}
if(cnt==0||cnt==-1){
cnt+="";
}
return cnt||w;
};
return tmpl.replace(/%\(([A-Za-z0-9_|.]*)\)/g,fn);
},HTML2DOM:function(html,_128){
var d=AJS.DIV();
d.innerHTML=html;
if(_128){
return d.childNodes[0];
}else{
return d;
}
},preloadImages:function(){
AJS.AEV(window,"load",AJS.$p(function(args){
AJS.map(args,function(src){
var pic=new Image();
pic.src=src;
});
},arguments));
},setOpacity:function(elm,p){
elm.style.opacity=p;
elm.style.filter="alpha(opacity="+p*100+")";
},getXMLHttpRequest:function(){
var _12f=[function(){
return new XMLHttpRequest();
},function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
},function(){
return new ActiveXObject("Msxml2.XMLHTTP.4.0");
},function(){
throw "Browser does not support XMLHttpRequest";
}];
for(var i=0;i<_12f.length;i++){
var func=_12f[i];
try{
return func();
}
catch(e){
}
}
},getRequest:function(url,data,type){
if(!type){
type="POST";
}
var req=AJS.getXMLHttpRequest();
if(url.indexOf("http://")==-1){
if(AJS.BASE_URL!=""){
if(AJS.BASE_URL.lastIndexOf("/")!=AJS.BASE_URL.length-1){
AJS.BASE_URL+="/";
}
url=AJS.BASE_URL+url;
}
}
req.open(type,url,true);
if(type=="POST"){
req.setRequestHeader("Content-type","application/x-www-form-urlencoded");
}
return AJS._sendXMLHttpRequest(req);
},_sendXMLHttpRequest:function(req,data){
var d=new AJSDeferred(req);
var _139=function(){
if(req.readyState==4){
var _13a="";
try{
_13a=req.status;
}
catch(e){
}
if(_13a==200||_13a==304||req.responseText==null){
d.callback();
}else{
if(AJS.ajaxErrorHandler){
AJS.ajaxErrorHandler(req.responseText,req);
}else{
d.errback();
}
}
}
};
req.onreadystatechange=_139;
return d;
},_reprString:function(o){
return ("\""+o.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
},serializeJSON:function(o){
var _13d=typeof (o);
if(_13d=="undefined"){
return "undefined";
}else{
if(_13d=="number"||_13d=="boolean"){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_13d=="string"){
return AJS._reprString(o);
}
var me=arguments.callee;
if(_13d!="function"&&typeof (o.length)=="number"){
var res=[];
for(var i=0;i<o.length;i++){
var val=me(o[i]);
if(typeof (val)!="string"){
val="undefined";
}
res.push(val);
}
return "["+res.join(",")+"]";
}
if(_13d=="function"){
return null;
}
res=[];
for(var k in o){
var _143;
if(typeof (k)=="number"){
_143="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_143=AJS._reprString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_143+":"+val);
}
return "{"+res.join(",")+"}";
},loadJSONDoc:function(url){
var d=AJS.getRequest(url);
var _146=function(data,req){
var text=req.responseText;
if(text=="Error"){
d.errback(req);
}else{
return AJS.evalTxt(text);
}
};
d.addCallback(_146);
return d;
},evalTxt:function(txt){
try{
return eval("("+txt+")");
}
catch(e){
return eval(txt);
}
},evalScriptTags:function(html){
var _14c=html.match(/<script.*?>((\n|\r|.)*?)<\/script>/g);
if(_14c!=null){
for(var i=0;i<_14c.length;i++){
var _14e=_14c[i].replace(/<script.*?>/g,"");
_14e=_14e.replace(/<\/script>/g,"");
eval(_14e);
}
}
},queryArguments:function(data){
var _150=[];
for(k in data){
_150.push(k+"="+AJS.urlencode(data[k]));
}
return _150.join("&");
},getMousePos:function(e){
var posx=0;
var posy=0;
if(!e){
var e=window.event;
}
if(e.pageX||e.pageY){
posx=e.pageX;
posy=e.pageY;
}else{
if(e.clientX||e.clientY){
posx=e.clientX+document.body.scrollLeft;
posy=e.clientY+document.body.scrollTop;
}
}
return {x:posx,y:posy};
},getScrollTop:function(){
var t;
if(document.documentElement&&document.documentElement.scrollTop){
t=document.documentElement.scrollTop;
}else{
if(document.body){
t=document.body.scrollTop;
}
}
return t;
},absolutePosition:function(elm){
var _156={"x":elm.offsetLeft,"y":elm.offsetTop};
if(elm.offsetParent){
var _157=AJS.absolutePosition(elm.offsetParent);
_156.x+=_157.x;
_156.y+=_157.y;
}
if(AJS.isSafari()&&elm.style.position=="absolute"){
_156.x-=document.body.offsetLeft;
_156.y-=document.body.offsetTop;
}
return _156;
},getWindowSize:function(doc){
doc=doc||document;
var _159,_15a;
if(self.innerHeight){
_159=self.innerWidth;
_15a=self.innerHeight;
}else{
if(doc.documentElement&&doc.documentElement.clientHeight){
_159=doc.documentElement.clientWidth;
_15a=doc.documentElement.clientHeight;
}else{
if(doc.body){
_159=doc.body.clientWidth;
_15a=doc.body.clientHeight;
}
}
}
return {"w":_159,"h":_15a};
},isOverlapping:function(elm1,elm2){
var _15d=AJS.absolutePosition(elm1);
var _15e=AJS.absolutePosition(elm2);
var top1=_15d.y;
var _160=_15d.x;
var _161=_160+elm1.offsetWidth;
var _162=top1+elm1.offsetHeight;
var top2=_15e.y;
var _164=_15e.x;
var _165=_164+elm2.offsetWidth;
var _166=top2+elm2.offsetHeight;
var _167=function(v){
if(v>0){
return "+";
}else{
if(v<0){
return "-";
}else{
return 0;
}
}
};
if((_167(top1-_166)!=_167(_162-top2))&&(_167(_160-_165)!=_167(_161-_164))){
return true;
}
return false;
},getEventElm:function(e){
if(e&&!e.type&&!e.keyCode){
return e;
}
var targ;
if(!e){
var e=window.event;
}
if(e.target){
targ=e.target;
}else{
if(e.srcElement){
targ=e.srcElement;
}
}
if(targ.nodeType==3){
targ=targ.parentNode;
}
return targ;
},_getRealScope:function(fn,_16c,_16d,_16e){
var _16f=window;
_16c=AJS.$A(_16c);
if(fn._cscope){
_16f=fn._cscope;
}
return function(){
var args=[];
var i=0;
if(_16d){
i=1;
}
AJS.map(arguments,function(arg){
args.push(arg);
},i);
args=args.concat(_16c);
if(_16e){
args=args.reverse();
}
return fn.apply(_16f,args);
};
},_unloadListeners:function(){
if(AJS.listeners){
AJS.map(AJS.listeners,function(elm,type,fn){
AJS.REV(elm,type,fn);
});
}
AJS.listeners=[];
},setEventKey:function(e){
e.key=e.keyCode?e.keyCode:e.charCode;
if(window.event){
e.ctrl=window.event.ctrlKey;
e.shift=window.event.shiftKey;
}else{
e.ctrl=e.ctrlKey;
e.shift=e.shiftKey;
}
switch(e.key){
case 63232:
e.key=38;
break;
case 63233:
e.key=40;
break;
case 63235:
e.key=39;
break;
case 63234:
e.key=37;
break;
}
},addEventListener:function(elm,type,fn,_17a,_17b){
if(!_17b){
_17b=false;
}
var elms=AJS.$A(elm);
AJS.map(elms,function(elmz){
if(_17a){
fn=AJS._listenOnce(elmz,type,fn);
}
if(AJS.isIn(type,["submit","load","scroll","resize"])){
var old=elm["on"+type];
elm["on"+type]=function(){
if(old){
fn(arguments);
return old(arguments);
}else{
return fn(arguments);
}
};
return;
}
if(AJS.isIn(type,["keypress","keydown","keyup","click"])){
var _17f=fn;
fn=function(e){
AJS.setEventKey(e);
return _17f.apply(null,arguments);
};
}
if(elmz.attachEvent){
elmz.attachEvent("on"+type,fn);
}else{
if(elmz.addEventListener){
elmz.addEventListener(type,fn,_17b);
}
}
AJS.listeners=AJS.$A(AJS.listeners);
AJS.listeners.push([elmz,type,fn]);
});
},removeEventListener:function(elm,type,fn,_184){
if(!_184){
_184=false;
}
if(elm.removeEventListener){
elm.removeEventListener(type,fn,_184);
if(AJS.isOpera()){
elm.removeEventListener(type,fn,!_184);
}
}else{
if(elm.detachEvent){
elm.detachEvent("on"+type,fn);
}
}
},bind:function(fn,_186,_187,_188,_189){
fn._cscope=_186;
return AJS._getRealScope(fn,_187,_188,_189);
},bindMethods:function(self){
for(var k in self){
var func=self[k];
if(typeof (func)=="function"){
self[k]=AJS.$b(func,self);
}
}
},_listenOnce:function(elm,type,fn){
var r_fn=function(){
AJS.removeEventListener(elm,type,r_fn);
fn(arguments);
};
return r_fn;
},callLater:function(fn,_192){
var _193=function(){
fn();
};
window.setTimeout(_193,_192);
},preventDefault:function(e){
if(AJS.isIe()){
window.event.returnValue=false;
}else{
e.preventDefault();
}
},dragAble:function(elm,_196,args){
if(!args){
args={};
}
if(!AJS.isDefined(args["move_x"])){
args["move_x"]=true;
}
if(!AJS.isDefined(args["move_y"])){
args["move_y"]=true;
}
if(!AJS.isDefined(args["moveable"])){
args["moveable"]=false;
}
if(!AJS.isDefined(args["hide_on_move"])){
args["hide_on_move"]=true;
}
if(!AJS.isDefined(args["on_mouse_up"])){
args["on_mouse_up"]=null;
}
if(!AJS.isDefined(args["cursor"])){
args["cursor"]="move";
}
if(!AJS.isDefined(args["max_move"])){
args["max_move"]={"top":null,"left":null};
}
elm=AJS.$(elm);
if(!_196){
_196=elm;
}
_196=AJS.$(_196);
var _198=_196.style.cursor;
_196.style.cursor=args["cursor"];
elm.style.position="relative";
AJS.addClass(_196,"_ajs_handler");
_196._args=args;
_196._elm=elm;
AJS.AEV(_196,"mousedown",AJS._dragStart);
},_dragStart:function(e){
var _19a=AJS.getEventElm(e);
if(!AJS.hasClass(_19a,"_ajs_handler")){
_19a=AJS.getParentBytc(_19a,null,"_ajs_handler");
}
if(_19a){
AJS._dragInit(e,_19a._elm,_19a._args);
}
},dropZone:function(elm,args){
elm=AJS.$(elm);
var item={elm:elm};
AJS.update(item,args);
AJS._drop_zones.push(item);
},removeDragAble:function(elm){
AJS.REV(elm,"mousedown",AJS._dragStart);
elm.style.cursor="";
},removeDropZone:function(elm){
var i=AJS.getIndex(elm,AJS._drop_zones,function(item){
if(item.elm==elm){
return true;
}
});
if(i!=-1){
AJS._drop_zones.splice(i,1);
}
},_dragInit:function(e,_1a3,args){
AJS.drag_obj=new Object();
AJS.drag_obj.args=args;
AJS.drag_obj.click_elm=_1a3;
AJS.drag_obj.mouse_pos=AJS.getMousePos(e);
AJS.drag_obj.click_elm_pos=AJS.absolutePosition(_1a3);
AJS.AEV(document,"mousemove",AJS._dragMove,false,true);
AJS.AEV(document,"mouseup",AJS._dragStop,false,true);
if(AJS.isIe()){
window.event.cancelBubble=true;
}
AJS.preventDefault(e);
},_initDragElm:function(elm){
if(AJS.drag_elm&&AJS.drag_elm.style.display=="none"){
AJS.removeElement(AJS.drag_elm);
}
if(!AJS.drag_elm){
AJS.drag_elm=AJS.DIV();
var d=AJS.drag_elm;
AJS.insertBefore(d,AJS.getBody().firstChild);
AJS.setHTML(d,elm.innerHTML);
d.className=elm.className;
d.style.cssText=elm.style.cssText;
d.style.position="absolute";
d.style.zIndex=10000;
var t=AJS.absolutePosition(elm);
AJS.setTop(d,t.y);
AJS.setLeft(d,t.x);
if(AJS.drag_obj.args.on_init){
AJS.drag_obj.args.on_init(elm);
}
}
},_dragMove:function(e){
var _1a9=AJS.drag_obj;
var _1aa=_1a9.click_elm;
AJS._initDragElm(_1aa);
var _1ab=AJS.drag_elm;
if(_1a9.args["hide_on_move"]){
_1aa.style.visibility="hidden";
}
var _1ac=AJS.getMousePos(e);
var _1ad=_1a9.mouse_pos;
var _1ae=_1a9.click_elm_pos;
AJS.map(AJS._drop_zones,function(d_z){
if(AJS.isOverlapping(d_z["elm"],_1ab)){
if(d_z["elm"]!=_1ab){
var _1b0=d_z["on_hover"];
if(_1b0){
_1b0(d_z["elm"],_1aa,_1ab);
}
}
}
});
if(_1a9.args["on_drag"]){
_1a9.args["on_drag"](_1aa,e);
}
var _1b1=_1a9.args["max_move"]["top"];
var _1b2=_1a9.args["max_move"]["left"];
var p;
if(_1a9.args["move_x"]){
p=_1ac.x-(_1ad.x-_1ae.x);
if(_1b2==null||_1b2<=p){
AJS.setLeft(elm,p);
}
}
if(_1a9.args["move_y"]){
p=_1ac.y-(_1ad.y-_1ae.y);
if(_1b1==null||_1b1<=p){
AJS.setTop(elm,p);
}
}
if(AJS.isIe()){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
e.preventDefault();
}
},_dragStop:function(e){
var _1b5=AJS.drag_obj;
var _1b6=AJS.drag_elm;
var _1b7=_1b5.click_elm;
AJS.REV(document,"mousemove",AJS._dragMove,true);
AJS.REV(document,"mouseup",AJS._dragStop,true);
var _1b8=false;
AJS.map(AJS._drop_zones,function(d_z){
if(AJS.isOverlapping(d_z["elm"],_1b7)){
if(d_z["elm"]!=_1b7){
var _1ba=d_z["on_drop"];
if(_1ba){
_1b8=true;
_1ba(d_z["elm"],_1b7);
}
}
}
});
if(_1b5.args["moveable"]){
var t=parseInt(_1b7.style.top)||0;
var l=parseInt(_1b7.style.left)||0;
var _1bd=AJS.absolutePosition(_1b6);
var _1be=AJS.absolutePosition(_1b7);
AJS.setTop(_1b7,t+_1bd.y-_1be.y);
AJS.setLeft(_1b7,l+_1bd.x-_1be.x);
}
if(!_1b8&&_1b5.args["on_mouse_up"]){
_1b5.args["on_mouse_up"](_1b7,e);
}
if(_1b5.args["hide_on_move"]){
_1b5.click_elm.style.visibility="visible";
}
if(_1b5.args.on_end){
_1b5.args.on_end(_1b7);
}
AJS._dragObj=null;
if(_1b6){
AJS.hideElement(_1b6);
}
AJS.drag_elm=null;
},keys:function(obj){
var rval=[];
for(var prop in obj){
rval.push(prop);
}
return rval;
},values:function(obj){
var rval=[];
for(var prop in obj){
rval.push(obj[prop]);
}
return rval;
},urlencode:function(str){
return encodeURIComponent(str.toString());
},isDefined:function(o){
return (o!="undefined"&&o!=null);
},isArray:function(obj){
return obj instanceof Array;
},isString:function(obj){
return (typeof obj=="string");
},isNumber:function(obj){
return (typeof obj=="number");
},isObject:function(obj){
return (typeof obj=="object");
},isFunction:function(obj){
return (typeof obj=="function");
},isDict:function(o){
var _1cd=String(o);
return _1cd.indexOf(" Object")!=-1;
},exportToGlobalScope:function(){
for(e in AJS){
eval(e+" = AJS."+e);
}
},log:function(o){
if(AJS.isMozilla()){
console.log(o);
}else{
var div=AJS.DIV({"style":"color: green"});
AJS.ACN(AJS.getBody(),AJS.setHTML(div,""+o));
}
}};
AJS.Class=function(_1d0){
var fn=function(){
if(arguments[0]!="no_init"){
return this.init.apply(this,arguments);
}
};
fn.prototype=_1d0;
AJS.update(fn,AJS.Class.prototype);
return fn;
};
AJS.Class.prototype={extend:function(_1d2){
var _1d3=new this("no_init");
for(k in _1d2){
var prev=_1d3[k];
var cur=_1d2[k];
if(prev&&prev!=cur&&typeof cur=="function"){
cur=this._parentize(cur,prev);
}
_1d3[k]=cur;
}
return new AJS.Class(_1d3);
},implement:function(_1d6){
AJS.update(this.prototype,_1d6);
},_parentize:function(cur,prev){
return function(){
this.parent=prev;
return cur.apply(this,arguments);
};
}};
AJS.$=AJS.getElement;
AJS.$$=AJS.getElements;
AJS.$f=AJS.getFormElement;
AJS.$b=AJS.bind;
AJS.$p=AJS.partial;
AJS.$FA=AJS.forceArray;
AJS.$A=AJS.createArray;
AJS.DI=AJS.documentInsert;
AJS.ACN=AJS.appendChildNodes;
AJS.RCN=AJS.replaceChildNodes;
AJS.AEV=AJS.addEventListener;
AJS.REV=AJS.removeEventListener;
AJS.$bytc=AJS.getElementsByTagAndClassName;
AJSDeferred=function(req){
this.callbacks=[];
this.errbacks=[];
this.req=req;
};
AJSDeferred.prototype={excCallbackSeq:function(req,list){
var data=req.responseText;
while(list.length>0){
var fn=list.pop();
var _1de=fn(data,req);
if(_1de){
data=_1de;
}
}
},callback:function(){
this.excCallbackSeq(this.req,this.callbacks);
},errback:function(){
if(this.errbacks.length==0){
alert("Error encountered:\n"+this.req.responseText);
}
this.excCallbackSeq(this.req,this.errbacks);
},addErrback:function(fn){
this.errbacks.unshift(fn);
},addCallback:function(fn){
this.callbacks.unshift(fn);
},addCallbacks:function(fn1,fn2){
this.addCallback(fn1);
this.addErrback(fn2);
},sendReq:function(data){
if(AJS.isObject(data)){
this.req.send(AJS.queryArguments(data));
}else{
if(AJS.isDefined(data)){
this.req.send(data);
}else{
this.req.send("");
}
}
}};
AJS.addEventListener(window,"unload",AJS._unloadListeners);
AJS._createDomShortcuts();
}
script_loaded=true;
jsFileName="AJS_fx.js";
AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(elm,_1e5){
var base=new AJS.fx.Base();
base.elm=AJS.$(elm);
base.setOptions(_1e5);
base.options.duration=600;
AJS.update(base,{increase:function(){
if(this.now==7){
elm.style.backgroundColor="transparent";
}else{
elm.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];
}
}});
return base.custom(6,0);
},fadeIn:function(elm,_1e8){
_1e8=_1e8||{};
if(!_1e8.from){
_1e8.from=0;
AJS.setOpacity(elm,0);
}
if(!_1e8.to){
_1e8.to=1;
}
var s=new AJS.fx.Style(elm,"opacity",_1e8);
return s.custom(_1e8.from,_1e8.to);
},fadeOut:function(elm,_1eb){
_1eb=_1eb||{};
if(!_1eb.from){
_1eb.from=1;
}
if(!_1eb.to){
_1eb.to=0;
}
_1eb.duration=300;
var s=new AJS.fx.Style(elm,"opacity",_1eb);
return s.custom(_1eb.from,_1eb.to);
},setWidth:function(elm,_1ee){
var s=new AJS.fx.Style(elm,"width",_1ee);
return s.custom(_1ee.from,_1ee.to);
},setHeight:function(elm,_1f1){
var s=new AJS.fx.Style(elm,"height",_1f1);
return s.custom(_1f1.from,_1f1.to);
}};
AJS.fx.Base=new AJS.Class({init:function(){
AJS.bindMethods(this);
},setOptions:function(_1f3){
this.options=AJS.update({onStart:function(){
},onComplete:function(){
},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50},_1f3||{});
},step:function(){
var time=new Date().getTime();
if(time<this.time+this.options.duration){
this.cTime=time-this.time;
this.setNow();
}else{
setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);
this.clearTimer();
this.now=this.to;
}
this.increase();
},setNow:function(){
this.now=this.compute(this.from,this.to);
},compute:function(from,to){
var _1f7=to-from;
return this.options.transition(this.cTime,from,_1f7,this.options.duration);
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
return this;
},_start:function(from,to){
if(!this.options.wait){
this.clearTimer();
}
if(this.timer){
return;
}
setTimeout(AJS.$p(this.options.onStart,this.elm),10);
this.from=from;
this.to=to;
this.time=new Date().getTime();
this.timer=setInterval(this.step,Math.round(1000/this.options.fps));
return this;
},custom:function(from,to){
return this._start(from,to);
},set:function(to){
this.now=to;
this.increase();
return this;
},setStyle:function(elm,_1fe,val){
if(this.property=="opacity"){
AJS.setOpacity(elm,val);
}else{
AJS.setStyle(elm,_1fe,val);
}
}});
AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_201,_202){
this.parent();
this.elm=elm;
this.setOptions(_202);
this.property=_201;
},increase:function(){
this.setStyle(this.elm,this.property,this.now);
}});
AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_204){
this.parent();
this.elm=AJS.$(elm);
this.setOptions(_204);
this.now={};
},setNow:function(){
for(p in this.from){
this.now[p]=this.compute(this.from[p],this.to[p]);
}
},custom:function(obj){
if(this.timer&&this.options.wait){
return;
}
var from={};
var to={};
for(p in obj){
from[p]=obj[p][0];
to[p]=obj[p][1];
}
return this._start(from,to);
},increase:function(){
for(var p in this.now){
this.setStyle(this.elm,p,this.now[p]);
}
}});
AJS.fx.Transitions={linear:function(t,b,c,d){
return c*t/d+b;
},sineInOut:function(t,b,c,d){
return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
}};
script_loaded=true;
jsFileName="Ajax.js";
AJAX=function(url){
this.uri=url;
this.createTransport();
this.nextId=0;
};
AJAX.prototype.createTransport=function(){
this.transport=document.createElement("SCRIPT");
this.type="text/javascript";
this.transport.setAttribute("parent",this.name);
};
AJAX.prototype.call=function(_212,_213,_214,_215){
if(this.transport.parentElement){
document.body.removeChild(this.transport);
}
var res="AJAX_"+Math.round(Math.random()*1000000)+"_response";
var ci,cj;
var uri=this.uri+"/"+_212+"?client=JScript&resultObject="+res+"&enc="+responseEncoding;
for(ci=0;ci<_213.length;ci++){
if(sys.$isArray(_213[ci])){
for(cj=0;cj<_213[ci].length;cj++){
uri=uri+"&"+_214[ci]+"="+encodeURIComponent(JSON.stringify(_213[ci][cj]));
}
}else{
if(sys.$isObject(_213[ci])){
uri=uri+"&"+_214[ci]+"="+encodeURIComponent(JSON.stringify(_213[ci]));
}else{
uri=uri+"&"+_214[ci]+"="+encodeURIComponent(_213[ci]);
}
}
}
var _21a=this;
AJAX.requests.push(res);
if((sys.$isFireFox())||(sys.$isSafari())){
this.transport.onload=function(){
AJAX.onreadystatechange(_21a,res,_215);
};
}else{
this.transport.onreadystatechange=function(){
if(/loaded|complete/.test(this.readyState)){
var _21b=AJAX.hasRequest(res);
if(_21b>-1){
AJAX.requests[_21b]="";
AJAX.onreadystatechange(_21a,res,_215);
}else{
return;
}
}
};
}
this.transport.src=uri;
document.body.appendChild(this.transport);
};
AJAX.onreadystatechange=function(_21c,res,_21e){
var _21f=null;
try{
_21f=eval(res);
}
catch(e){
_21f={"error":e};
}
if(_21e){
_21e(_21f);
}
};
AJAX.requests=new Array();
AJAX.hasRequest=function(key){
for(i=0;i<AJAX.requests.length;i++){
if(AJAX.requests[i]==key){
return i;
}
}
return -1;
};
jsFileName="json.js";
var JSON=function(){
var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},s={"boolean":function(x){
return String(x);
},number:function(x){
return isFinite(x)?String(x):"null";
},string:function(x){
if(/["\\\x00-\x1f]/.test(x)){
x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){
var c=m[b];
if(c){
return c;
}
c=b.charCodeAt();
return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);
});
}
return "\""+x+"\"";
},object:function(x){
if(x){
var a=[],b,f,i,l,v;
if(x instanceof Array){
a[0]="[";
l=x.length;
for(i=0;i<l;i+=1){
v=x[i];
f=s[typeof v];
if(f){
v=f(v);
if(typeof v=="string"){
if(b){
a[a.length]=",";
}
a[a.length]=v;
b=true;
}
}
}
a[a.length]="]";
}else{
if(x instanceof Object){
a[0]="{";
for(i in x){
v=x[i];
f=s[typeof v];
if(f){
v=f(v);
if(typeof v=="string"){
if(b){
a[a.length]=",";
}
a.push(s.string(i),":",v);
b=true;
}
}
}
a[a.length]="}";
}else{
return;
}
}
return a.join("");
}
return "null";
}};
return {copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(v){
var f=s[typeof v];
if(f){
v=f(v);
if(typeof v=="string"){
return v;
}
}
return null;
},eval:function(text){
try{
return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+text+")");
}
catch(e){
return false;
}
},parse:function(text){
var at=0;
var ch=" ";
function _236(m){
throw {name:"JSONError",message:m,at:at-1,text:text};
};
function next(){
ch=text.charAt(at);
at+=1;
return ch;
};
function _239(){
while(ch){
if(ch<=" "){
next();
}else{
if(ch=="/"){
switch(next()){
case "/":
while(next()&&ch!="\n"&&ch!="\r"){
}
break;
case "*":
next();
for(;;){
if(ch){
if(ch=="*"){
if(next()=="/"){
next();
break;
}
}else{
next();
}
}else{
_236("Unterminated comment");
}
}
break;
default:
_236("Syntax error");
}
}else{
break;
}
}
}
};
function _23a(){
var i,s="",t,u;
if(ch=="\""){
outer:
while(next()){
if(ch=="\""){
next();
return s;
}else{
if(ch=="\\"){
switch(next()){
case "b":
s+="\b";
break;
case "f":
s+="\f";
break;
case "n":
s+="\n";
break;
case "r":
s+="\r";
break;
case "t":
s+="\t";
break;
case "u":
u=0;
for(i=0;i<4;i+=1){
t=parseInt(next(),16);
if(!isFinite(t)){
break outer;
}
u=u*16+t;
}
s+=String.fromCharCode(u);
break;
default:
s+=ch;
}
}else{
s+=ch;
}
}
}
}
_236("Bad string");
};
function _23e(){
var a=[];
if(ch=="["){
next();
_239();
if(ch=="]"){
next();
return a;
}
while(ch){
a.push(_240());
_239();
if(ch=="]"){
next();
return a;
}else{
if(ch!=","){
break;
}
}
next();
_239();
}
}
_236("Bad array");
};
function _241(){
var k,o={};
if(ch=="{"){
next();
_239();
if(ch=="}"){
next();
return o;
}
while(ch){
k=_23a();
_239();
if(ch!=":"){
break;
}
next();
o[k]=_240();
_239();
if(ch=="}"){
next();
return o;
}else{
if(ch!=","){
break;
}
}
next();
_239();
}
}
_236("Bad object");
};
function _244(){
var n="",v;
if(ch=="-"){
n="-";
next();
}
while(ch>="0"&&ch<="9"){
n+=ch;
next();
}
if(ch=="."){
n+=".";
while(next()&&ch>="0"&&ch<="9"){
n+=ch;
}
}
if(ch=="e"||ch=="E"){
n+="e";
next();
if(ch=="-"||ch=="+"){
n+=ch;
next();
}
while(ch>="0"&&ch<="9"){
n+=ch;
next();
}
}
v=+n;
if(!isFinite(v)){
}else{
return v;
}
};
function word(){
switch(ch){
case "t":
if(next()=="r"&&next()=="u"&&next()=="e"){
next();
return true;
}
break;
case "f":
if(next()=="a"&&next()=="l"&&next()=="s"&&next()=="e"){
next();
return false;
}
break;
case "n":
if(next()=="u"&&next()=="l"&&next()=="l"){
next();
return null;
}
break;
}
_236("Syntax error");
};
function _240(){
_239();
switch(ch){
case "{":
return _241();
case "[":
return _23e();
case "\"":
return _23a();
case "-":
return _244();
default:
return ch>="0"&&ch<="9"?_244():word();
}
};
return _240();
}};
}();
jsFileName="SecurityProxy.js";
function Security(url){
this["login"]=function(name,_24a,_24b){
var ajax=new AJAX(url);
return ajax.call("login",[name,_24a],["name","password"],_24b);
};
this["logout"]=function(_24d){
var ajax=new AJAX(url);
return ajax.call("login",[],[],_24d);
};
var url=typeof (url)==="string"?url:"http://remote.module.bronni.ru/Security.ashx";
};
Security.rpcMethods=["login","logout"];
jsFileName="DictionariesProxy.js";
function Dictionaries(url){
this["getCurrencies"]=function(_250){
var ajax=new AJAX(url);
return ajax.call("getCurrencies",[],[],_250);
};
this["getCurrenciesByIds"]=function(_252,_253){
var ajax=new AJAX(url);
return ajax.call("getCurrenciesByIds",[_252],["currenciesIds"],_253);
};
this["getDestinationCountriesByDepartureCity"]=function(_255,_256){
var ajax=new AJAX(url);
return ajax.call("getDestinationCountriesByDepartureCity",[_255],["departureCityId"],_256);
};
this["getDestinationCountries"]=function(_258){
var ajax=new AJAX(url);
return ajax.call("getDestinationCountries",[],[],_258);
};
this["getCountriesWithHotels"]=function(_25a){
var ajax=new AJAX(url);
return ajax.call("getPrincipalCountriesWithPrincipalHotels",[],[],_25a);
};
this["getDestinationCities"]=function(_25c,_25d){
var ajax=new AJAX(url);
return ajax.call("getDestinationCities",[_25c],["countryId"],_25d);
};
this["getCitiesWithHotels"]=function(_25f,_260){
var ajax=new AJAX(url);
return ajax.call("getPrincipalCitiesWithPrincipalHotels",[_25f],["countryId"],_260);
};
this["getHotels"]=function(_262,_263,_264,_265){
var ajax=new AJAX(url);
return ajax.call("getHotels",[_262,_263,_264],["countryId","cityIds","starIds"],_265);
};
this["getHotelsEx"]=function(_267,_268,_269,_26a){
var ajax=new AJAX(url);
return ajax.call("getHotelsEx",[_267,_268,_269],["countryId","cityIds","starIds"],_26a);
};
this["getPrincipalHotels"]=function(_26c,_26d){
var ajax=new AJAX(url);
return ajax.call("getPrincipalHotels",[_26c],["cityId"],_26d);
};
this["getStars"]=function(_26f){
var ajax=new AJAX(url);
return ajax.call("getStars",[],[],_26f);
};
this["getDepartureCitiesByDestinationCountry"]=function(_271,_272){
var ajax=new AJAX(url);
return ajax.call("getDepartureCitiesByDestinationCountry",[_271],["destinationCountryId"],_272);
};
this["getDepartureCities"]=function(_274){
var ajax=new AJAX(url);
return ajax.call("getDepartureCities",[],[],_274);
};
this["getMeals"]=function(_276){
var ajax=new AJAX(url);
return ajax.call("getMeals",[],[],_276);
};
this["getOperators"]=function(_278){
var ajax=new AJAX(url);
return ajax.call("getOperators",[],[],_278);
};
this["getOperatorsByDepartureCityAndDestination"]=function(_27a,_27b,_27c,_27d){
var ajax=new AJAX(url);
return ajax.call("getOperatorsByDepartureCityAndDestination",[_27a,_27b,_27c],["departureCityId","includeNullDepartureCities","countryId"],_27d);
};
this["getTime"]=function(_27f){
var ajax=new AJAX(url);
return ajax.call("getTime",[],[],_27f);
};
var url=typeof (url)==="string"?url:"http://remote.module.bronni.ru/Dictionaries.ashx";
};
Dictionaries.rpcMethods=["getCurrencies","getCurrenciesByIds","getDestinationCountriesByDepartureCity","getDestinationCountries","getDestinationCities","getHotels","getHotelsEx","getStars","getDepartureCities","getMeals","getOperators","getOperatorsByDepartureCityAndDestination","getTime","getPrincipalCountriesWithPrincipalHotels","getPrincipalCitiesWithPrincipalHotels"];
jsFileName="ComboBox.js";
Global_run_event_hook=true;
Global_combo_array=new Array();
ComboBox=function(){
if(arguments.length==0){
self.status="ComboBox invalid - no name argument";
}
this.name=arguments[0];
this.parent=arguments[1]||document.body;
this.constBaseDivSuffix="_base";
this.constListDivSuffix="_list";
this.constInputSuffix="_input";
this.constHiddenSuffix="_hidden";
this.options=new Array();
this.expops=new Array();
this.value="";
this.onChangeSelected=null;
this.view=this.createBase();
Global_combo_array[Global_combo_array.length]=this;
if(Global_run_event_hook){
this.init(this);
}
};
ComboBox.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));
ComboBox.is_ie5=(ComboBox.is_ie&&/msie 5\.0/i.test(navigator.userAgent));
ComboBox.is_opera=/opera/i.test(navigator.userAgent);
ComboBox.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);
ComboBox.is_firefox=/Firefox/i.test(navigator.userAgent);
ComboBox.prototype.getControlName=function(_281){
return this.name+_281;
};
ComboBox.prototype.getControl=function(_282){
return document.getElementById(this.getControlName(_282));
};
ComboBox.prototype.createBase=function(){
var div=document.createElement("div");
div.name=this.name+this.constBaseDivSuffix;
div.id=this.name+this.constBaseDivSuffix;
div.innerHTML="<TABLE cellSpacing='0' cellPadding='0' border='0' class='e-combobox'><TR><TD class='e-combobox-focus'><INPUT type='hidden' name='"+this.getControlName(this.constHiddenSuffix)+"' id='"+this.getControlName(this.constHiddenSuffix)+"'><INPUT class='e-combobox-input' id='"+this.getControlName(this.constInputSuffix)+"'></TD><TD><DIV class='e-combobox-button' onclick='"+this.name+".toggle()'></DIV></TD></TR></TABLE>";
this.parent.appendChild(div);
this.valcon=this.getControl(this.constHiddenSuffix);
this.txtview=this.getControl(this.constInputSuffix);
return div;
};
ComboBox.prototype.choose=function(_284,_285){
this.value=_284;
var _286=this.name+".txtview.value='"+_285+"'";
window.setTimeout(_286,1);
this.valcon.value=_284;
if(this.onChangeSelected){
this.onChangeSelected(this.value);
}
};
Array.prototype.remove=function(dx){
if(isNaN(dx)||dx>this.length){
self.status="Array_remove:invalid request-"+dx;
return false;
}
for(var i=0,n=0;i<this.length;i++){
if(this[i]!=this[dx]){
this[n++]=this[i];
}
}
this.length-=1;
};
ComboBox.prototype.getDIV=function(el){
var _28b=el;
while(_28b.nodeName!="DIV"&&_28b.nodeName!="BODY"){
if(_28b.parentNode!=null){
_28b=_28b.parentNode;
}else{
break;
}
}
return _28b;
};
ComboBox.prototype.getItem=function(_28c){
var i;
var _28e=null;
for(i=0;i<this.options.length;i++){
_28e=this.options[i];
if(_28e.value==_28c){
return _28e;
}
}
if(this.options.length>0){
return this.options[0];
}else{
return null;
}
};
ComboBox.prototype.setValue=function(_28f,_290){
var item=this.getItem(_28f);
if(item!=null){
this.value=item.value;
this.valcon.value=item.value;
this.txtview.value=item.text;
}else{
this.value=-1;
this.valcon.value=-1;
this.txtview.value="";
}
if(_290&&this.onChangeSelected){
this.onChangeSelected(this.value);
}
};
ComboBox.prototype.mouseDown=function(e){
var _293,el;
el=e.target?e.target:e.srcElement;
var _295=this.getDIV(el);
if(_295==this.opslist||_295==this.view){
return;
}
for(i=0;i<Global_combo_array.length;i++){
_293=Global_combo_array[i];
if(_295==_293.opslist||_295==_293.view){
continue;
}
if(_293.opslist){
_293.opslist.style.display="none";
}
}
};
ComboBox.prototype.handleKey=function(e){
var _297,el;
el=e.target?e.target:e.srcElement;
var _299=this.getDIV(el);
if(_299!=this.view){
return;
}
this.expops.length=0;
this.update();
this.build(this.expops);
if(this.expops.length==1&&this.expops[0].text=="(No matches)"){
}else{
this.opslist.style.display="block";
}
this.value=this.txtview.value;
this.valcon.value=this.txtview.value;
};
ComboBox.prototype.update=function(){
var _29a,astr,alen,opln,i,boo;
boo=false;
opln=this.options.length;
astr=this.txtview.value.toLowerCase();
alen=astr.length;
if(alen==0){
for(i=0;i<opln;i++){
this.expops[this.expops.length]=this.options[i];
boo=true;
}
}else{
for(i=0;i<opln;i++){
_29a=this.options[i].text.toLowerCase().substring(0,alen);
if(astr==_29a){
this.expops[this.expops.length]=this.options[i];
boo=true;
}
}
}
if(!boo){
this.expops[0]=new ComboBoxItem("(No matches)","");
}
};
ComboBox.prototype.remove=function(_2a0){
this.options.remove(_2a0);
};
ComboBox.prototype.add=function(){
var i,_2a2;
_2a2=arguments.length;
for(i=0;i<_2a2;i++){
this.options[this.options.length]=arguments[i];
}
};
ComboBox.prototype.build=function(arr){
var str,_2a5;
_2a5=arr.length;
str="<table class=\"e-combo-list-width\" cellpadding=0 cellspacing=0>";
var strs=new Array(_2a5);
for(var i=0;i<_2a5;i++){
strs[i]="<tr>"+"<td class=\"e-combo-item\" onClick=\""+this.name+".choose('"+arr[i].value+"','"+arr[i].text+"');"+this.name+".opslist.style.display='none';\""+"onMouseOver=\"this.className='e-combo-hilite';\" onMouseOut=\"this.className='e-combo-item'\" >&nbsp;"+arr[i].text+"&nbsp;</td>"+"</tr>";
}
str=str+strs.join("")+"</table>";
if(this.opslist){
this.view.removeChild(this.opslist);
}
this.opslist=document.createElement("DIV");
this.opslist.name=this.name+this.constListDivSuffix;
this.opslist.id=this.name+this.constListDivSuffix;
this.opslist.innerHTML=str;
this.opslist.style.position="absolute";
this.opslist.style.display="none";
this.opslist.className="e-combo-list";
this.opslist.onselectstart=ComboBox.returnFalse;
this.opslist.style.width=this.view.clientWidth+"px";
this.view.appendChild(this.opslist);
};
ComboBox.prototype.toggle=function(){
if(this.opslist){
if(this.opslist.style.display=="block"){
this.opslist.style.display="none";
}else{
this.update();
this.build(this.options);
this.view.style.zIndex=++ComboBox.prototype.COMBOBOXZINDEX;
this.opslist.style.display="block";
}
}else{
this.update();
this.build(this.options);
this.view.style.zIndex=++ComboBox.prototype.COMBOBOXZINDEX;
this.opslist.style.display="block";
}
};
ComboBox.prototype.COMBOBOXZINDEX=1000;
ComboBox.prototype.init=function(_2a8){
if(document.addEventListener){
document.addEventListener("keyup",function(e){
_2a8.handleKey(e);
},false);
document.addEventListener("mousedown",function(e){
_2a8.mouseDown(e);
},false);
}else{
if(document.attachEvent){
document.attachEvent("onkeyup",function(){
_2a8.handleKey(window.event);
});
document.attachEvent("onmousedown",function(){
_2a8.mouseDown(window.event);
});
}
}
};
ComboBoxItem=function(text,_2ac){
this.text=text;
this.value=_2ac;
};
ComboBox.returnFalse=function(){
return false;
};
ComboBox.prototype.clearItems=function(){
this.options=new Array();
};
ComboBox.prototype.renderItems=function(_2ad,_2ae,_2af){
this.clearItems();
if(_2ad==null){
return;
}
for(var i=0;i<_2ad.length;i++){
this.add(new ComboBoxItem(_2ad[i][_2af],_2ad[i][_2ae]));
}
};
jsFileName="ListBox.js";
ListBox=function(){
if(arguments.length==0){
self.status="ListBox invalid - no name argument";
}
this.name=arguments[0];
this.parent=arguments[1]||document.body;
this.constBaseDivSuffix="_base";
this.constHiddenSuffix="_hidden";
this.clearItems();
this.selectedItems=new Array();
this.onChangeSelected=null;
this.view=this.createBase();
this.parent.appendChild(this.view);
this.parent.appendChild(this.createHidden());
var br=ListBox.is_ie?"":"<br>";
var _2b2=jQuery("<a id=\""+this.name+"Clear\""+" onclick=\""+this.name+".removeAll();"+"\""+" style=\"cursor:pointer;\""+">"+br+"Очистить</a>")[0];
this.parent.appendChild(_2b2);
this.valcon=this.getControl(this.constHiddenSuffix);
};
ListBox.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));
ListBox.is_ie5=(ListBox.is_ie&&/msie 5\.0/i.test(navigator.userAgent));
ListBox.is_opera=/opera/i.test(navigator.userAgent);
ListBox.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);
ListBox.is_firefox=/Firefox/i.test(navigator.userAgent);
ListBox.prototype.getControlName=function(_2b3){
return this.name+_2b3;
};
ListBox.prototype.getControl=function(_2b4){
return document.getElementById(this.getControlName(_2b4));
};
ListBox.prototype.createHidden=function(){
var span;
span=document.createElement("SPAN");
span.innerHTML="<input type='hidden' id='"+this.getControlName(this.constHiddenSuffix)+"' name='"+this.getControlName(this.constHiddenSuffix)+"'/>";
return span;
};
ListBox.prototype.createBase=function(){
var div;
div=document.createElement("DIV");
div.name=this.name+this.constBaseDivSuffix;
div.id=this.name+this.constBaseDivSuffix;
div.className="e-listbox";
return div;
};
ListBox.prototype.getValue=function(_2b7){
if(typeof (this.options[_2b7].value)!="undefined"){
return this.options[_2b7].value;
}else{
return this.options[_2b7].text;
}
};
ListBox.prototype.isSelected=function(_2b8){
for(i=0;i<this.selectedItems.length;i++){
if(this.selectedItems[i]==_2b8){
return true;
}
}
return false;
};
ListBox.prototype.removeValue=function(_2b9){
var _2ba=false;
for(var i=0,n=0;i<this.selectedItems.length;i++){
if(this.selectedItems[i]!=_2b9||_2ba){
this.selectedItems[n++]=this.selectedItems[i];
}else{
_2ba=true;
}
}
if(_2ba){
this.selectedItems.length-=1;
}
this.valcon.value=this.selectedItems.join(",");
};
ListBox.prototype.removeAll=function(){
this.selectedItems=[];
this.valcon.value="";
this.dataBind();
if(this.onChangeSelected){
this.onChangeSelected(this.selectedItems);
}
};
ListBox.prototype.addValue=function(_2bd){
this.selectedItems.length+=1;
this.selectedItems[this.selectedItems.length-1]=_2bd;
this.valcon.value=this.selectedItems.join(",");
};
ListBox.prototype.getClassName=function(_2be){
if(this.isSelected(_2be)){
return "e-listbox-selected";
}else{
return "e-listbox-item";
}
};
ListBox.prototype.getClassNameHilite=function(_2bf){
if(this.isSelected(_2bf)){
return "e-listbox-selected";
}else{
return "e-listbox-hilite";
}
};
ListBox.prototype.onClick=function(obj,_2c1){
if(this.isSelected(_2c1)){
this.removeValue(_2c1);
}else{
this.addValue(_2c1);
}
obj.className=this.getClassNameHilite(_2c1);
this.dataBind();
if(this.onChangeSelected){
this.onChangeSelected(this.selectedItems);
}
};
ListBox.prototype.onMouseOver=function(obj,_2c3){
obj.className=this.getClassNameHilite(_2c3);
};
ListBox.prototype.onMouseOut=function(obj,_2c5){
obj.className=this.getClassName(_2c5);
};
ListBox.prototype.dataBind=function(){
if(this.options==null){
return;
}
var _2c6,_2c7,_2c8,_2c9;
var _2ca;
_2c6="<table cellpadding=0 cellspacing=0>";
var _2cb=new Array(this.options.length);
for(var i=0;i<this.options.length;i++){
_2ca=this.getClassName(this.getValue(i));
_2c7=this.name+".onClick(this,"+this.getValue(i)+");";
_2c8=this.name+".onMouseOver(this,"+this.getValue(i)+");";
_2c9=this.name+".onMouseOut(this,"+this.getValue(i)+");";
_2cb[i]="<tr><td class='"+_2ca+"' onClick='"+_2c7+"' onMouseOver='"+_2c8+"' onMouseOut='"+_2c9+"'>"+this.options[i].text+"</td></tr>";
}
_2c6=_2c6+_2cb.join("")+"</table>";
if(this.view!=null){
this.view.innerHTML=_2c6;
}
};
ListBoxItem=function(text,_2ce){
this.text=text;
this.value=_2ce;
};
ListBox.prototype.clearItems=function(){
this.options=new Array();
};
ListBox.prototype.add=function(){
var i,_2d0;
_2d0=arguments.length;
for(i=0;i<_2d0;i++){
this.options[this.options.length]=arguments[i];
}
};
ListBox.prototype.remove=function(_2d1){
this.options.remove(_2d1);
};
ListBox.prototype.renderItems=function(_2d2,_2d3,_2d4,bind){
if(typeof (bind)=="undefined"){
bind=true;
}
this.clearItems();
if(_2d2==null){
return;
}
for(var i=0;i<_2d2.length;i++){
this.add(new ListBoxItem(_2d2[i][_2d4],_2d2[i][_2d3]));
}
if(bind){
this.dataBind();
}
};
ListBox.prototype.setValues=function(_2d7,_2d8){
this.selectedItems=[];
this.valcon.value="";
for(var i=0;i<_2d7.length;i++){
this.addValue(_2d7[i]);
}
this.dataBind();
if(_2d8&&this.onChangeSelected){
this.onChangeSelected(this.values);
}
};
jsFileName="Setup.js";
var responseEncoding="UTF-8";
SetupDateTime.LocalDateFormat="%d.%m.%Y";
var HideToursWithoutFlights="true";
var interrelationshipsOfDepartureCitiesAndDestinationCountries="DestinationCountriesDependsOnDepartureCities";
var openShowcasePageInNewWindow="false";
var showcasePageWidth=950;
var showcasePageHeight=1050;
var showcasePageShouldBeResized="false";
var showcasePageMaximized="true";
var openResultsPageInNewWindow="true";
var resultsPageWidth=950;
var resultsPageHeight=900;
var resultsPageShouldBeResized="true";
var resultsPageMaximized="false";
var openViewPageInNewWindow="true";
var viewPageWidth=600;
var viewPageHeight=800;
var viewPageShouldBeResized="true";
var viewPageMaximized="true";
var openHotelPageInNewWindow="true";
var hotelPageWidth=950;
var hotelPageHeight=1050;
var hotelPageShouldBeResized="true";
var hotelPageMaximized="true";
var showExternalHotelReferences="true";
var openSatellitePicturePageInNewWindow="true";
var satellitePicturePageWidth=950;
var satellitePicturePageHeight=810;
var satellitePicturePageShouldBeResized="true";
var satellitePicturePageMaximized="true";
var openCountriesInNewWindow="false";
var countriesListPageWidth=950;
var countriesListPageHeight=1050;
var countriesListPageShouldBeResized="true";
var countriesListPageMaximized="true";
var countriesListColumnsCount=2;
var openCitiesInNewWindow="false";
var citiesListPageWidth=950;
var citiesListPageHeight=1050;
var citiesListPageShouldBeResized="true";
var citiesListPageMaximized="true";
var citiesListColumnsCount=2;
var openHotelsInNewWindow="false";
var hotelsListPageWidth=950;
var hotelsListPageHeight=1050;
var hotelsListPageShouldBeResized="true";
var hotelsListPageMaximized="true";
var hotelsListColumnsCount=2;
var DefaultCountryCode="+7";
var DefaultCityCode="(3812)";
var DefaultPhoneNumber="";
var toValidatePhoneNumber=false;
var remoteUri="http://remote.bronni.ru";
var countriesListPage="../Html/HotelCatalog-Countries.htm";
var citiesListPage="../Html/HotelCatalog-Cities.htm";
var hotelsListPage="../Html/HotelCatalog-Hotels.htm";
var searchPage="../Html/SearchForm.htm";
var resultPage="../Html/Results.htm";
var viewPage="../Html/PriceDetails.htm";
var actualPage="http://www.elmis-travel.ru/Html/Actualize.htm";
var hotelPage="../Html/HotelDetails.htm";
var satellitePicturePage="../Html/SatellitePicture.htm";
var hotelIconsPath="../Images/HotelMarkerIcons";
var HotelPhotoMaxWidth=640;
var HotelPhotoMaxHeight=480;
var DefaultDepartureCity=505;
var DefaultDestinationCountry=5;
var BeginDate=new Date().addDays(9);
var EndDate=BeginDate.addDays(14);
var AdultCount=2;
var ChildCount=-1;
var BeginCost=-1;
var EndCost=-1;
var DefaultCurrency=4;
var BeginNights=7;
var EndNights=14;
var PriceCountPerPage=30;
var googleKey="ABQIAAAAnE97o7VUahs4bCr1jEV-SBTuszRAH6e1s1FdrRFp2utBjZRM8hR2FUbQb2qUbih7HrWmSQIA1hzuMw";
var DefaultDepartureCities=[505,176,677,5570,1];
var DefaultDestinationCountries=[];
var Currencies=[1,4,5];
var HideCurrenciesFilter="false";
var IncludingFiltersOperators=[];
var OperatorCountry=[];
var countriesEmail=[{managerEmail:"",countryList:[-1,-1,-1]},{managerEmail:"",countryList:[-1,-1,-1]},{managerEmail:"",countryList:[-1,-1,-1]}];
var defaultManagerEmail="bronni@elmis-travel.ru";
var hotelIcons=[{hotelStarId:"1",iconFileName:"s1.png"},{hotelStarId:"2",iconFileName:"s2.png"},{hotelStarId:"3",iconFileName:"s3.png"},{hotelStarId:"4",iconFileName:"s4.png"},{hotelStarId:"5",iconFileName:"s5.png"},{hotelStarId:"7",iconFileName:"sHV.png"},];
var defaultHotelIcon="s.png";
jsFileName="DictionariesdataSource.js";
var departureCitiesDS=null;
var destinationCountriesDS=null;
var selectedDepartureCityId=DefaultDepartureCity;
var selectedDestinationCountryId=DefaultDestinationCountry;
var selectedCurrencyId=DefaultCurrency;
var selectedDestinationCitiesIds=[];
var selectedHotelIds=[];
var selectedStarIds=[];
var dictObject=null;
var citiesDS=null;
var hotelsDS=null;
var hotelsExDS=null;
var starsDS=null;
var mealsDS=null;
var currenciesDS=null;
var operatorsDS=null;
try{
dictObject=new Dictionaries(remoteUri+"/Dictionaries.ashx");
}
catch(e){
}
function LoadOperators(_2da){
function _2db(_2dc){
operatorsDS=_2dc.result;
_2da();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getOperators(_2db);
};
function LoadOperatorsByDepartureCityAndDestination(_2dd,_2de,_2df,_2e0){
function _2e1(_2e2){
operatorsDS=_2e2.result;
_2e0();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getOperatorsByDepartureCityAndDestination(_2dd,_2de,_2df,_2e1);
};
function LoadDepartureCitiesByDestinationCountry(_2e3,_2e4){
function _2e5(_2e6){
departureCitiesDS=_2e6.result;
_2e4();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getDepartureCitiesByDestinationCountry(_2e3,_2e5);
};
function LoadDestinationCountriesByDepartureCity(_2e7,_2e8){
function _2e9(_2ea){
destinationCountriesDS=_2ea.result;
_2e8();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getDestinationCountriesByDepartureCity(_2e7,_2e9);
};
function LoadDestinationCountries(_2eb){
function _2ec(_2ed){
destinationCountriesDS=_2ed.result;
_2eb();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getDestinationCountries(_2ec);
};
function LoadCountriesWithHotels(_2ee){
function _2ef(_2f0){
destinationCountriesDS=_2f0.result;
_2ee();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getCountriesWithHotels(_2ef);
};
function LoadDestinationCities(id,_2f2){
function _2f3(_2f4){
citiesDS=_2f4.result;
_2f2();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getDestinationCities(id,_2f3);
};
function LoadCitiesWithHotels(id,_2f6){
function _2f7(_2f8){
citiesDS=_2f8.result;
_2f6();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getCitiesWithHotels(id,_2f7);
};
function LoadHotels(_2f9,_2fa,_2fb,_2fc){
function _2fd(_2fe){
hotelsDS=_2fe.result;
_2fc();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getHotels(_2f9,_2fa,_2fb,_2fd);
};
function LoadHotelsEx(_2ff,_300,_301,_302){
function _303(_304){
hotelsExDS=_304.result;
_302();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getHotelsEx(_2ff,_300,_301,_303);
};
function LoadPrincipalHotels(_305,_306){
function _307(_308){
hotelsDS=_308.result;
_306();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getPrincipalHotels(_305,_307);
};
function ClearHotels(){
hotelsDS=[];
};
function LoadDepartureCities_callback(){
RenderItemsComboBox(departureCitiesDS,DepartureCityComboBox,DefaultDepartureCities);
DepartureCityComboBox.setValue(selectedDepartureCityId,true);
};
function LoadDepartureCities(_309){
function _30a(_30b){
departureCitiesDS=_30b.result;
_309();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getDepartureCities(_30a);
};
function LoadStars(_30c){
function _30d(_30e){
starsDS=_30e.result;
_30c();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
dictObject.getStars(_30d);
};
function LoadMeals(_30f){
function _310(_311){
mealsDS=_311.result;
_30f();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
mealsDS=dictObject.getMeals(_310);
};
function LoadCurrencies(_312,_313){
function _314(_315){
currenciesDS=_315.result;
_313();
ToggleWaitBox("hide");
};
ToggleWaitBox("show");
currenciesDS=dictObject.getCurrenciesByIds(_312,_314);
};
function CreateQueryString(_316){
var _317="";
_317+="?departureCity_sm="+_316.DepartureCityComboBox_hidden+"";
_317+="&destinationCountry_sm="+_316.DestinationCountryComboBox_hidden+"";
_317+="&meals_sm="+_316.MealsListBox_hidden+"";
_317+="&stars_sm="+_316.StarsListBox_hidden+"";
_317+="&hotels_sm="+_316.HotelsListBox_hidden+"";
_317+="&destinationCities_sm="+_316.DestinationCitiesListBox_hidden+"";
_317+="&adultsCount_sm="+_316.AdultTextBox+"";
_317+="&childrenCount_sm="+_316.ChildTextBox+"";
_317+="&nightsFrom_sm="+_316.NightsFromTextBox+"";
_317+="&nightsTo_sm="+_316.NightsToTextBox+"";
_317+="&checkinDateFrom_sm="+_316.DateFromTextBox+"";
_317+="&checkinDateTo_sm="+_316.DateToTextBox+"";
_317+="&costFrom_sm="+_316.PriceFromTextBox+"";
_317+="&costTo_sm="+_316.PriceToTextBox+"";
_317+="&currency_sm="+_316.CurrencyComboBox_hidden+"";
return _317;
};
jsFileName="Events.js";
function IsFilterContains(_318,_319){
if(_318.length==0){
return true;
}
for(i=0;i<_318.length;i++){
if(_318[i]==_319){
return true;
}
}
return false;
};
function RenderItemsComboBox(_31a,_31b,_31c){
_31b.clearItems();
if(_31a==null){
return;
}
for(var i=0;i<_31a.length;i++){
if(_31c&&IsFilterContains(_31c,_31a[i].id)){
var _31e;
if(_31a[i].russianName!=null){
_31e=_31a[i].russianName;
}
if(_31a[i].key!=null){
_31e=_31a[i].key;
}
_31b.add(new ComboBoxItem(_31e,_31a[i].id));
}
}
};
function RenderItemsListBox(_31f,_320){
if(_31f==null){
return;
}
_320.clearItems();
for(var i=0;i<_31f.length;i++){
_320.add(new ListBoxItem(_31f[i].russianName,_31f[i].id));
}
_320.dataBind();
};
function ClearList(_322){
};
function LoadDestinationCities_callback(){
RenderItemsListBox(citiesDS,DestinationCitiesListBox);
selectedDestinationCitiesIds=[];
ClearHotels();
RenderItemsListBox(hotelsDS,HotelsListBox);
};
function LoadDestinationCountries_callback(){
RenderItemsComboBox(destinationCountriesDS,DestinationCountryComboBox,DefaultDestinationCountries);
DestinationCountryComboBox.setValue(selectedDestinationCountryId,true);
};
function OnSelectDepartureCity(_323){
selectedDepartureCityId=_323;
switch(interrelationshipsOfDepartureCitiesAndDestinationCountries){
case "DestinationCountriesDependsOnDepartureCities":
LoadDestinationCountriesByDepartureCity(selectedDepartureCityId,LoadDestinationCountries_callback);
break;
default:
}
};
function OnSelectDestinationCountry(_324){
selectedDestinationCountryId=_324;
DestinationCitiesListBox.setValues([],false);
HotelsListBox.setValues([],false);
selectedDestinationCitiesIds=[];
selectedHotelIds=[];
switch(interrelationshipsOfDepartureCitiesAndDestinationCountries){
case "DepartureCitiesDependsOnDestinationCountries":
LoadDepartureCitiesByDestinationCountry(selectedDestinationCountryId,LoadDepartureCities_callback);
LoadDestinationCities(selectedDestinationCountryId,LoadDestinationCities_callback);
break;
default:
LoadDestinationCities(selectedDestinationCountryId,LoadDestinationCities_callback);
}
};
function LoadHotels_callback(){
RenderItemsListBox(hotelsDS,HotelsListBox);
ClearRedundantHotels();
};
function OnSelectDestinationCity(_325){
selectedDestinationCitiesIds=_325;
if(selectedDestinationCitiesIds.length>0){
LoadHotels(selectedDestinationCountryId,selectedDestinationCitiesIds,selectedStarIds,LoadHotels_callback);
}else{
hotelsDS=new Array();
LoadHotels_callback();
}
};
function OnSelectStar(_326){
selectedStarIds=_326;
LoadHotels(selectedDestinationCountryId,selectedDestinationCitiesIds,selectedStarIds,LoadHotels_callback);
};
function ClearRedundantHotels(){
var _327=HotelsListBox.selectedItems;
var _328=GetHotelList();
var _329=new Array();
for(var i=0;i<_327.length;i++){
if(Contains(_328,_327[i])){
_329.push(_327[i]);
}
}
HotelsListBox.selectedItems=_329;
HotelsListBox.valcon.value=_329.join(",");
};
function GetHotelList(){
var _32b=new Array();
var _32c=HotelsListBox.options;
for(var i=0;i<_32c.length;i++){
_32b.push(_32c[i].value);
}
return _32b;
};
jsFileName="PriceProxy.js";
function Price(url){
this["getShowcase"]=function(_32f,_330){
var ajax=new AJAX(url);
return ajax.call("getShowcase",[_32f],["showcaseElements"],_330);
};
this["searchFirstPage"]=function(_332,_333,_334){
var ajax=new AJAX(url);
return ajax.call("searchFirstPage",[_332,_333],["searchFilter","pricePerPage"],_334);
};
this["getFirstPageEx"]=function(_336,_337,_338,_339,_33a,_33b,_33c,_33d,_33e,_33f,_340,_341,_342,_343,_344,_345,_346,_347){
var ajax=new AJAX(url);
return ajax.call("getFirstPageEx",[_336,_337,_338,_339,_33a,_33b,_33c,_33d,_33e,_33f,_340,_341,_342,_343,_344,_345,_346],["country","departureCity","cities","hotels","stars","meals","dateFrom","dateTo","adultCount","childCount","durationFrom","durationTo","priceFrom","priceTo","operators","pageSize","hideToursWithoutFlights"],_347);
};
this["getPage"]=function(guid,page,_34b,_34c){
var ajax=new AJAX(url);
return ajax.call("getPage",[guid,page,_34b],["guid","page","pageSize"],_34c);
};
this["getIdsEx"]=function(_34e,_34f,_350,_351,_352,_353,_354,_355,_356,_357,_358,_359,_35a,_35b,_35c,_35d,_35e,_35f){
var ajax=new AJAX(url);
return ajax.call("getIdsEx",[_34e,_34f,_350,_351,_352,_353,_354,_355,_356,_357,_358,_359,_35a,_35b,_35c,_35d,_35e],["country","departureCity","cities","hotels","stars","meals","dateFrom","dateTo","adultCount","childCount","durationFrom","durationTo","priceFrom","priceTo","operators","maxCount","hideToursWithoutFlights"],_35f);
};
this["getPrices"]=function(_361,_362,_363,_364,_365,_366,_367,_368,_369,_36a,_36b,_36c,_36d,_36e,_36f,_370,_371){
var ajax=new AJAX(url);
return ajax.call("getPrices",[_361,_362,_363,_364,_365,_366,_367,_368,_369,_36a,_36b,_36c,_36d,_36e,_36f,_370],["country","departureCity","cities","hotels","stars","meals","dateFrom","dateTo","adultCount","childCount","durationFrom","durationTo","priceFrom","priceTo","operators","maxCount"],_371);
};
this["getObjects"]=function(ids,_374){
var ajax=new AJAX(url);
return ajax.call("getObjects",[ids],["ids"],_374);
};
this["getPriceByPriceIdAndCurrencyId"]=function(_376,_377,_378){
var ajax=new AJAX(url);
return ajax.call("getPriceByPriceIdAndCurrencyId",[_376,_377],["priceId","currencyId"],_378);
};
this["getActualization"]=function(id,_37b){
var ajax=new AJAX(url);
return ajax.call("getActualization",[id],["id"],_37b);
};
var url=typeof (url)==="string"?url:"http://remote.module.bronni.ru/Price.ashx";
};
Price.rpcMethods=["getShowcase","searchFirstPage","getFirstPageEx","getPage","getIdsEx","getPrices","getObjects","getPriceByPriceIdAndCurrencyId","getActualization"];
jsFileName="ObjectModel/Showcase.js";
ShowcaseElement=function(){
this.departureCity=-1;
this.destinationCountry=-1;
this.destinationCities=[];
this.hotels=[];
this.stars=[];
this.meals=[];
this.departureDateFromNowCount=-1;
this.departureDateCount=-1;
this.nightsFrom=-1;
this.nightsTo=-1;
this.priceFrom=-1;
this.priceTo=-1;
this.adult=-1;
this.child=-1;
this.operatorIds=[];
this.hideToursWithoutFlights="false";
this.positionCount=-1;
this.filtrateIdenticalHotels=false;
};
ShowcaseElement.prototype.Validate=function(){
if(this.destinationCountry<1){
return "Страна не задана";
}
if(this.departureDateFromNowCount<0){
return "Дата вылета не задана";
}
if(this.departureDateCount<1){
return "Дата вылета не задана";
}
if(this.departureCity<1){
return "Город вылета не задан";
}
if(this.adult<0){
return "Количество взрослых не задано";
}
if(this.positionCount<1){
return "Количество позиций не задано или меньше 1";
}
return "OK";
};
jsFileName="PageScripts/Showcase.js";
var dictionary;
var newWindowInAnchor;
var hotelPageTargetAttribute;
function GetShowcase(){
for(var i=0;i<Showcase.length;i++){
var _37e=Showcase[i].Validate();
if(_37e!="OK"){
alert(_37e);
ToggleShowcaseWaitBox("hide");
return;
}
}
var _37f=[];
_37f.push(Showcase);
var _380=null;
_380=new Price(remoteUri+"/Price.ashx");
_380.getShowcase(_37f,showcase_callback);
};
function showcase_callback(_381){
ToggleShowcaseWaitBox("hide");
if((_381.error==null)&&(_381.result!=null)){
var _382=getArrayWithoutNull(_381.result);
if(_382.length>0){
drawShowcase(_382);
}
}else{
if(_381.error!=null){
if(_381.error.message!=null){
alert(_381.error.message);
}
}
}
};
function drawShowcase(_383){
var _384=document.getElementById("Showcase");
var _385=document.getElementById("showcaseFirstElement");
var _386=document.getElementById("Tour");
if((_384!=null)&&(_385!=null)&&(_386!=null)){
var _387=_384.tBodies[0];
var _388=_385.cloneNode(false);
_388.id="";
_385=_388.cloneNode(false);
var row=_387.rows[0];
row.parentNode.removeChild(row);
for(var tr=0;tr<ShowcaseHeight;tr++){
for(var td=0;td<ShowcaseWidth;td++){
var _38c=tr*ShowcaseWidth+td;
if(_38c>=_383.length){
return;
}
if(td==0){
var _38d=document.createElement("tr");
_38d.appendChild(_385);
_387.appendChild(_38d);
}else{
_387.rows[tr].appendChild(_385);
}
var _38e=_386.cloneNode(true);
drawTour(_38e,_383[_38c]);
_385.appendChild(_38e);
_38e.style.display="block";
_385=_388.cloneNode(false);
}
}
}
};
function drawTour(view,tour){
var _391=view.childNodes;
var _392;
for(var i=0;i<_391.length;i++){
_392=_391[i];
if(_392.className!=null){
switch(_392.className){
case "anchorHotel":
var _394="";
_394+="?hotelId_sm="+tour.price.hotel.id;
_394+="&itemName_sm="+tour.price.hotel.russianName;
_394+="&windowWidth_sm="+hotelPageWidth;
_394+="&windowHeight_sm="+hotelPageHeight;
_394=escape(_394);
_392.href="javascript:windowOpen(\""+hotelPage+_394+"\", "+hotelPageWidth+", "+hotelPageHeight+", \""+hotelPageTargetAttribute+"\")";
break;
case "image":
_392.attributes.src.value=remoteUri+"/Handlers/HotelImageHandler.ashx?ImageGuid="+tour.imageGuid+"&MaximumSize="+imageMaxWidth+","+imageMaxHeight+"";
_392.alt=tour.price.hotel.russianName+", "+tour.price.star.russianName;
break;
case "anchorPrice":
var _394="";
_394+="?priceId_sm="+tour.price.id;
_394+="&currencyId_sm="+showcaseCurrencyId;
_394+="&windowWidth_sm="+viewPageWidth;
_394+="&windowHeight_sm="+viewPageHeight;
_392.href="javascript: windowOpen(\""+viewPage+_394+"\", "+viewPageWidth+", "+viewPageHeight+", "+openViewPageInNewWindow+");";
break;
case "destinationCountry":
_392.innerHTML=tour.price.country.russianName;
break;
case "hotel":
_392.innerHTML=tour.price.hotel.russianName+", "+tour.price.star.russianName;
break;
case "price":
if(priceRepresentation!="PricePerPerson"){
_392.innerHTML=tour.price.operatorPrice+" "+tour.price.operatorCurrency.key;
}else{
_392.innerHTML=tour.price.operatorPricePerPerson+" "+tour.price.operatorCurrency.key;
}
break;
case "departureDate":
_392.innerHTML=(Date.fromUTCString(tour.price.checkinDate)).toRUString();
break;
case "duration":
_392.innerHTML=tour.price.duration;
break;
case "touristsCount":
var _395=tour.price.adultCount+tour.price.childrenCount;
_392.innerHTML=_395;
break;
}
}
drawTour(_392,tour);
}
};
ToggleShowcaseWaitBox=function(_396){
var _397=document.getElementById("ShowcaseWaitBox");
if(_397!=null){
if(_396=="show"){
_397.style.display="inline";
}else{
if(_396=="hide"){
_397.style.display="none";
}
}
}
};
function SetupPageSize(){
ToggleShowcaseWaitBox("show");
var _398=640,_399=480;
if(parseInt(navigator.appVersion)>3){
_398=screen.availWidth;
_399=screen.availHeight;
if((hotelPageMaximized=="true")||(hotelPageMaximized==true)){
hotelPageWidth=_398;
hotelPageHeight=_399;
}
if((viewPageMaximized=="true")||(viewPageMaximized==true)){
viewPageWidth=_398;
viewPageHeight=_399;
}
}
dictionary=CreateDictionaryFromQueryString();
if((showcasePageShouldBeResized=="true")||(showcasePageShouldBeResized==true)){
var _39a=dictionary.windowWidth_sm,_39b=dictionary.windowHeight_sm;
if(_39a!=null&&_39b!=null){
window.resizeTo(_39a,_39b);
window.moveTo(0,0);
}
}
newWindowInAnchor=dictionary.newWindowInAnchor_sm;
if(newWindowInAnchor==null){
hotelPageTargetAttribute=openHotelPageInNewWindow;
}else{
hotelPageTargetAttribute=newWindowInAnchor;
}
};
SetupPageSize();

