/*Library\mootools.v1.11.js*/
var MooTools={
version:'1.11'
};
function $defined(obj){
return(obj!=undefined);
};
function $type(obj){
if(!$defined(obj))return false;
if(obj.htmlElement)return'element';
var type=typeof obj;
if(type=='object'&&obj.nodeName){
switch(obj.nodeType){
case 1:return'element';
case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';
}
}
if(type=='object'||type=='function'){
switch(obj.constructor){
case Array:return'array';
case RegExp:return'regexp';
case Class:return'class';
}
if(typeof obj.length=='number'){
if(obj.item)return'collection';
if(obj.callee)return'arguments';
}
}
return type;
};
function $merge(){
var mix={};
for(var i=0;i<arguments.length;i++){
for(var property in arguments[i]){
var ap=arguments[i][property];
var mp=mix[property];
if(mp&&$type(ap)=='object'&&$type(mp)=='object')mix[property]=$merge(mp,ap);
else mix[property]=ap;
}
}
return mix;
};
var $extend=function(){
var args=arguments;
if(!args[1])args=[this,args[0]];
for(var property in args[1])args[0][property]=args[1][property];
return args[0];
};
var $native=function(){
for(var i=0,l=arguments.length;i<l;i++){
arguments[i].extend=function(props){
for(var prop in props){
if(!this.prototype[prop])this.prototype[prop]=props[prop];
if(!this[prop])this[prop]=$native.generic(prop);
}
};
}
};
$native.generic=function(prop){
return function(bind){
return this.prototype[prop].apply(bind,Array.prototype.slice.call(arguments,1));
};
};
$native(Function,Array,String,Number);
function $chk(obj){
return!!(obj||obj===0);
};
function $pick(obj,picked){
return $defined(obj)?obj:picked;
};
function $random(min,max){
return Math.floor(Math.random()*(max-min+1)+min);
};
function $time(){
return new Date().getTime();
};
function $clear(timer){
clearTimeout(timer);
clearInterval(timer);
return null;
};
var Abstract=function(obj){
obj=obj||{};
obj.extend=$extend;
return obj;
};
var Window=new Abstract(window);
var Document=new Abstract(document);
document.head=document.getElementsByTagName('head')[0];
window.xpath=!!(document.evaluate);
if(window.ActiveXObject)window.ie=window[window.XMLHttpRequest?'ie7':'ie6']=true;
else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=window[window.xpath?'webkit420':'webkit419']=true;
else if(document.getBoxObjectFor!=null)window.gecko=true;
window.khtml=window.webkit;
Object.extend=$extend;
if(typeof HTMLElement=='undefined'){
var HTMLElement=function(){};
if(window.webkit)document.createElement("iframe");
HTMLElement.prototype=(window.webkit)?window["[[DOMElement.prototype]]"]:{};
}
HTMLElement.prototype.htmlElement=function(){};
if(window.ie6)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){};
var Class=function(properties){
var klass=function(){
return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=='function')?this.initialize.apply(this,arguments):this;
};
$extend(klass,this);
klass.prototype=properties;
klass.constructor=Class;
return klass;
};
Class.empty=function(){};
Class.prototype={
extend:function(properties){
var proto=new this(null);
for(var property in properties){
var pp=proto[property];
proto[property]=Class.Merge(pp,properties[property]);
}
return new Class(proto);
},
implement:function(){
for(var i=0,l=arguments.length;i<l;i++)$extend(this.prototype,arguments[i]);
}
};
Class.Merge=function(previous,current){
if(previous&&previous!=current){
var type=$type(current);
if(type!=$type(previous))return current;
switch(type){
case'function':
var merged=function(){
this.parent=arguments.callee.parent;
return current.apply(this,arguments);
};
merged.parent=previous;
return merged;
case'object':return $merge(previous,current);
}
}
return current;
};
var Chain=new Class({
chain:function(fn){
this.chains=this.chains||[];
this.chains.push(fn);
return this;
},
callChain:function(){
if(this.chains&&this.chains.length)this.chains.shift().delay(10,this);
},
clearChain:function(){
this.chains=[];
}
});
var Events=new Class({
addEvent:function(type,fn){
if(fn!=Class.empty){
this.$events=this.$events||{};
this.$events[type]=this.$events[type]||[];
this.$events[type].include(fn);
}
return this;
},
fireEvent:function(type,args,delay){
if(this.$events&&this.$events[type]){
this.$events[type].each(function(fn){
try{
fn.create({'bind':this,'delay':delay,'arguments':args})();
}catch(e){}
},this);
}
return this;
},
removeEvent:function(type,fn){
if(this.$events&&this.$events[type])this.$events[type].remove(fn);
return this;
}
});
var Options=new Class({
setOptions:function(){
this.options=$merge.apply(null,[this.options].extend(arguments));
if(this.addEvent){
for(var option in this.options){
if($type(this.options[option]=='function')&&(/^on[A-Z]/).test(option))this.addEvent(option,this.options[option]);
}
}
return this;
}
});
Array.extend({
forEach:function(fn,bind){
for(var i=0,j=this.length;i<j;i++)fn.call(bind,this[i],i,this);
},
filter:function(fn,bind){
var results=[];
for(var i=0,j=this.length;i<j;i++){
if(fn.call(bind,this[i],i,this))results.push(this[i]);
}
return results;
},
map:function(fn,bind){
var results=[];
for(var i=0,j=this.length;i<j;i++)results[i]=fn.call(bind,this[i],i,this);
return results;
},
every:function(fn,bind){
for(var i=0,j=this.length;i<j;i++){
if(!fn.call(bind,this[i],i,this))return false;
}
return true;
},
some:function(fn,bind){
for(var i=0,j=this.length;i<j;i++){
if(fn.call(bind,this[i],i,this))return true;
}
return false;
},
indexOf:function(item,from){
var len=this.length;
for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){
if(this[i]===item)return i;
}
return-1;
},
copy:function(start,length){
start=start||0;
if(start<0)start=this.length+start;
length=length||(this.length-start);
var newArray=[];
for(var i=0;i<length;i++)newArray[i]=this[start++];
return newArray;
},
remove:function(item){
var i=0;
var len=this.length;
while(i<len){
if(this[i]===item){
this.splice(i,1);
len--;
}else{
i++;
}
}
return this;
},
contains:function(item,from){
return this.indexOf(item,from)!=-1;
},
associate:function(keys){
var obj={},length=Math.min(this.length,keys.length);
for(var i=0;i<length;i++)obj[keys[i]]=this[i];
return obj;
},
extend:function(array){
for(var i=0,j=array.length;i<j;i++)this.push(array[i]);
return this;
},
merge:function(array){
for(var i=0,l=array.length;i<l;i++)this.include(array[i]);
return this;
},
include:function(item){
if(!this.contains(item))this.push(item);
return this;
},
getRandom:function(){
return this[$random(0,this.length-1)]||null;
},
getLast:function(){
return this[this.length-1]||null;
}
});
Array.prototype.each=Array.prototype.forEach;
Array.each=Array.forEach;
function $A(array){
return Array.copy(array);
};
function $each(iterable,fn,bind){
if(iterable&&typeof iterable.length=='number'&&$type(iterable)!='object'){
Array.forEach(iterable,fn,bind);
}else{
for(var name in iterable)fn.call(bind||iterable,iterable[name],name);
}
};
Array.prototype.test=Array.prototype.contains;
String.extend({
test:function(regex,params){
return(($type(regex)=='string')?new RegExp(regex,params):regex).test(this);
},
toInt:function(){
return parseInt(this,10);
},
toFloat:function(){
return parseFloat(this);
},
camelCase:function(){
return this.replace(/-\D/g,function(match){
return match.charAt(1).toUpperCase();
});
},
hyphenate:function(){
return this.replace(/\w[A-Z]/g,function(match){
return(match.charAt(0)+'-'+match.charAt(1).toLowerCase());
});
},
capitalize:function(){
return this.replace(/\b[a-z]/g,function(match){
return match.toUpperCase();
});
},
trim:function(){
return this.replace(/^\s+|\s+$/g,'');
},
clean:function(){
return this.replace(/\s{2,}/g,' ').trim();
},
rgbToHex:function(array){
var rgb=this.match(/\d{1,3}/g);
return(rgb)?rgb.rgbToHex(array):false;
},
hexToRgb:function(array){
var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
return(hex)?hex.slice(1).hexToRgb(array):false;
},
contains:function(string,s){
return(s)?(s+this+s).indexOf(s+string+s)>-1:this.indexOf(string)>-1;
},
escapeRegExp:function(){
return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');
}
});
Array.extend({
rgbToHex:function(array){
if(this.length<3)return false;
if(this.length==4&&this[3]==0&&!array)return'transparent';
var hex=[];
for(var i=0;i<3;i++){
var bit=(this[i]-0).toString(16);
hex.push((bit.length==1)?'0'+bit:bit);
}
return array?hex:'#'+hex.join('');
},
hexToRgb:function(array){
if(this.length!=3)return false;
var rgb=[];
for(var i=0;i<3;i++){
rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));
}
return array?rgb:'rgb('+rgb.join(',')+')';
}
});
Function.extend({
create:function(options){
var fn=this;
options=$merge({
'bind':fn,
'event':false,
'arguments':null,
'delay':false,
'periodical':false,
'attempt':false
},options);
if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];
return function(event){
var args;
if(options.event){
event=event||window.event;
args=[(options.event===true)?event:new options.event(event)];
if(options.arguments)args.extend(options.arguments);
}
else args=options.arguments||arguments;
var returns=function(){
return fn.apply($pick(options.bind,fn),args);
};
if(options.delay)return setTimeout(returns,options.delay);
if(options.periodical)return setInterval(returns,options.periodical);
if(options.attempt)try{return returns();}catch(err){return false;};
return returns();
};
},
pass:function(args,bind){
return this.create({'arguments':args,'bind':bind});
},
attempt:function(args,bind){
return this.create({'arguments':args,'bind':bind,'attempt':true})();
},
bind:function(bind,args){
return this.create({'bind':bind,'arguments':args});
},
bindAsEventListener:function(bind,args){
return this.create({'bind':bind,'event':true,'arguments':args});
},
delay:function(delay,bind,args){
return this.create({'delay':delay,'bind':bind,'arguments':args})();
},
periodical:function(interval,bind,args){
return this.create({'periodical':interval,'bind':bind,'arguments':args})();
}
});
Number.extend({
toInt:function(){
return parseInt(this);
},
toFloat:function(){
return parseFloat(this);
},
limit:function(min,max){
return Math.min(max,Math.max(min,this));
},
round:function(precision){
precision=Math.pow(10,precision||0);
return Math.round(this*precision)/precision;
},
times:function(fn){
for(var i=0;i<this;i++)fn(i);
}
});
var Element=new Class({
initialize:function(el,props){
if($type(el)=='string'){
if(window.ie&&props&&(props.name||props.type)){
var name=(props.name)?' name="'+props.name+'"':'';
var type=(props.type)?' type="'+props.type+'"':'';
delete props.name;
delete props.type;
el='<'+el+name+type+'>';
}
el=document.createElement(el);
}
el=$(el);
return(!props||!el)?el:el.set(props);
}
});
var Elements=new Class({
initialize:function(elements){
return(elements)?$extend(elements,this):this;
}
});
Elements.extend=function(props){
for(var prop in props){
this.prototype[prop]=props[prop];
this[prop]=$native.generic(prop);
}
};
function $(el){
if(!el)return null;
if(el.htmlElement)return Garbage.collect(el);
if([window,document].contains(el))return el;
var type=$type(el);
if(type=='string'){
el=document.getElementById(el);
type=(el)?'element':false;
}
if(type!='element')return null;
if(el.htmlElement)return Garbage.collect(el);
if(['object','embed'].contains(el.tagName.toLowerCase()))return el;
$extend(el,Element.prototype);
el.htmlElement=function(){};
return Garbage.collect(el);
};
document.getElementsBySelector=document.getElementsByTagName;
function $$(){
var elements=[];
for(var i=0,j=arguments.length;i<j;i++){
var selector=arguments[i];
switch($type(selector)){
case'element':elements.push(selector);
case'boolean':break;
case false:break;
case'string':selector=document.getElementsBySelector(selector,true);
default:elements.extend(selector);
}
}
return $$.unique(elements);
};
$$.unique=function(array){
var elements=[];
for(var i=0,l=array.length;i<l;i++){
if(array[i].$included)continue;
var element=$(array[i]);
if(element&&!element.$included){
element.$included=true;
elements.push(element);
}
}
for(var n=0,d=elements.length;n<d;n++)elements[n].$included=null;
return new Elements(elements);
};
Elements.Multi=function(property){
return function(){
var args=arguments;
var items=[];
var elements=true;
for(var i=0,j=this.length,returns;i<j;i++){
returns=this[i][property].apply(this[i],args);
if($type(returns)!='element')elements=false;
items.push(returns);
};
return(elements)?$$.unique(items):items;
};
};
Element.extend=function(properties){
for(var property in properties){
HTMLElement.prototype[property]=properties[property];
Element.prototype[property]=properties[property];
Element[property]=$native.generic(property);
var elementsProperty=(Array.prototype[property])?property+'Elements':property;
Elements.prototype[elementsProperty]=Elements.Multi(property);
}
};
Element.extend({
set:function(props){
for(var prop in props){
var val=props[prop];
switch(prop){
case'styles':this.setStyles(val);break;
case'events':if(this.addEvents)this.addEvents(val);break;
case'properties':this.setProperties(val);break;
default:this.setProperty(prop,val);
}
}
return this;
},
inject:function(el,where){
el=$(el);
switch(where){
case'before':el.parentNode.insertBefore(this,el);break;
case'after':
var next=el.getNext();
if(!next)el.parentNode.appendChild(this);
else el.parentNode.insertBefore(this,next);
break;
case'top':
var first=el.firstChild;
if(first){
el.insertBefore(this,first);
break;
}
default:el.appendChild(this);
}
return this;
},
injectBefore:function(el){
return this.inject(el,'before');
},
injectAfter:function(el){
return this.inject(el,'after');
},
injectInside:function(el){
return this.inject(el,'bottom');
},
injectTop:function(el){
return this.inject(el,'top');
},
adopt:function(){
var elements=[];
$each(arguments,function(argument){
elements=elements.concat(argument);
});
$$(elements).inject(this);
return this;
},
remove:function(){
return this.parentNode.removeChild(this);
},
clone:function(contents){
var el=$(this.cloneNode(contents!==false));
if(!el.$events)return el;
el.$events={};
for(var type in this.$events)el.$events[type]={
'keys':$A(this.$events[type].keys),
'values':$A(this.$events[type].values)
};
return el.removeEvents();
},
replaceWith:function(el){
el=$(el);
this.parentNode.replaceChild(el,this);
return el;
},
appendText:function(text){
this.appendChild(document.createTextNode(text));
return this;
},
hasClass:function(className){
return this.className.contains(className,' ');
},
addClass:function(className){
if(!this.hasClass(className))this.className=(this.className+' '+className).clean();
return this;
},
removeClass:function(className){
this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1').clean();
return this;
},
toggleClass:function(className){
return this.hasClass(className)?this.removeClass(className):this.addClass(className);
},
setStyle:function(property,value){
switch(property){
case'opacity':return this.setOpacity(parseFloat(value));
case'float':property=(window.ie)?'styleFloat':'cssFloat';
}
property=property.camelCase();
switch($type(value)){
case'number':if(!['zIndex','zoom'].contains(property))value+='px';break;
case'array':value='rgb('+value.join(',')+')';
}
this.style[property]=value;
return this;
},
setStyles:function(source){
switch($type(source)){
case'object':Element.setMany(this,'setStyle',source);break;
case'string':this.style.cssText=source;
}
return this;
},
setOpacity:function(opacity){
if(opacity==0){
if(this.style.visibility!="hidden")this.style.visibility="hidden";
}else{
if(this.style.visibility!="visible")this.style.visibility="visible";
}
if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;
if(window.ie)this.style.filter=(opacity==1)?'':"alpha(opacity="+opacity*100+")";
this.style.opacity=this.$tmp.opacity=opacity;
return this;
},
getStyle:function(property){
property=property.camelCase();
var result=this.style[property];
if(!$chk(result)){
if(property=='opacity')return this.$tmp.opacity;
result=[];
for(var style in Element.Styles){
if(property==style){
Element.Styles[style].each(function(s){
var style=this.getStyle(s);
result.push(parseInt(style)?style:'0px');
},this);
if(property=='border'){
var every=result.every(function(bit){
return(bit==result[0]);
});
return(every)?result[0]:false;
}
return result.join(' ');
}
}
if(property.contains('border')){
if(Element.Styles.border.contains(property)){
return['Width','Style','Color'].map(function(p){
return this.getStyle(property+p);
},this).join(' ');
}else if(Element.borderShort.contains(property)){
return['Top','Right','Bottom','Left'].map(function(p){
return this.getStyle('border'+p+property.replace('border',''));
},this).join(' ');
}
}
if(document.defaultView)result=document.defaultView.getComputedStyle(this,null).getPropertyValue(property.hyphenate());
else if(this.currentStyle)result=this.currentStyle[property];
}
if(window.ie)result=Element.fixStyle(property,result,this);
if(result&&property.test(/color/i)&&result.contains('rgb')){
return result.split('rgb').splice(1,4).map(function(color){
return color.rgbToHex();
}).join(' ');
}
return result;
},
getStyles:function(){
return Element.getMany(this,'getStyle',arguments);
},
walk:function(brother,start){
brother+='Sibling';
var el=(start)?this[start]:this[brother];
while(el&&$type(el)!='element')el=el[brother];
return $(el);
},
getPrevious:function(){
return this.walk('previous');
},
getNext:function(){
return this.walk('next');
},
getFirst:function(){
return this.walk('next','firstChild');
},
getLast:function(){
return this.walk('previous','lastChild');
},
getParent:function(){
return $(this.parentNode);
},
getChildren:function(){
return $$(this.childNodes);
},
hasChild:function(el){
return!!$A(this.getElementsByTagName('*')).contains(el);
},
getProperty:function(property){
var index=Element.Properties[property];
if(index)return this[index];
var flag=Element.PropertiesIFlag[property]||0;
if(!window.ie||flag)return this.getAttribute(property,flag);
var node=this.attributes[property];
return(node)?node.nodeValue:null;
},
removeProperty:function(property){
var index=Element.Properties[property];
if(index)this[index]='';
else this.removeAttribute(property);
return this;
},
getProperties:function(){
return Element.getMany(this,'getProperty',arguments);
},
setProperty:function(property,value){
var index=Element.Properties[property];
if(index)this[index]=value;
else this.setAttribute(property,value);
return this;
},
setProperties:function(source){
return Element.setMany(this,'setProperty',source);
},
setHTML:function(){
this.innerHTML=$A(arguments).join('');
return this;
},
setText:function(text){
var tag=this.getTag();
if(['style','script'].contains(tag)){
if(window.ie){
if(tag=='style')this.styleSheet.cssText=text;
else if(tag=='script')this.setProperty('text',text);
return this;
}else{
this.removeChild(this.firstChild);
return this.appendText(text);
}
}
this[$defined(this.innerText)?'innerText':'textContent']=text;
return this;
},
getText:function(){
var tag=this.getTag();
if(['style','script'].contains(tag)){
if(window.ie){
if(tag=='style')return this.styleSheet.cssText;
else if(tag=='script')return this.getProperty('text');
}else{
return this.innerHTML;
}
}
return($pick(this.innerText,this.textContent));
},
getTag:function(){
return this.tagName.toLowerCase();
},
empty:function(){
Garbage.trash(this.getElementsByTagName('*'));
return this.setHTML('');
}
});
Element.fixStyle=function(property,result,element){
if($chk(parseInt(result)))return result;
if(['height','width'].contains(property)){
var values=(property=='width')?['left','right']:['top','bottom'];
var size=0;
values.each(function(value){
size+=element.getStyle('border-'+value+'-width').toInt()+element.getStyle('padding-'+value).toInt();
});
return element['offset'+property.capitalize()]-size+'px';
}else if(property.test(/border(.+)Width|margin|padding/)){
return'0px';
}
return result;
};
Element.Styles={'border':[],'padding':[],'margin':[]};
['Top','Right','Bottom','Left'].each(function(direction){
for(var style in Element.Styles)Element.Styles[style].push(style+direction);
});
Element.borderShort=['borderWidth','borderStyle','borderColor'];
Element.getMany=function(el,method,keys){
var result={};
$each(keys,function(key){
result[key]=el[method](key);
});
return result;
};
Element.setMany=function(el,method,pairs){
for(var key in pairs)el[method](key,pairs[key]);
return el;
};
Element.Properties=new Abstract({
'class':'className','for':'htmlFor','colspan':'colSpan','rowspan':'rowSpan',
'accesskey':'accessKey','tabindex':'tabIndex','maxlength':'maxLength',
'readonly':'readOnly','frameborder':'frameBorder','value':'value',
'disabled':'disabled','checked':'checked','multiple':'multiple','selected':'selected'
});
Element.PropertiesIFlag={
'href':2,'src':2
};
Element.Methods={
Listeners:{
addListener:function(type,fn){
if(this.addEventListener)this.addEventListener(type,fn,false);
else this.attachEvent('on'+type,fn);
return this;
},
removeListener:function(type,fn){
if(this.removeEventListener)this.removeEventListener(type,fn,false);
else this.detachEvent('on'+type,fn);
return this;
}
}
};
window.extend(Element.Methods.Listeners);
document.extend(Element.Methods.Listeners);
Element.extend(Element.Methods.Listeners);
var Garbage={
elements:[],
collect:function(el){
if(!el.$tmp){
el.$tmp={'opacity':1};
}
return el;
},
trash:function(elements){
return;
for(var i=0,j=elements.length,el;i<j;i++){
if(!(el=elements[i])||!el.$tmp)continue;
if(el.$events)el.fireEvent('trash').removeEvents();
for(var p in el.$tmp)el.$tmp[p]=null;
for(var d in Element.prototype)el[d]=null;
Garbage.elements[Garbage.elements.indexOf(el)]=null;
el.htmlElement=el.$tmp=el=null;
}
Garbage.elements.remove(null);
},
empty:function(){
return;
Garbage.collect(window);
Garbage.collect(document);
Garbage.trash(Garbage.elements);
}
};
window.addListener('beforeunload',function(){
window.addListener('unload',Garbage.empty);
if(window.ie)window.addListener('unload',CollectGarbage);
});
var Event=new Class({
initialize:function(event){
if(event&&event.$extended)return event;
this.$extended=true;
event=event||window.event;
this.event=event;
this.type=event.type;
this.target=event.target||event.srcElement;
if(this.target.nodeType==3)this.target=this.target.parentNode;
this.shift=event.shiftKey;
this.control=event.ctrlKey;
this.alt=event.altKey;
this.meta=event.metaKey;
if(['DOMMouseScroll','mousewheel'].contains(this.type)){
this.wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;
}else if(this.type.contains('key')){
this.code=event.which||event.keyCode;
for(var name in Event.keys){
if(Event.keys[name]==this.code){
this.key=name;
break;
}
}
if(this.type=='keydown'){
var fKey=this.code-111;
if(fKey>0&&fKey<13)this.key='f'+fKey;
}
this.key=this.key||String.fromCharCode(this.code).toLowerCase();
}else if(this.type.test(/(click|mouse|menu)/)){
this.page={
'x':event.pageX||event.clientX+document.documentElement.scrollLeft,
'y':event.pageY||event.clientY+document.documentElement.scrollTop
};
this.client={
'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,
'y':event.pageY?event.pageY-window.pageYOffset:event.clientY
};
this.rightClick=(event.which==3)||(event.button==2);
switch(this.type){
case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;
case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;
}
this.fixRelatedTarget();
}
return this;
},
stop:function(){
return this.stopPropagation().preventDefault();
},
stopPropagation:function(){
if(this.event.stopPropagation)this.event.stopPropagation();
else this.event.cancelBubble=true;
return this;
},
preventDefault:function(){
if(this.event.preventDefault)this.event.preventDefault();
else this.event.returnValue=false;
return this;
}
});
Event.fix={
relatedTarget:function(){
if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;
},
relatedTargetGecko:function(){
try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}
}
};
Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;
Event.keys=new Abstract({
'enter':13,
'up':38,
'down':40,
'left':37,
'right':39,
'esc':27,
'space':32,
'backspace':8,
'tab':9,
'delete':46
});
Element.Methods.Events={
addEvent:function(type,fn){
this.$events=this.$events||{};
this.$events[type]=this.$events[type]||{'keys':[],'values':[]};
if(this.$events[type].keys.contains(fn))return this;
this.$events[type].keys.push(fn);
var realType=type;
var custom=Element.Events[type];
if(custom){
if(custom.add)custom.add.call(this,fn);
if(custom.map)fn=custom.map;
if(custom.type)realType=custom.type;
}
this.$events[type].values.push(fn);
return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;
},
removeEvent:function(type,fn){
if(!this.$events||!this.$events[type])return this;
var pos=this.$events[type].keys.indexOf(fn);
if(pos==-1)return this;
var key=this.$events[type].keys.splice(pos,1)[0];
var value=this.$events[type].values.splice(pos,1)[0];
var custom=Element.Events[type];
if(custom){
if(custom.remove)custom.remove.call(this,fn);
if(custom.type)type=custom.type;
}
return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;
},
addEvents:function(source){
return Element.setMany(this,'addEvent',source);
},
removeEvents:function(type){
if(!this.$events)return this;
if(!type){
for(var evType in this.$events)this.removeEvents(evType);
this.$events=null;
}else if(this.$events[type]){
this.$events[type].keys.each(function(fn){
this.removeEvent(type,fn);
},this);
this.$events[type]=null;
}
return this;
},
fireEvent:function(type,args,delay){
if(this.$events&&this.$events[type]){
this.$events[type].keys.each(function(fn){
fn.create({'bind':this,'delay':delay,'arguments':args})();
},this);
}
return this;
},
cloneEvents:function(from,type){
if(!from.$events)return this;
if(!type){
for(var evType in from.$events)this.cloneEvents(from,evType);
}else if(from.$events[type]){
from.$events[type].keys.each(function(fn){
this.addEvent(type,fn);
},this);
}
return this;
}
};
window.extend(Element.Methods.Events);
document.extend(Element.Methods.Events);
Element.extend(Element.Methods.Events);
Element.Events=new Abstract({
'mouseenter':{
type:'mouseover',
map:function(event){
event=new Event(event);
if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);
}
},
'mouseleave':{
type:'mouseout',
map:function(event){
event=new Event(event);
if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);
}
},
'mousewheel':{
type:(window.gecko)?'DOMMouseScroll':'mousewheel'
}
});
Element.NativeEvents=[
'click','dblclick','mouseup','mousedown',
'mousewheel','DOMMouseScroll',
'mouseover','mouseout','mousemove',
'keydown','keypress','keyup',
'load','unload','beforeunload','resize','move',
'focus','blur','change','submit','reset','select',
'error','abort','contextmenu','scroll'
];
Function.extend({
bindWithEvent:function(bind,args){
return this.create({'bind':bind,'arguments':args,'event':Event});
}
});
Elements.extend({
filterByTag:function(tag){
return new Elements(this.filter(function(el){
return(Element.getTag(el)==tag);
}));
},
filterByClass:function(className,nocash){
var elements=this.filter(function(el){
return(el.className&&el.className.contains(className,' '));
});
return(nocash)?elements:new Elements(elements);
},
filterById:function(id,nocash){
var elements=this.filter(function(el){
return(el.id==id);
});
return(nocash)?elements:new Elements(elements);
},
filterByAttribute:function(name,operator,value,nocash){
var elements=this.filter(function(el){
var current=Element.getProperty(el,name);
if(!current)return false;
if(!operator)return true;
switch(operator){
case'=':return(current==value);
case'*=':return(current.contains(value));
case'^=':return(current.substr(0,value.length)==value);
case'$=':return(current.substr(current.length-value.length)==value);
case'!=':return(current!=value);
case'~=':return current.contains(value,' ');
}
return false;
});
return(nocash)?elements:new Elements(elements);
}
});
function $E(selector,filter){
return($(filter)||document).getElement(selector);
};
function $ES(selector,filter){
return($(filter)||document).getElementsBySelector(selector);
};
$$.shared={
'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,
'xpath':{
getParam:function(items,context,param,i){
var temp=[context.namespaceURI?'xhtml:':'',param[1]];
if(param[2])temp.push('[@id="',param[2],'"]');
if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');
if(param[4]){
if(param[5]&&param[6]){
switch(param[5]){
case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;
case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;
case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;
case'=':temp.push('[@',param[4],'="',param[6],'"]');break;
case'!=':temp.push('[@',param[4],'!="',param[6],'"]');
}
}else{
temp.push('[@',param[4],']');
}
}
items.push(temp.join(''));
return items;
},
getItems:function(items,context,nocash){
var elements=[];
var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,j=xpath.snapshotLength;i<j;i++)elements.push(xpath.snapshotItem(i));
return(nocash)?elements:new Elements(elements.map($));
}
},
'normal':{
getParam:function(items,context,param,i){
if(i==0){
if(param[2]){
var el=context.getElementById(param[2]);
if(!el||((param[1]!='*')&&(Element.getTag(el)!=param[1])))return false;
items=[el];
}else{
items=$A(context.getElementsByTagName(param[1]));
}
}else{
items=$$.shared.getElementsByTagName(items,param[1]);
if(param[2])items=Elements.filterById(items,param[2],true);
}
if(param[3])items=Elements.filterByClass(items,param[3],true);
if(param[4])items=Elements.filterByAttribute(items,param[4],param[5],param[6],true);
return items;
},
getItems:function(items,context,nocash){
return(nocash)?items:$$.unique(items);
}
},
resolver:function(prefix){
return(prefix=='xhtml')?'http://www.w3.org/1999/xhtml':false;
},
getElementsByTagName:function(context,tagName){
var found=[];
for(var i=0,j=context.length;i<j;i++)found.extend(context[i].getElementsByTagName(tagName));
return found;
}
};
$$.shared.method=(window.xpath)?'xpath':'normal';
Element.Methods.Dom={
getElements:function(selector,nocash){
var items=[];
selector=selector.trim().split(' ');
for(var i=0,j=selector.length;i<j;i++){
var sel=selector[i];
var param=sel.match($$.shared.regexp);
if(!param)break;
param[1]=param[1]||'*';
var temp=$$.shared[$$.shared.method].getParam(items,this,param,i);
if(!temp)break;
items=temp;
}
return $$.shared[$$.shared.method].getItems(items,this,nocash);
},
getElement:function(selector){
return $(this.getElements(selector,true)[0]||false);
},
getElementsBySelector:function(selector,nocash){
var elements=[];
selector=selector.split(',');
for(var i=0,j=selector.length;i<j;i++)elements=elements.concat(this.getElements(selector[i],true));
return(nocash)?elements:$$.unique(elements);
}
};
Element.extend({
getElementById:function(id){
var el=document.getElementById(id);
if(!el)return false;
for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){
if(!parent)return false;
}
return el;
},
getElementsByClassName:function(className){
return this.getElements('.'+className);
}
});
document.extend(Element.Methods.Dom);
Element.extend(Element.Methods.Dom);
Element.extend({
getValue:function(){
switch(this.getTag()){
case'select':
var values=[];
$each(this.options,function(option){
if(option.selected)values.push($pick(option.value,option.text));
});
return(this.multiple)?values:values[0];
case'input':if(!(this.checked&&['checkbox','radio'].contains(this.type))&&!['hidden','text','password'].contains(this.type))break;
case'textarea':return this.value;
}
return false;
},
getFormElements:function(){
return $$(this.getElementsByTagName('input'),this.getElementsByTagName('select'),this.getElementsByTagName('textarea'));
},
toQueryString:function(){
var queryString=[];
this.getFormElements().each(function(el){
var name=el.name;
var value=el.getValue();
if(value===false||!name||el.disabled)return;
var qs=function(val){
queryString.push(name+'='+encodeURIComponent(val));
};
if($type(value)=='array')value.each(qs);
else qs(value);
});
return queryString.join('&');
}
});
Element.extend({
scrollTo:function(x,y){
this.scrollLeft=x;
this.scrollTop=y;
},
getSize:function(){
return{
'scroll':{'x':this.scrollLeft,'y':this.scrollTop},
'size':{'x':this.offsetWidth,'y':this.offsetHeight},
'scrollSize':{'x':this.scrollWidth,'y':this.scrollHeight}
};
},
getPosition:function(overflown){
overflown=overflown||[];
var el=this,left=0,top=0;
do{
left+=el.offsetLeft||0;
top+=el.offsetTop||0;
el=el.offsetParent;
}while(el);
overflown.each(function(element){
left-=element.scrollLeft||0;
top-=element.scrollTop||0;
});
return{'x':left,'y':top};
},
getTop:function(overflown){
return this.getPosition(overflown).y;
},
getLeft:function(overflown){
return this.getPosition(overflown).x;
},
getCoordinates:function(overflown){
var position=this.getPosition(overflown);
var obj={
'width':this.offsetWidth,
'height':this.offsetHeight,
'left':position.x,
'top':position.y
};
obj.right=obj.left+obj.width;
obj.bottom=obj.top+obj.height;
return obj;
}
});
Element.Events.domready={
add:function(fn){
if(window.loaded){
fn.call(this);
return;
}
var domReady=function(){
if(window.loaded)return;
window.loaded=true;
window.timer=$clear(window.timer);
this.fireEvent('domready');
}.bind(this);
if(document.readyState&&window.webkit){
window.timer=function(){
if(['loaded','complete'].contains(document.readyState))domReady();
}.periodical(50);
}else if(document.readyState&&window.ie){
if(!$('ie_ready')){
var src=(window.location.protocol=='https:')?'://0':'javascript:void(0)';
document.write('<script id="ie_ready" defer src="'+src+'"><\/script>');
$('ie_ready').onreadystatechange=function(){
if(this.readyState=='complete')domReady();
};
}
}else{
window.addListener("load",domReady);
document.addListener("DOMContentLoaded",domReady);
}
}
};
window.onDomReady=function(fn){
return this.addEvent('domready',fn);
};
window.extend({
getWidth:function(){
if(this.webkit419)return this.innerWidth;
if(this.opera)return document.body.clientWidth;
return document.documentElement.clientWidth;
},
getHeight:function(){
if(this.webkit419)return this.innerHeight;
if(this.opera)return document.body.clientHeight;
return document.documentElement.clientHeight;
},
getScrollWidth:function(){
if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);
if(this.webkit)return document.body.scrollWidth;
return document.documentElement.scrollWidth;
},
getScrollHeight:function(){
if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);
if(this.webkit)return document.body.scrollHeight;
return document.documentElement.scrollHeight;
},
getScrollLeft:function(){
return this.pageXOffset||document.documentElement.scrollLeft;
},
getScrollTop:function(){
return this.pageYOffset||document.documentElement.scrollTop;
},
getSize:function(){
return{
'size':{'x':this.getWidth(),'y':this.getHeight()},
'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},
'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}
};
},
getPosition:function(){return{'x':0,'y':0};}
});
var Fx={};
Fx.Base=new Class({
options:{
onStart:Class.empty,
onComplete:Class.empty,
onCancel:Class.empty,
transition:function(p){
return-(Math.cos(Math.PI*p)-1)/2;
},
duration:500,
unit:'px',
wait:true,
fps:50
},
initialize:function(options){
this.element=this.element||null;
this.setOptions(options);
if(this.options.initialize)this.options.initialize.call(this);
},
step:function(){
var time=$time();
if(time<this.time+this.options.duration){
this.delta=this.options.transition((time-this.time)/this.options.duration);
this.setNow();
this.increase();
}else{
this.stop(true);
this.set(this.to);
this.fireEvent('onComplete',this.element,10);
this.callChain();
}
},
set:function(to){
this.now=to;
this.increase();
return this;
},
setNow:function(){
this.now=this.compute(this.from,this.to);
},
compute:function(from,to){
return(to-from)*this.delta+from;
},
start:function(from,to){
if(!this.options.wait)this.stop();
else if(this.timer)return this;
this.from=from;
this.to=to;
this.change=this.to-this.from;
this.time=$time();
this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);
this.fireEvent('onStart',this.element);
return this;
},
stop:function(end){
if(!this.timer)return this;
this.timer=$clear(this.timer);
if(!end)this.fireEvent('onCancel',this.element);
return this;
},
custom:function(from,to){
return this.start(from,to);
},
clearTimer:function(end){
return this.stop(end);
}
});
Fx.Base.implement(new Chain,new Events,new Options);
Fx.CSS={
select:function(property,to){
if(property.test(/color/i))return this.Color;
var type=$type(to);
if((type=='array')||(type=='string'&&to.contains(' ')))return this.Multi;
return this.Single;
},
parse:function(el,property,fromTo){
if(!fromTo.push)fromTo=[fromTo];
var from=fromTo[0],to=fromTo[1];
if(!$chk(to)){
to=from;
from=el.getStyle(property);
}
var css=this.select(property,to);
return{'from':css.parse(from),'to':css.parse(to),'css':css};
}
};
Fx.CSS.Single={
parse:function(value){
return parseFloat(value);
},
getNow:function(from,to,fx){
return fx.compute(from,to);
},
getValue:function(value,unit,property){
if(unit=='px'&&property!='opacity')value=Math.round(value);
return value+unit;
}
};
Fx.CSS.Multi={
parse:function(value){
return value.push?value:value.split(' ').map(function(v){
return parseFloat(v);
});
},
getNow:function(from,to,fx){
var now=[];
for(var i=0;i<from.length;i++)now[i]=fx.compute(from[i],to[i]);
return now;
},
getValue:function(value,unit,property){
if(unit=='px'&&property!='opacity')value=value.map(Math.round);
return value.join(unit+' ')+unit;
}
};
Fx.CSS.Color={
parse:function(value){
return value.push?value:value.hexToRgb(true);
},
getNow:function(from,to,fx){
var now=[];
for(var i=0;i<from.length;i++)now[i]=Math.round(fx.compute(from[i],to[i]));
return now;
},
getValue:function(value){
return'rgb('+value.join(',')+')';
}
};
Fx.Style=Fx.Base.extend({
initialize:function(el,property,options){
this.element=$(el);
this.property=property;
this.parent(options);
},
hide:function(){
return this.set(0);
},
setNow:function(){
this.now=this.css.getNow(this.from,this.to,this);
},
set:function(to){
this.css=Fx.CSS.select(this.property,to);
return this.parent(this.css.parse(to));
},
start:function(from,to){
if(this.timer&&this.options.wait)return this;
var parsed=Fx.CSS.parse(this.element,this.property,[from,to]);
this.css=parsed.css;
return this.parent(parsed.from,parsed.to);
},
increase:function(){
this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property));
}
});
Element.extend({
effect:function(property,options){
return new Fx.Style(this,property,options);
}
});
Fx.Styles=Fx.Base.extend({
initialize:function(el,options){
this.element=$(el);
this.parent(options);
},
setNow:function(){
for(var p in this.from)this.now[p]=this.css[p].getNow(this.from[p],this.to[p],this);
},
set:function(to){
var parsed={};
this.css={};
for(var p in to){
this.css[p]=Fx.CSS.select(p,to[p]);
parsed[p]=this.css[p].parse(to[p]);
}
return this.parent(parsed);
},
start:function(obj){
if(this.timer&&this.options.wait)return this;
this.now={};
this.css={};
var from={},to={};
for(var p in obj){
var parsed=Fx.CSS.parse(this.element,p,obj[p]);
from[p]=parsed.from;
to[p]=parsed.to;
this.css[p]=parsed.css;
}
return this.parent(from,to);
},
increase:function(){
for(var p in this.now)this.element.setStyle(p,this.css[p].getValue(this.now[p],this.options.unit,p));
}
});
Element.extend({
effects:function(options){
return new Fx.Styles(this,options);
}
});
var XHR=new Class({
options:{
method:'post',
async:true,
onRequest:Class.empty,
onSuccess:Class.empty,
onFailure:Class.empty,
urlEncoded:true,
encoding:'utf-8',
autoCancel:false,
headers:{}
},
setTransport:function(){
this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);
return this;
},
initialize:function(options){
this.setTransport().setOptions(options);
this.options.isSuccess=this.options.isSuccess||this.isSuccess;
this.headers={};
if(this.options.urlEncoded&&this.options.method=='post'){
var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';
this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);
}
if(this.options.initialize)this.options.initialize.call(this);
},
onStateChange:function(){
if(this.transport.readyState!=4||!this.running)return;
this.running=false;
var status=0;
try{status=this.transport.status;}catch(e){};
if(this.options.isSuccess.call(this,status))this.onSuccess();
else this.onFailure();
this.transport.onreadystatechange=Class.empty;
},
isSuccess:function(status){
return((status>=200)&&(status<300));
},
onSuccess:function(){
this.response={
'text':this.transport.responseText,
'xml':this.transport.responseXML
};
this.fireEvent('onSuccess',[this.response.text,this.response.xml]);
this.callChain();
},
onFailure:function(){
this.fireEvent('onFailure',this.transport);
},
setHeader:function(name,value){
this.headers[name]=value;
return this;
},
send:function(url,data){
if(this.options.autoCancel)this.cancel();
else if(this.running)return this;
this.running=true;
if(data&&this.options.method=='get'){
url=url+(url.contains('?')?'&':'?')+data;
data=null;
}
this.transport.open(this.options.method.toUpperCase(),url,this.options.async);
this.transport.onreadystatechange=this.onStateChange.bind(this);
if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');
$extend(this.headers,this.options.headers);
for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};
this.fireEvent('onRequest');
this.transport.send($pick(data,null));
return this;
},
cancel:function(){
if(!this.running)return this;
this.running=false;
this.transport.abort();
this.transport.onreadystatechange=Class.empty;
this.setTransport();
this.fireEvent('onCancel');
return this;
}
});
XHR.implement(new Chain,new Events,new Options);
var Ajax=XHR.extend({
options:{
data:null,
update:null,
onComplete:Class.empty,
evalScripts:false,
evalResponse:false
},
initialize:function(url,options){
this.addEvent('onSuccess',this.onComplete);
this.setOptions(options);
this.options.data=this.options.data||this.options.postBody;
if(!['post','get'].contains(this.options.method)){
this._method='_method='+this.options.method;
this.options.method='post';
}
this.parent();
this.setHeader('X-Requested-With','XMLHttpRequest');
this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');
this.url=url;
},
onComplete:function(){
if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);
if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();
this.fireEvent('onComplete',[this.response.text,this.response.xml],20);
},
request:function(data){
data=data||this.options.data;
switch($type(data)){
case'element':data=$(data).toQueryString();break;
case'object':data=Object.toQueryString(data);
}
if(this._method)data=(data)?[this._method,data].join('&'):this._method;
return this.send(this.url,data);
},
evalScripts:function(){
var script,scripts;
if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;
else{
scripts=[];
var regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;
while((script=regexp.exec(this.response.text)))scripts.push(script[1]);
scripts=scripts.join('\n');
}
if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);
},
getHeader:function(name){
try{return this.transport.getResponseHeader(name);}catch(e){};
return null;
}
});
Object.toQueryString=function(source){
var queryString=[];
for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));
return queryString.join('&');
};
Element.extend({
send:function(options){
return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();
}
});
var Json={
toString:function(obj){
switch($type(obj)){
case'string':
return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';
case'array':
return'['+obj.map(Json.toString).join(',')+']';
case'object':
var string=[];
for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));
return'{'+string.join(',')+'}';
case'number':
if(isFinite(obj))break;
case false:
return'null';
}
return String(obj);
},
evaluate:function(str,secure){
return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');
}
};
/*Library\mootools.ext.js*/
Element.extend(
{
setClass:function(className)
{
this.className=className;
return this;
}
});
/*AjaxPro\Core.js*/
Function.prototype.getArguments=function(){
var args=[];
for(var i=0;i<this.arguments.length;i++){
args.push(this.arguments[i]);
}
return args;
};
Array.prototype.clear=function()
{
this.length=0;
return this;
};
var AjaxPro={};
var progids=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];
var progid=null;
if(typeof ActiveXObject!="undefined"){
var ie7xmlhttp=false;
if(typeof XMLHttpRequest=="object"){
try{var o=new XMLHttpRequest();ie7xmlhttp=true;}catch(e){}
}
if(typeof XMLHttpRequest=="undefined"||!ie7xmlhttp){
XMLHttpRequest=function(){
var xmlHttp=null;
if(!AjaxPro.noActiveX){
if(progid!=null){
return new ActiveXObject(progid);
}
for(var i=0;i<progids.length&&xmlHttp==null;i++){
try{
xmlHttp=new ActiveXObject(progids[i]);
progid=progids[i];
}catch(e){}
}
}
if(xmlHttp==null&&MS.Browser.isIE){
throw"not supported";
}
return xmlHttp;
};
}
}
$extend(AjaxPro,{
noOperation:function(){},
onLoading:function(){},
onError:function(){},
onTimeout:function(){},
onStateChanged:function(){},
cryptProvider:null,
queue:null,
token:"",
version:"6.9.29.2",
ID:"AjaxPro",
noActiveX:false,
timeoutPeriod:10*1000,
queue:null,
noUtcTime:false,
toJSON:function(o){
if(o==null){
return"null";
}
var v=[];
var i;
var c=o.constructor;
if(c==Number){
return isFinite(o)?o.toString():AjaxPro.toJSON(null);
}else if(c==Boolean){
return o.toString();
}else if(c==String){
for(i=0;i<o.length;i++){
var c=o.charAt(i);
if(c>=" "){
if(c=="\\"||c=='"'){
v.push("\\");
}
v.push(c);
}else{
switch(c){
case"\n":v.push("\\n");break;
case"\r":v.push("\\r");break;
case"\b":v.push("\\b");break;
case"\f":v.push("\\f");break;
case"\t":v.push("\\t");break;
default:
v.push("\\u00");
v.push(c.charCodeAt().toString(16));
}
}
}
return'"'+v.join('')+'"';
}else if(c==Array){
for(i=0;i<o.length;i++){
v.push(AjaxPro.toJSON(o[i]));
}
return"["+v.join(",")+"]";
}else if(c==Date){
var d={};
d.__type="System.DateTime";
if(AjaxPro.noUtcTime==true){
d.Year=o.getFullYear();
d.Month=o.getMonth()+1;
d.Day=o.getDate();
d.Hour=o.getHours();
d.Minute=o.getMinutes();
d.Second=o.getSeconds();
d.Millisecond=o.getMilliseconds();
}else{
d.Year=o.getUTCFullYear();
d.Month=o.getUTCMonth()+1;
d.Day=o.getUTCDate();
d.Hour=o.getUTCHours();
d.Minute=o.getUTCMinutes();
d.Second=o.getUTCSeconds();
d.Millisecond=o.getUTCMilliseconds();
}
return AjaxPro.toJSON(d);
}
if(typeof o.toJSON=="function"){
return o.toJSON();
}
if(typeof o=="object"){
for(var attr in o){
if(typeof o[attr]!="function"){
v.push('"'+attr+'":'+AjaxPro.toJSON(o[attr]));
}
}
if(v.length>0){
return"{"+v.join(",")+"}";
}
return"{}";
}
return o.toString();
},
dispose:function(){
if(AjaxPro.queue!=null){
AjaxPro.queue.dispose();
}
}
});
AjaxPro.Request=new Class(
{
initialize:function(url)
{
this.url=url;
this.xmlHttp=null;
},
url:null,
callback:null,
onLoading:AjaxPro.noOperation,
onError:AjaxPro.noOperation,
onTimeout:AjaxPro.noOperation,
onStateChanged:AjaxPro.noOperation,
args:null,
context:null,
isRunning:false,
abort:function(){
if(this.timeoutTimer!=null){
$clear(this.timeoutTimer);
}
if(this.xmlHttp){
this.xmlHttp.onreadystatechange=AjaxPro.noOperation;
this.xmlHttp.abort();
}
if(this.isRunning){
this.isRunning=false;
this.onLoading(false);
}
},
dispose:function(){
this.abort();
},
getEmptyRes:function(){
return{
error:null,
value:null,
request:{method:this.method,args:this.args},
context:this.context,
duration:this.duration
};
},
endRequest:function(res){
this.abort();
if(res.error!=null){
this.onError(res.error,this);
}
if(typeof this.callback=="function"){
this.callback(res,this);
}
},
mozerror:function(){
if(this.timeoutTimer!=null){
$clear(this.timeoutTimer);
}
var res=this.getEmptyRes();
res.error={Message:"Unknown",Type:"ConnectFailure",Status:0};
this.endRequest(res);
},
doStateChange:function(){
this.onStateChanged(this.xmlHttp.readyState,this);
if(this.xmlHttp.readyState!=4||!this.isRunning){
return;
}
this.duration=new Date().getTime()-this.__start;
if(this.timeoutTimer!=null){
clearTimeout(this.timeoutTimer);
}
var res=this.getEmptyRes();
if(this.xmlHttp.status==200&&this.xmlHttp.statusText=="OK"){
res=this.createResponse(res);
}else{
res=this.createResponse(res,true);
res.error={Message:this.xmlHttp.statusText,Type:"ConnectFailure",Status:this.xmlHttp.status};
}
this.endRequest(res);
},
createResponse:function(r,noContent){
if(!noContent){
var responseText=""+this.xmlHttp.responseText;
if(AjaxPro.cryptProvider!=null&&typeof AjaxPro.cryptProvider=="function"){
responseText=AjaxPro.cryptProvider.decrypt(responseText);
}
if(this.xmlHttp.getResponseHeader("Content-Type")=="text/xml"){
r.value=this.xmlHttp.responseXML;
}else{
if(responseText!=null&&responseText.trim().length>0){
r.json=responseText;
eval("r.value = "+responseText+"*"+"/");
}
}
}
return r;
},
timeout:function(){
this.duration=new Date().getTime()-this.__start;
var r=this.onTimeout(this.duration,this);
if(typeof r=="undefined"||r!=false){
this.abort();
}else{
this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);
}
},
invoke:function(method,args,callback,context){
this.__start=new Date().getTime();
if(this.xmlHttp==null){
this.xmlHttp=new XMLHttpRequest();
}
this.isRunning=true;
this.method=method;
this.args=args;
this.callback=callback;
this.context=context;
var async=typeof(callback)=="function"&&callback!=AjaxPro.noOperation;
if(async){
if(window.ie){
this.xmlHttp.onreadystatechange=this.doStateChange.bind(this);
}else{
this.xmlHttp.onload=this.doStateChange.bind(this);
this.xmlHttp.onerror=this.mozerror.bind(this);
}
this.onLoading(true);
}
var json=AjaxPro.toJSON(args)+"";
if(AjaxPro.cryptProvider!=null){
json=AjaxPro.cryptProvider.encrypt(json);
}
this.xmlHttp.open("POST",this.url,async);
this.xmlHttp.setRequestHeader("Content-Type","text/plain; charset=utf-8");
this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Method",method);
if(AjaxPro.token!=null&&AjaxPro.token.length>0){
this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Token",AjaxPro.token);
}
if(!window.ie){
this.xmlHttp.setRequestHeader("Connection","close");
}
this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);
try{this.xmlHttp.send(json);}catch(e){}
if(!async){
return this.createResponse({error:null,value:null});
}
return true;
}
});
AjaxPro.RequestQueue=new Class({
initialize:function(conc)
{
this.queue=[];
this.requests=[];
this.timer=null;
if(isNaN(conc)){conc=2;}
for(var i=0;i<conc;i++){
this.requests[i]=new AjaxPro.Request();
this.requests[i].callback=function(res){
var r=res.context;
res.context=r[3][1];
r[3][0](res,this);
};
this.requests[i].callbackHandle=this.requests[i].callback.bind(this.requests[i]);
}
},
process:function(){
this.timer=null;
if(this.queue.length==0){
return;
}
for(var i=0;i<this.requests.length&&this.queue.length>0;i++){
if(this.requests[i].isRunning==false){
var r=this.queue.shift();
this.requests[i].url=r[0];
this.requests[i].onLoading=r[3].length>2&&r[3][2]!=null&&typeof r[3][2]=="function"?r[3][2]:AjaxPro.onLoading;
this.requests[i].onError=r[3].length>3&&r[3][3]!=null&&typeof r[3][3]=="function"?r[3][3]:AjaxPro.onError;
this.requests[i].onTimeout=r[3].length>4&&r[3][4]!=null&&typeof r[3][4]=="function"?r[3][4]:AjaxPro.onTimeout;
this.requests[i].onStateChanged=r[3].length>5&&r[3][5]!=null&&typeof r[3][5]=="function"?r[3][5]:AjaxPro.onStateChanged;
this.requests[i].invoke(r[1],r[2],this.requests[i].callbackHandle,r);
r=null;
}
}
if(this.queue.length>0&&this.timer==null){
this.timer=setTimeout(this.process.bind(this),0);
}
},
add:function(url,method,args,e){
this.queue.push([url,method,args,e]);
this.process();
},
abort:function(){
this.queue.length=0;
if(this.timer!=null){
clearTimeout(this.timer);
}
this.timer=null;
for(var i=0;i<this.requests.length;i++){
if(this.requests[i].isRunning==true){
this.requests[i].abort();
}
}
},
dispose:function(){
for(var i=0;i<this.requests.length;i++){
var r=this.requests[i];
r.dispose();
}
this.requests.clear();
}
});
AjaxPro.queue=new AjaxPro.RequestQueue(2);
AjaxPro.AjaxClass=new Class({
initialize:function(url){
this.url=url;
},
invoke:function(method,args,e){
if(e!=null){
if(e.length!=6){
for(;e.length<6;){e.push(null);}
}
if(e[0]!=null&&typeof(e[0])=="function"){
return AjaxPro.queue.add(this.url,method,args,e);
}
}
var r=new AjaxPro.Request();
r.url=this.url;
return r.invoke(method,args);
}
});
window.addEvent("unload",AjaxPro.dispose);
/*TripCart.Global.js*/
function provide(name)
{
var obj=window;
var namespaces=name.split(".");
for(var nsIndex=0;nsIndex<namespaces.length;nsIndex++)
{
var ns=namespaces[nsIndex];
if(!obj[ns])obj[ns]={};
obj=obj[ns];
}
}
function isDefined(str,start)
{
var parts=str.split(".");
var obj=start||window;
for(var i=0;i<parts.length;i++)
{
if(!obj[parts[i]])
{
return false;
}
obj=obj[parts[i]];
}
return true;
}
provide("TripCart.Global");
TripCart.Global.Events=
{
Events:{},
Subscribe:function(EventName,Func,Bind,NoAutoUnsubscribe){
if(TripCart.Global.Events.Events[EventName]==null)
TripCart.Global.Events.Events[EventName]=[];
var EventArgs={"Function":Func,"Bind":Bind,"NoAutoUnsubscribe":NoAutoUnsubscribe,"EventName":EventName};
TripCart.Global.Events.Events[EventName].push(EventArgs);
return EventArgs;
},
Unsubscribe:function(EventArgs)
{
if(TripCart.Global.Events.Events[EventArgs.EventName]!=null)
{
TripCart.Global.Events.Events[EventArgs.EventName]=TripCart.Global.Events.Events[EventArgs.EventName].filter(function(cEvent)
{
if(cEvent.Function!=EventArgs.Function||cEvent.Bind!=EventArgs.Bind)
{
return(cEvent);
}
cEvent.Bind=null;
cEvent.Function=null;
cEvent=null;
});
}
},
Fire:function(EventName)
{
try
{
var Subscribers=TripCart.Global.Events.Events[EventName];
if(Subscribers!=null)
{
if(Subscribers.each)
{
Subscribers.each(function(EventArgs){
EventArgs.Function.bind(EventArgs.Bind)();
if(!EventArgs.NoAutoUnsubscribe)
TripCart.Global.Events.Unsubscribe(EventArgs);
});
}
}
}
catch(e){}
}
};
TripCart.Global.Background=
{
Show:function()
{
var bkg=document.getElementById("TCModalBkg");
bkg.style.width=Window.getScrollWidth()-(window.ie?24:0)+"px";
bkg.style.height=Window.getScrollHeight()+"px";
bkg.style.display="";
return bkg;
},
ShowGray:function()
{
TripCart.Global.Background.Show().style.backgroundColor="Gray";
},
Hide:function()
{
var bkg=document.getElementById("TCModalBkg");
bkg.style.display="none";
}
};
TripCart.Global.Location=
{
GetCompleteURL:function()
{
var url=location.href.split("#")[0]+location.hash;
return url;
}
};
TripCart.Encryption=
{
Encrypt:function(to_enc,xor_key)
{
var encChars=[];
for(i=0;i<to_enc.length;++i)
{
encChars.push(String.fromCharCode(xor_key^to_enc.charCodeAt(i)));
}
return encChars.join('');
},
Decrypt:function(to_dec,xor_key)
{
var decChars=[];
for(i=0;i<to_dec.length;i++)
{
decChars.push(String.fromCharCode(xor_key^to_dec.charCodeAt(i)));
}
return decChars.join('');
}
};
provide("TripCart.Global.Context");
if(isDefined("Region.Context.Tab",top))
{
TripCart.Global.Context.Tab=top.Region.Context.Tab;
}
else
{
if(location.href.indexOf("Photo")>0)
TripCart.Global.Context.Tab="Photo";
if(location.href.indexOf("Review")>0)
TripCart.Global.Context.Tab="Review";
if(location.href.indexOf("UserTrip")>0)
TripCart.Global.Context.Tab="UserTrip";
else if(location.href.indexOf("UserProfile")>0)
TripCart.Global.Context.Tab="Profile";
else
{
TripCart.Global.Context.Tab=null;
}
}
/*TCModal.js*/
var Dialog=function()
{
this.initialize.apply(this,arguments);
};
var CurrentDialog=null;
Dialog.prototype=
{
OnCloseCallBack:null,
initialize:function(DialogUrl,IsNotModal)
{
if(CurrentDialog==null)
CurrentDialog=this;
else
return CurrentDialog;
if(!$("TCModal"))
return;
this.closed=false;
this.bkg=$("TCModalBkg");
this.container=$("TCModal");
this.element=$("TCModalIframe");
this.modalHeader=$("TCModalHeader").removeClass("slideShowHeader");
this.titleElement=$("TCModalTitle");
var self=this;
this.selects=[];
if(IsNotModal)
{
this.IsModal=false;
}
else
{
this.IsModal=true;
TripCart.Global.Background.Show();
}
this.closeFirstTimePan();
TripCart.Global.Events.Subscribe("TCModalLoaded",this.iframeLoaded,this);
this.container.setStyles({"display":"","top":(200+document.documentElement.scrollTop)+"px"});
this.element.setStyle("display","none");
this.element.onload=this.iframeLoaded.bind(this);
this.element.setAttribute("src",DialogUrl);
if(this.IsModal)
{
this.disableSelects(document);
if(window.parent!=window)
this.disableSelects(parent.document);
for(var frame=0;frame<window.frames.length;frame++)
{
try{this.disableSelects(window.frames[frame].document);}
catch(e){}
}
}
},
iframeLoaded:function()
{
if(!CurrentDialog.closed)
this.element.setStyle("display","block");
this.element.onload=function(){};
},
close:function()
{
CurrentDialog.closed=true;
for(var i=0;i<CurrentDialog.selects.length;i++)
{
try{CurrentDialog.selects[i].disabled=false;}catch(e){}
}
CurrentDialog.element.style.display="none";
if(CurrentDialog.IsModal)
{
TripCart.Global.Background.Hide();
}
if(CurrentDialog.closeElement)CurrentDialog.closeElement.style.display="none";
if(CurrentDialog.titleElement)CurrentDialog.titleElement.style.display="none";
if(CurrentDialog.OnCloseCallBack)CurrentDialog.OnCloseCallBack(CurrentDialog);
try{
CurrentDialog.element.style.display="none !important";
}catch(e){CurrentDialog.element.style.display="none";}
CurrentDialog.modalHeader.style.display="none";
CurrentDialog=null;
},
disableSelects:function(doc)
{
var selects=doc.getElementsByTagName("select");
for(var i=0;i<selects.length;i++)
{
if(selects[i].disabled!=true)
{
this.selects.push(selects[i]);
selects[i].disabled=true;
}
}
},
resize:function(width,height)
{
this.element.style.height=height+"px";
this.element.style.width=width+"px";
this.width=width;
this.height=height;
},
setCloseCallback:function(CallbackFunction)
{
this.OnCloseCallBack=CallbackFunction;
},
setTitle:function(Text)
{
this.titleElement.innerHTML=Text;
var left=parseInt(310+(this.width-this.titleElement.offsetWidth)/2);
this.titleElement.style.display="";
this.modalHeader.style.display="";
},
setHeaderClass:function(className)
{
if(className)
this.modalHeader.className=className;
},
setBackground:function(Opacity,Color)
{
if(this.bkg)
{
this.bkg.style.opacity=(Opacity||0.9).toString();
this.bkg.style.backgroundColor=Color||"Gray";
this.bkg.style.filter="alpha(opacity="+(Opacity*10||90)+")";
this.bkg.style.MozOpacity=(Opacity||0.9).toString();
}
},
enableCloseButton:function(CloseText)
{
this.closeElement=document.getElementById("TCModalClose");
this.closeElement.onclick=Region?Region.ClickHandlers.CloseModal:CurrentDialog.close;
this.closeElement.style.display="";
},
setFrameBorder:function(Style)
{
this.element.style.border=Style;
},
closeFirstTimePan:function()
{
top.$$("div[name=PanFirstTimeHelp]").setStyle("display","none");
}
};
Dialog.SimpleDialog=function(Url,IsNotModal,Width,Height,OnCloseCallback)
{
var myDialog=new Dialog(Url,IsNotModal);
myDialog.resize(Width,Height);
myDialog.setCloseCallback(OnCloseCallback);
myDialog.setBackground();
TripCart.Global.Background.Show();
return myDialog;
};
Dialog.FullDialog=function(Url,IsNotModal,Width,Height,Title,OnCloseCallback,HeaderClass)
{
var myDialog=new Dialog(Url,IsNotModal);
if(Width&&Height)myDialog.resize(Width,Height);
if(OnCloseCallback)myDialog.setCloseCallback(OnCloseCallback);
myDialog.setBackground();
myDialog.enableCloseButton();
myDialog.setTitle(Title);
myDialog.setHeaderClass(HeaderClass);
TripCart.Global.Background.Show();
return myDialog;
};
/*GeneralFunctions.js*/
String.prototype.Trim=function Trim()
{
return this.replace(/^\s*|\s*$/g,"")
};
String.prototype.Replace=function Replace(oldString,newString)
{
var RE=new RegExp(oldString,"g");
return this.replace(RE,newString);
};
function checkLength(id,maxLength){
var currentField=document.getElementById(id);
if(!currentField)return;
var currentLength=currentField.value.length;
if(currentLength>maxLength){
currentField.value=currentField.value.substr(0,maxLength);
}
}
function CheckLengthKey(element,length,event)
{
if(!length)
var maxlength=element.getAttribute("maxlength")*1;
else
var maxlength=length;
var currentLength=element.value.length;
var key=window.event?event.keyCode:event.which;
if(currentLength<maxlength)
return true;
else
if(key==8||key==35||key==36||key==37||key==39||key==46||key==0)
return true;
else
return false;
}
function GetElementByAttrValue(tagName,attrName,attrValue)
{
var nodes=document.getElementsByTagName(tagName);
var count=nodes.length;
for(i=0;i<count;i++)
{
var item=nodes[i];
if(item.getAttribute(attrName))
{
if(item.getAttribute(attrName)==attrValue)
return item;
}
}
return null;
}
function GetElementsByAttrValue(tagName,attrName,attrValue)
{
var items=[];
var nodes=document.getElementsByTagName(tagName);
var count=nodes.length;
for(i=0;i<count;i++)
{
var item=nodes[i];
if(item.getAttribute(attrName))
{
if(item.getAttribute(attrName)==attrValue)
items.push(item);
}
}
return items;
}
function GetElementsByAttributes(tagName,attrName)
{
var arr=new Array();
var nodes=document.getElementsByTagName(tagName);
var count=nodes.length;
for(i=0;i<count;i++)
{
var item=nodes[i];
if(item.getAttribute(attrName))
{
arr.push(item);
}
}
return arr;
}
function GetChildElementsByAttributes(object,tagName,attrName)
{
var arr=new Array();
var nodes=object.getElementsByTagName(tagName);
var count=nodes.length;
for(i=0;i<count;i++)
{
var item=nodes[i];
if(item.getAttribute(attrName))
{
arr.push(item);
}
}
return arr;
}
function findPosX(id,doc)
{
var obj=doc.getElementById(id);
var curleft=0;
if(obj.offsetParent)
{
while(obj.offsetParent)
{
curleft+=obj.offsetLeft;
obj=obj.offsetParent;
}
}
else if(obj.x)
curleft+=obj.x;
return curleft;
}
function findPosY(id,doc)
{
var obj=doc.getElementById(id);
var curtop=0;
if(obj.offsetParent)
{
while(obj.offsetParent)
{
curtop+=obj.offsetTop;
obj=obj.offsetParent;
}
}
else if(obj.y)
curtop+=obj.y;
return curtop;
}
function previousSibling(element)
{
if(element.previousSibling.nodeType!=1)
return element.previousSibling.previousSibling;
else
return element.previousSibling;
}
function nextSibling(element)
{
if(element.nextSibling.nodeType!=1)
return element.nextSibling.nextSibling;
else
return element.nextSibling;
}
function holdWindButton(id,butEv)
{
var prefix="";
var imageName;
if(id.indexOf('reg_')!=-1)prefix="../";
var button=document.getElementById(id);
switch(butEv){
case("out"):
imageName="but_bar.jpg";
break;
case("down"):
imageName="but_bar_dn.jpg";
break;
case("over"):
imageName="but_bar_ov.jpg";
break;
default:
imageName="but_bar.jpg";
break;
}
button.style.backgroundImage="url("+prefix+"Image1/Buttons/"+imageName+")";
}
function DisableEnterSubmit(event)
{
return((window.event?event.keyCode:event.which)!=13);
}
function firstChildNode(el)
{
var Nodes=el.childNodes;
for(var i=0;i<Nodes.length;i++)
if(Nodes[i].nodeType==1)return Nodes[i];
}
function hideColumns()
{
if(document.styleSheets[0].insertRule)document.styleSheets[0].insertRule(".ShowHide{display:none;}",0);
else document.styleSheets[0].addRule(".ShowHide","display:none;");
}
function showColumns()
{
try
{
if(document.styleSheets[0].deleteRule)document.styleSheets[0].deleteRule(".ShowHide");
else document.styleSheets[0].removeRule();
}
catch(e){}
}
function closeFirstTimeHelp()
{
var PanFirstTimeHelp=GetElementByAttrValue('div','name','PanFirstTimeHelp');
if(!PanFirstTimeHelp)return;
PanFirstTimeHelp.style.display="none";
document.onclick="";
}
function NameEncode(str)
{
return str.Trim().Replace("&amp;","-").Replace(" and ","-").Replace(" And ","-").Replace(":","-").Replace("\\\\","-").Replace("/","-").Replace("&","-").Replace("\"","").Replace(" ","-").Replace(",","-").Replace("--","-").Replace("--","-").Replace("'","");
}
function getQueryVariable(variable)
{
var query=window.location.search.substring(1);
var vars=query.split("&");
for(var i=0;i<vars.length;i++)
{
var pair=vars[i].split("=");
if(pair[0]==variable)return pair[1];
}
return'';
}
var DownTime=-1;
var CheckTimeInterval=60000;
var StartTimeToWarn=600;
function CheckForWindowSize()
{
if(screen.width<1024||screen.height<768)
{
alert("Please configure your display to at least 1024 x 768 resolution  for best results.");
}
}
function RunFunctions()
{
var output=true;
for(var i=0;i<arguments.length;i++)
{
o=arguments[i]();
if(typeof(o)!="undefined"&&typeof(o)=="boolean")
output=output&&o;
}
return output;
}
function indexOf(Array,Value){
if(Array!=null)
{
for(i=0;i<Array.length;i++)
{
if(Array[i]==Value)
{
return i;
}
}
}
return-1;
}
function CheckCookie()
{
var path=location.toString().split("/")[location.toString().split("/").length-1];
if(document.cookie==""&&!path.match("Alert=Cookie"))
location.href=SitePath+"/"+"?Alert=Cookie";
}
if(window.parent==window&&window.TripCart)
{
}
function MaximizeWindow()
{
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
}
function IsUserLoggedIn(OpenLogInWindow,Callback,Context)
{
var response=TripCart.AjaxMethods.IsUserLoggedIn();
if(response.value)
{
if(Callback!=null)
{
if(Context!=null)
{
Callback(Context);
}
else
{
Callback();
}
}
else
{
eval(Context);
}
return true;
}
else if(OpenLogInWindow)
{
var Dialog=new top.Dialog(SitePath+'/SignInV2.aspx');
Dialog.setBackground();
return false;
}
else
return false;
}
function GetAffiliatePath(link)
{
if(SitePath!=null)
{
if(link.indexOf('http')==0)
{
return link;
}
else
{
return SitePath+"/"+link;
}
}
return"";
}
function forwardPage(type,url)
{
var completeURL="/forward/"+type+"/"+url;
if(type!="dll")
tcTracker(completeURL);
var newWindow=window.open(completeURL,'_blank');
newWindow.focus();
}
function getMapIFrame()
{
return parent.frames['MapFrame'];
}
function isMapShown()
{
var mapFrame=top.document.getElementById("MapFrame");
return!(mapFrame.src=="");
}
function loadMapIFrame()
{
if(!isMapShown())
{
var mapFrame=top.document.getElementById("MapFrame");
mapFrame.className="mapContainer";
parent.MapWrapper.LoadMap();
mapFrame.src=top.SitePath+"/TCMapPage.aspx?RegionID="+RegionID;
mapFrame.width="548px";
mapFrame.height="455px"
mapFrame.style.backgroundimage="url(images/design/map-background.gif)";
parent.addEvent("onMapLoaded",function()
{
var mapFrame=top.document.getElementById("MapFrame");
mapFrame.className="";
mapFrame.style.backgroundimage="";
});
if($("InteractiveMap"))
$("InteractiveMap").disabled="true";
}
}
function openInNewTab(url)
{
tcTracker("/printableView");
var newWindow=window.open(url,'_blank');
newWindow.focus();
}
function tcTracker(url)
{
try{urchinTracker(url);}catch(e){}
}

/*GMap\MapGlobals.js*/
var HOTEL="Hotels";
var ATTRACTION="Attractions";
var AIRPORTS="Airports";
var REGION="Regions";
var ROUTE="Routes";
var MAPMARKER="MapMarkers";
var BORDER="Borders";
var LABEL="Labels";
var IconFileNames=
{
"Airport":"act_Airport",
"ArtMuseum":"act_ArtMuseum",
"Beach":"act_Beach",
"Biking":"act_Biking",
"Boating":"act_Boating",
"BotanicalGarden":"act_BotanicalGarden",
"Diving":"act_Diving",
"Entertainment":"act_Entertainment",
"FactoryTour":"act_FactoryTour",
"FallFoliage":"act_FallFoliage",
"Fishing":"act_Fishing",
"Gambling":"act_Gambling",
"GeneralMuseum":"act_GeneralMuseum",
"Golf":"act_Golf",
"Hiking":"act_Hiking",
"HistoricalSite":"act_HistoricalSite",
"HistoryMuseum":"act_HistoryMuseum",
"Hotel":"act_Hotel",
"NearByHotel":"act_Hotel",
"MountainClimbing":"act_MountainClimbing",
"NaturalHistoryMuseum":"act_NaturalHistoryMuseum",
"Nature":"act_Nature",
"Place":"act_Place",
"RockGym":"act_RockGym",
"ScienceMuseum":"act_ScienceMuseum",
"Shopping":"act_Shopping",
"Ski":"act_Ski",
"Spa":"act_Spa",
"SpectatorSports":"act_SpectatorSports",
"Surfing":"act_Surfing",
"ThemeParks":"act_ThemeParks",
"WhiteWater":"act_WhiteWater",
"Winery":"act_Winery",
"Zoo":"act_Zoo"
};
var BalloonFunctionMapping=
{
"Airport":"SetAirportBalloonHTML",
"Attractions":"SetAttractionBalloonHTML",
"ArtMuseum":"SetAttractionBalloonHTML",
"Beach":"SetAttractionBalloonHTML",
"Biking":"SetAttractionBalloonHTML",
"Boating":"SetAttractionBalloonHTML",
"BotanicalGarden":"SetAttractionBalloonHTML",
"Diving":"SetAttractionBalloonHTML",
"Entertainment":"SetAttractionBalloonHTML",
"FactoryTour":"SetAttractionBalloonHTML",
"FallFoliage":"SetAttractionBalloonHTML",
"Fishing":"SetAttractionBalloonHTML",
"Gambling":"SetAttractionBalloonHTML",
"GeneralMuseum":"SetAttractionBalloonHTML",
"Golf":"SetAttractionBalloonHTML",
"Hiking":"SetAttractionBalloonHTML",
"HistoricalSite":"SetAttractionBalloonHTML",
"HistoryMuseum":"SetAttractionBalloonHTML",
"Hotel":"SetHotelBalloonHTML",
"MountainClimbing":"SetAttractionBalloonHTML",
"NaturalHistoryMuseum":"SetAttractionBalloonHTML",
"Nature":"SetAttractionBalloonHTML",
"Place":"SetAttractionBalloonHTML",
"RockGym":"SetAttractionBalloonHTML",
"ScienceMuseum":"SetAttractionBalloonHTML",
"Shopping":"SetAttractionBalloonHTML",
"Ski":"SetAttractionBalloonHTML",
"Spa":"SetAttractionBalloonHTML",
"SpectatorSports":"SetAttractionBalloonHTML",
"Surfing":"SetAttractionBalloonHTML",
"ThemeParks":"SetAttractionBalloonHTML",
"WhiteWater":"SetAttractionBalloonHTML",
"Winery":"SetAttractionBalloonHTML",
"Zoo":"SetAttractionBalloonHTML",
"NearByHotel":"SetHotelBalloonHTML",
"Highlights":"SetAttractionBalloonHTML"
};
function DistractorMapGlobalsVariables()
{
HOTEL=null;delete HOTEL;
ATTRACTION=null;delete ATTRACTION;
AIRPORTS=null;delete AIRPORTS;
REGION=null;delete REGION;
ROUTE=null;delete ROUTE;
MAPMARKER=null;delete MAPMARKER;
BORDER=null;delete BORDER;
LABEL=null;delete LABEL;
IconFileNames=null;delete IconFileNames;
BalloonFunctionMapping=null;delete BalloonFunctionMapping;
}
function DataAdapter(ResultArray,MappingArray)
{
var data={};
for(var i=0;i<MappingArray.length;i++)
{
data[MappingArray[i]]=ResultArray[i];
}
return data;
}
function OpenAttractionMapWindow(url,wndSizeX,wndSizeY)
{
if(url!=null)
{
if((url!="")&&(url!=undefined))
{
window.open(url,"wnd",'height='+wndSizeY+',width='+wndSizeX+',top=0,left=0,menubar=no,toolbar=no,scrollbars=yes,resizable=yes');
}
}
}
function DoAutoSave()
{
try
{
var tableIFrame_in=document.getElementById("tableIFrame").getElementsByTagName("iframe")[0];
tableIFrame_in.contentWindow.document.AutoSave();
}catch(e){}
}
function SetMapType(MapTypeView)
{
switch(MapTypeView)
{
case"S":
myMap.SetMapType("Satellite");
break;
case"H":
myMap.SetMapType("Hybrid");
break;
default:
myMap.SetMapType("Normal");
break;
}
}
function ChangeLink(HtmlElement)
{
if(HtmlElement.className=="btnAddToTrip")
{
HtmlElement.style.fontWeight="bold";
HtmlElement.style.textDecoration="none";
HtmlElement.style.cursor="pointer";
HtmlElement.style.backgroundImage="url("+SitePath+"/Image1/RegionImages/btnAddedViewTripEmpty.gif)";
HtmlElement.style.width="80px";
HtmlElement.style.height="24px";
HtmlElement.className="btnAddedViewTrip";
}
HtmlElement.innerHTML="Added - View Trip";
HtmlElement.href=SitePath+"/MyTripCart.aspx";
HtmlElement.target="_top";
HtmlElement.onclick=function(){top.location.href=SitePath+"/MyTripCart.aspx";return true;};
}
function AddRegionToTrip(HtmlElement,RegionID)
{
try
{
var response=TripCart.AjaxMethods.AddRegionToTrip(RegionID.toString());
HtmlElement.innerHTML="Added - View Trip";
HtmlElement.onclick=function(){top.location.href=SitePath+"/MyTripCart.aspx"};
return true;
}
catch(e){
return false;
}
}
function AddRegionToTrip_CallBack(response){
alert("region was added");
}
var showPOIList_InProgress=false;
/*TextResources.js*/
var arrErrors=
{'Basket.js_Delete_All_Carts':'Are you sure you want to permanently delete the contents of the Deleted Trips folder?',
'Basket.js_Delete_All_Carts_No_Items_To_Delete':'There are no Trips to delete',
'Basket.js_Want_To_Delete_This_Cart':'Are you sure you want to delete this Trip',
'Basket.js_Want_To_Delete_This_Cart_Permanently':'Are you sure you want to permanently delete the selected Trip?',
'MyAccount.js_Email_Address_Required':'An email address is required to sign-in.',
'MyAccount.js_Enter_Correct_Email_Address':'Please enter a valid email address',
'MyAccount.js_Enter_Email_Address':'Please enter a valid email address',
'MyAccount.js_Password_Confirm_Password_Not_The_Same':'Please  try again - the Password and Confirm Password fields are different.',
'MyAccount.js_Password_Confirmation_Required':'Please confirm your  password.',
'MyAccount.js_Password_Required':'A password is required',
'MyAccount.js_Please_Enter_Password':'Please enter your password.',
'MyAccount.js_Sign_In_Form_Not_Correct':'Please sign in correctly.',
'SearchResults.js_No_Regions_To_Add_to_cart':'Please select at least one item',
'SearchResults.js_No_Regions_To_Compare':'There is nothing to hide - please select checkboxes',
'SearchResults.js_No_Regions_To_Hide':'There nothing to compare - please select checkboxes'};
var arrMessages=
{'Basket.js_Invite_See_Other_TripCart':'You are invited to see  &quot;??????&quot; Trip, created by\n ****. \nTo see this Trip you need to be registered client. If you are not registered yet with a Trip Click Here to register',
'Date.js_Save_Messages':'You have unsaved changes.\nAre you sure you want to close?',
'Dates.js_Actual_Start_Day':'actual start day',
'Dates.js_Change_Trip_Dates':'Are you sure you want to change the trip date format?',
'Dates.js_Clean_Data_Without_Restore':'This operation will clean up all previousely saved data without possibility to restore it.\nAre you sure you want to Clear All?',
'Dates.js_Closing_Without_Dates':'You are going to close without setting up the dates. \n It will close the whole \"Edit Dates\" dialog.\n Are you sure you want to close? ',
'Dates.js_Dates_Confirmation_Box':'The changes will overwrite previously entered dates.\n Are you sure you want to save changes? ',
'Dates.js_Need_To_Enter':'You need to enter the ',
'Dates.js_Your_Trip_Length':'your trip length',
'Region.js_No_Regions_Routes_To_Compare':'There nothing to compare - please select checkboxes',
'TripCart.js_Clear_All_Dates':'All  date info for items displayed will be deleted. Are you sure? (Yes and Cancel), with cancel the default',
'TripCart.js_Clear_All_Hotels':'All  hotel info for items displayed will be deleted. Are you sure? (Yes and Cancel), with cancel the default',
'TripCart.js_Clear_All_Notes':'All  notes for items displayed will be deleted. Are you sure? (Yes and Cancel), with cancel the default',
'TripCart.js_Dates_Data_Saved':'Your dates have been updated in your Trip.',
'TripCart.js_Delete_Items_Confirmation':'Are you sure you want to delete\n the selected items from your Trip?',
'TripCart.js_Hotel_Data_Saved':'Your hotel information has been updated.',
'TripCart.js_No_Items_To_Compare':'No items to compare',
'TripCart.js_Notes_Data_Saved':'Your notes have been updated in your Trip.',
'TripCart.js_Save_Changes':'Do you want to save changes to your Trip?'};
var arrTooltip=
{'js_Add_To_Cart':'Add checked items to my Trip',
'js_AddItem_Dates':'Assign dates for other items',
'js_AddItem_Hotels':'Add hotel info for other items',
'js_AddItem_Notes':'Add notes for other items',
'js_Cal_Arrival_Date':'Choose Arrival date from Calendar',
'js_Cal_Departure_Date':'Choose Departure date from Calendar',
'js_Cal_Start_Date':'Choose Start Date according to the selected format',
'js_Compare':'Compare checked items',
'js_Dates_Editor':'Assign dates for checked items',
'js_Delete':'Remove checked items from your Trip',
'js_Hide':'Hide checked items',
'js_Hotels_Editor':'Add hotel info for checked items',
'js_Notes_Editor':'Add notes for checked items',
'js_Scroller_TC_Item':'Click for more icons',
'js_Sort_By_Match':'Sort by Match Factor',
'js_Unhide_All':'Restore hidden items',
'ResultMap.js_Add_To_Cart':'Add To Trip',
'ResultMap.js_Add_To_My_Trip_Cart':'Add to Trip',
'ResultMap.js_Compare':'Compare',
'ResultMap.js_Region_Page':'Explore Region'};

/*AjaxLoader.js*/
AjaxLoader=new Class({
initialize:function(element,control,args)
{
this.element=element;
this.control=control;
this.args=args;
this.GetHtml();
},
GetHtml:function()
{
new Ajax("/AjaxLoader.aspx?ControlToLoad="+this.control+"&"+this.args,{method:"get",evalScripts:true}).addEvent("onComplete",this.onComplete.bind(this)).request();
},
onComplete:function(response)
{
this.element.innerHTML=response;
this.fireEvent("onComplete");
}
});
AjaxLoader.implement(new Events);

/*TagCloud.js*/
function tocTabClick(tabId)
{
var curTab=document.getElementById(tabId);
if(!curTab)return;
var parentRow=curTab.parentNode;
if(!parentRow)return;
for(i=0;i<parentRow.cells.length;++i){
parentRow.cells[i].className="tocTabReg";
}
curTab.className="tocTabActive";
var tocInnerTbl=document.getElementById('tocInnerTbl');
if(!tocInnerTbl)return;
for(i=1;i<tocInnerTbl.rows.length;++i){
tocInnerTbl.rows[i].style.display="none";
}
var currentRow=document.getElementById("tr_"+tabId);
if(currentRow)currentRow.style.display="";
if(top.Region&&top.Region.Context)
top.Region.Context.TabGroup=tabId;
}
function tocTabMouseOver(tabId)
{
}
provide("tcCTRL.TagCloud");
tcCTRL.TagCloud=
{
CurrentLinkClicked:null,
Init:function()
{
var toc=$("tocInnerTbl");
if(!toc||toc.rendered)return;
$$("#tocInnerTbl a").each(function(link)
{
link.addEvent("click",function()
{
this.addClass("clicked");
if(tcCTRL.TagCloud.CurrentLinkClicked)
tcCTRL.TagCloud.CurrentLinkClicked.removeClass("clicked");
tcCTRL.TagCloud.CurrentLinkClicked=this;
}.bind(link));
});
toc.rendered=true;
}
};
window.addEvent("domready",tcCTRL.TagCloud.Init);
/*TripCart.RegionPicker.js*/
provide("TripCart.RegionPickerClient");
TripCart.RegionPickerClient=
{
isInitialized:false,
Init:function()
{
if(!TripCart.RegionPickerClient.isInitialized)
{
TripCart.RegionPickerClient.isInitialized=true;
if(!RenderTagCloudInRegionPicker)
TripCart.RegionPickerClient.RenderTagCloud();
}
},
RenderTagCloud:function()
{
var tagCloud=$("tagCloud");
var controlUrl="/TCUserControls/TagCloud.ascx";
var args="r="+MetaRegionFolderName;
new AjaxLoader(tagCloud,controlUrl,args).addEvent("onComplete",function()
{
$("tocBody").style.display="";
tocTabClick('tocTab1');
});
}
};
window.addEvent("domready",TripCart.RegionPickerClient.Init);

/*AjaxPro*/
if(typeof TripCart == "undefined") TripCart={};
TripCart.AjaxMethods_class = function() {};
Object.extend(TripCart.AjaxMethods_class.prototype, Object.extend(new AjaxPro.AjaxClass(), {
	GetDownTime: function() {
		return this.invoke("GetDownTime", {}, this.GetDownTime.getArguments().slice(0));
	},
	IsUserLoggedIn: function() {
		return this.invoke("IsUserLoggedIn", {}, this.IsUserLoggedIn.getArguments().slice(0));
	},
	AddRegionToTrip: function(regionsIDs) {
		return this.invoke("AddRegionToTrip", {"regionsIDs":regionsIDs}, this.AddRegionToTrip.getArguments().slice(1));
	},
	AddAttractionsToCart: function(attractionIDS) {
		return this.invoke("AddAttractionsToCart", {"attractionIDS":attractionIDS}, this.AddAttractionsToCart.getArguments().slice(1));
	},
	AddHotelsToCart: function(hotelIDS) {
		return this.invoke("AddHotelsToCart", {"hotelIDS":hotelIDS}, this.AddHotelsToCart.getArguments().slice(1));
	},
	AddRegionsToCart: function(regionIDS) {
		return this.invoke("AddRegionsToCart", {"regionIDS":regionIDS}, this.AddRegionsToCart.getArguments().slice(1));
	},
	RemoveAttractionsFromCart: function(attractionsIDS) {
		return this.invoke("RemoveAttractionsFromCart", {"attractionsIDS":attractionsIDS}, this.RemoveAttractionsFromCart.getArguments().slice(1));
	},
	RemoveHotelsFromCart: function(hotelIDS) {
		return this.invoke("RemoveHotelsFromCart", {"hotelIDS":hotelIDS}, this.RemoveHotelsFromCart.getArguments().slice(1));
	},
	RemoveRegionsFromCart: function(regionIDS) {
		return this.invoke("RemoveRegionsFromCart", {"regionIDS":regionIDS}, this.RemoveRegionsFromCart.getArguments().slice(1));
	},
	GetNearByHotels: function(x, y) {
		return this.invoke("GetNearByHotels", {"x":x, "y":y}, this.GetNearByHotels.getArguments().slice(2));
	},
	GetLayerByRegionIDInterest: function(regionID, interest) {
		return this.invoke("GetLayerByRegionIDInterest", {"regionID":regionID, "interest":interest}, this.GetLayerByRegionIDInterest.getArguments().slice(2));
	},
	GetNearByAttractions: function(attractionID) {
		return this.invoke("GetNearByAttractions", {"attractionID":attractionID}, this.GetNearByAttractions.getArguments().slice(1));
	},
	GetTripPOIS: function(tripID) {
		return this.invoke("GetTripPOIS", {"tripID":tripID}, this.GetTripPOIS.getArguments().slice(1));
	},
	GetAttractionByID: function(attractionID) {
		return this.invoke("GetAttractionByID", {"attractionID":attractionID}, this.GetAttractionByID.getArguments().slice(1));
	},
	GetRegionByID: function(regionID) {
		return this.invoke("GetRegionByID", {"regionID":regionID}, this.GetRegionByID.getArguments().slice(1));
	},
	GetHotelByID: function(hotelID) {
		return this.invoke("GetHotelByID", {"hotelID":hotelID}, this.GetHotelByID.getArguments().slice(1));
	},
	ChangeMapMetaRegion: function(MetaRegionURL) {
		return this.invoke("ChangeMapMetaRegion", {"MetaRegionURL":MetaRegionURL}, this.ChangeMapMetaRegion.getArguments().slice(1));
	},
	ChangeWhatToDo: function(Interest) {
		return this.invoke("ChangeWhatToDo", {"Interest":Interest}, this.ChangeWhatToDo.getArguments().slice(1));
	},
	UpdateTripCartName_FromMyTripCart: function(TripCartID, TripCartName) {
		return this.invoke("UpdateTripCartName_FromMyTripCart", {"TripCartID":TripCartID, "TripCartName":TripCartName}, this.UpdateTripCartName_FromMyTripCart.getArguments().slice(2));
	},
	UpdateTripCartDateSettings: function(startDate, endDate) {
		return this.invoke("UpdateTripCartDateSettings", {"startDate":startDate, "endDate":endDate}, this.UpdateTripCartDateSettings.getArguments().slice(2));
	},
	UpdateTripCartDiary: function(tripCartNotes) {
		return this.invoke("UpdateTripCartDiary", {"tripCartNotes":tripCartNotes}, this.UpdateTripCartDiary.getArguments().slice(1));
	},
	RemoveItemsFromCart: function(deletedRegions, deletedAttractions, deletedRoutes, deletedHotels) {
		return this.invoke("RemoveItemsFromCart", {"deletedRegions":deletedRegions, "deletedAttractions":deletedAttractions, "deletedRoutes":deletedRoutes, "deletedHotels":deletedHotels}, this.RemoveItemsFromCart.getArguments().slice(4));
	},
	GetPhotosForRegion: function(RegionID, OrderBy) {
		return this.invoke("GetPhotosForRegion", {"RegionID":RegionID, "OrderBy":OrderBy}, this.GetPhotosForRegion.getArguments().slice(2));
	},
	GetPhotosForActivityType: function(RegionID, ActivityType, OrderBy) {
		return this.invoke("GetPhotosForActivityType", {"RegionID":RegionID, "ActivityType":ActivityType, "OrderBy":OrderBy}, this.GetPhotosForActivityType.getArguments().slice(3));
	},
	GetPhotosForAttraction: function(AttractionID, OrderBy) {
		return this.invoke("GetPhotosForAttraction", {"AttractionID":AttractionID, "OrderBy":OrderBy}, this.GetPhotosForAttraction.getArguments().slice(2));
	},
	CopyTrip: function(TripCartID) {
		return this.invoke("CopyTrip", {"TripCartID":TripCartID}, this.CopyTrip.getArguments().slice(1));
	},
	CopyViewTrip: function(TripCartID) {
		return this.invoke("CopyViewTrip", {"TripCartID":TripCartID}, this.CopyViewTrip.getArguments().slice(1));
	},
	ProcessAffiliateImpression: function(paramsStr) {
		return this.invoke("ProcessAffiliateImpression", {"paramsStr":paramsStr}, this.ProcessAffiliateImpression.getArguments().slice(1));
	},
	SaveSearchBarStateFromQueryString: function(Mode, R, K1, D1, D2, D3, F1, F2, F3, P1, P2) {
		return this.invoke("SaveSearchBarStateFromQueryString", {"Mode":Mode, "R":R, "K1":K1, "D1":D1, "D2":D2, "D3":D3, "F1":F1, "F2":F2, "F3":F3, "P1":P1, "P2":P2}, this.SaveSearchBarStateFromQueryString.getArguments().slice(11));
	},
	GetResultsData: function(RequestQueryString) {
		return this.invoke("GetResultsData", {"RequestQueryString":RequestQueryString}, this.GetResultsData.getArguments().slice(1));
	},
	GetMetaRegionGISdata: function() {
		return this.invoke("GetMetaRegionGISdata", {}, this.GetMetaRegionGISdata.getArguments().slice(0));
	},
	AddRegionToCart_FromSerchResult: function(regionsIDs) {
		return this.invoke("AddRegionToCart_FromSerchResult", {"regionsIDs":regionsIDs}, this.AddRegionToCart_FromSerchResult.getArguments().slice(1));
	},
	AbortThread: function() {
		return this.invoke("AbortThread", {}, this.AbortThread.getArguments().slice(0));
	},
	UpdateTrip: function(tripID, isPublic, userID) {
		return this.invoke("UpdateTrip", {"tripID":tripID, "isPublic":isPublic, "userID":userID}, this.UpdateTrip.getArguments().slice(3));
	},
	ViewTrip: function(TripCartID) {
		return this.invoke("ViewTrip", {"TripCartID":TripCartID}, this.ViewTrip.getArguments().slice(1));
	},
	url: '/ajaxpro/TripCart.AjaxMethods,App_Code.ashx'
}));
TripCart.AjaxMethods = new TripCart.AjaxMethods_class();


/*JSHashes*/
var JSHashes={'ActivityToFolder':{'Airport':'airport','ArtMuseum':'art-museums','Beach':'beaches','Biking':'mountain-biking','Boating':'boating','BotanicalGarden':'botanical-gardens','Diving':'scuba-diving','Entertainment':'shows','FactoryTour':'factory-tours','FallFoliage':'fall-foliage','Fishing':'fishing','Gambling':'gambling','GeneralMuseum':'museums','Golf':'golf','Hiking':'hiking','HistoricalSite':'historical-sites','HistoryMuseum':'history-museums','Hotel':'hotels','MountainClimbing':'mountain-climbing','NaturalHistoryMuseum':'natural-history-museums','Nature':'nature','Place':'vacation-ideas','RockGym':'rock-climbing-gym','ScienceMuseum':'science-museums','Shopping':'shopping-malls','Ski':'ski','Spa':'spas','SpectatorSports':'spectator-sports','Surfing':'surfing','ThemeParks':'theme-parks','WhiteWater':'white-water-rafting','Winery':'wineries','Zoo':'zoo-aquarium-botanical-garden'},'InterestToInterestName':{'Tourist-Information':'Tourist Information','Tourist-Attractions-Highlights':'Tourist Attractions - Highlights','Best-Time-to-Visit':'Best Time to Visit','Hotels':'Hotels','Restaurants-Fine-Dining':'Restaurants and Fine Dining','Cost':'Cost','History':'History','Society-Culture':'Society and Culture','Special-Events':'Special Events','Geography':'Geography','Getting-Around':'Getting Around','Getting-There':'Getting There','Fun-Facts':'Fun Facts','Weather':'Weather','Places-to-Visit':'Places to Visit','Guided-Tours':'Guided Tours','Family-Vacation-Ideas':'Family Vacation Ideas','Luxury-Vacations':'Luxury Vacations','Romantic-Vacations-Getaways':'Romantic Vacations and Getaways','Outdoor-Sports-Recreation':'Outdoor Sports and Recreation','Adventure-Travel':'Adventure Travel','Beaches':'Beaches','Biking':'Biking','Boating-Cruise-Vacations':'Cruises and Boating','Breweries':'Breweries','Indoor-Rock-Climbing-Walls':'Indoor Rock Climbing Walls','Cool-Things-to-Do':'Cool and Fun Things to Do','Alcohol-Distilleries':'Alcohol Distilleries','Arts-Entertainment':'Arts and Entertainment','Fishing':'Fishing','Casino-Gambling':'Casino Gambling','Golf':'Golf','Sea-Kayaking-Canoeing':'Sea Kayaking and Canoeing','Public-Recreational-Parks':'Public Recreational Parks','Scuba-Diving':'Scuba Diving','Shopping':'Shopping','Skiing':'Skiing','Snorkeling':'Snorkeling','Spas':'Spas','Theme-Parks':'Theme Parks','White-Water-Rafting':'White Water Rafting','Architecture':'Architecture','Botanical-Gardens':'Botanical Gardens','Behind-Scenes-Factory-Tours':'Behind-the-Scenes and Factory Tours','Fall-Foliage':'Fall Foliage','Historical-Sites':'Historical Sites','Museums':'Museums','Nature-Wildlife':'Nature and Wildlife','Off-the-Beaten-Path':'Off the Beaten Path','Most-Scenic-Drives':'Most Scenic Drives','Scenery-Scenic-Views':'Scenery - Scenic Views','Sporting-Events':'Sporting Events','Wineries':'Wineries','Zoos-Aquariums':'Zoos and Aquariums'},'ActivityTypeToIsMixedType':{'Highlights':true,'Hotel':false,'History':true,'Airport':false,'Place':false,'Family':true,'Luxury':true,'Romantic':true,'Outdoors':true,'AdventureTravel':true,'Beach':false,'RockGym':false,'CoolActivities':true,'Entertainment':false,'Fishing':true,'Gambling':false,'Golf':false,'ScubaDiving':true,'Shopping':false,'Ski':false,'Snorkeling':true,'Spa':false,'ThemeParks':false,'WhiteWater':false,'BotanicalGarden':false,'FactoryTour':false,'FallFoliage':false,'HistoricalSite':false,'GeneralMuseum':false,'Nature':false,'OffPath':true,'SpectatorSports':false,'Winery':false,'Zoo':false},'ActivityTypeToInterest':{'Airport':'Getting-There','ArtMuseum':'','Beach':'Beaches','Biking':'','Boating':'','BotanicalGarden':'Botanical-Gardens','Diving':'','Entertainment':'Arts-Entertainment','FactoryTour':'Behind-Scenes-Factory-Tours','FallFoliage':'Fall-Foliage','Fishing':'Fishing','Gambling':'Casino-Gambling','GeneralMuseum':'Museums','Golf':'Golf','Hiking':'','HistoricalSite':'Historical-Sites','HistoryMuseum':'','Hotel':'Hotels','MountainClimbing':'','NaturalHistoryMuseum':'','Nature':'Nature-Wildlife','Place':'Places-to-Visit','RockGym':'Indoor-Rock-Climbing-Walls','ScienceMuseum':'','Shopping':'Shopping','Ski':'Skiing','Spa':'Spas','SpectatorSports':'Sporting-Events','Surfing':'','ThemeParks':'Theme-Parks','WhiteWater':'White-Water-Rafting','Winery':'Wineries','Zoo':'Zoos-Aquariums'}}