function correctPNG() {
	for(var i=0; i<document.images.length; i++) {
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale'); visibility:visible\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}

// Note: This function only renders the beginning DIV tag. You need to input the content and the close DIV tag.
function renderPNGBG(name,path,style,repeat,transform) {
	alert('como?');
	document.write('<div id="' + name + '" style="' + style);
	if (pngAlpha) { document.write('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + path + name + '.png\', sizingMethod=\'' + transform + '\');'); }
	else { document.write('background:url(' + path + name + '.png) left top ' + repeat + ';'); }
	document.write('">');
}

// Functions when the window loads
window.onload = function() {
	// [*] Fix PNG Images for IE PC
	if(navigator.appName != "Netscape"){
		if(navigator.platform != "MacPPC"){
			correctPNG();
		}
	}
}



//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006-2007 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
var MooTools={version:"1.11"};function $defined(A){return(A!=undefined)}function $type(B){if(!$defined(B)){return false}if(B.htmlElement){return"element"}var A=typeof B;if(A=="object"&&B.nodeName){switch(B.nodeType){case 1:return"element";case 3:return(/\S/).test(B.nodeValue)?"textnode":"whitespace"}}if(A=="object"||A=="function"){switch(B.constructor){case Array:return"array";case RegExp:return"regexp";case Class:return"class"}if(typeof B.length=="number"){if(B.item){return"collection"}if(B.callee){return"arguments"}}}return A}function $merge(){var C={};for(var B=0;B<arguments.length;B++){for(var E in arguments[B]){var A=arguments[B][E];var D=C[E];if(D&&$type(A)=="object"&&$type(D)=="object"){C[E]=$merge(D,A)}else{C[E]=A}}}return C}var $extend=function(){var A=arguments;if(!A[1]){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};var $native=function(){for(var B=0,A=arguments.length;B<A;B++){arguments[B].extend=function(C){for(var D in C){if(!this.prototype[D]){this.prototype[D]=C[D]}if(!this[D]){this[D]=$native.generic(D)}}}}};$native.generic=function(A){return function(B){return this.prototype[A].apply(B,Array.prototype.slice.call(arguments,1))}};$native(Function,Array,String,Number);function $chk(A){return !!(A||A===0)}function $pick(B,A){return $defined(B)?B:A}function $random(B,A){return Math.floor(Math.random()*(A-B+1)+B)}function $time(){return new Date().getTime()}function $clear(A){clearTimeout(A);clearInterval(A);return null}var Abstract=function(A){A=A||{};A.extend=$extend;return A};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(B){var A=function(){return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=="function")?this.initialize.apply(this,arguments):this};$extend(A,this);A.prototype=B;A.constructor=Class;return A};Class.empty=function(){};Class.prototype={extend:function(B){var C=new this(null);for(var D in B){var A=C[D];C[D]=Class.Merge(A,B[D])}return new Class(C)},implement:function(){for(var B=0,A=arguments.length;B<A;B++){$extend(this.prototype,arguments[B])}}};Class.Merge=function(C,D){if(C&&C!=D){var B=$type(D);if(B!=$type(C)){return D}switch(B){case"function":var A=function(){this.parent=arguments.callee.parent;return D.apply(this,arguments)};A.parent=C;return A;case"object":return $merge(C,D)}}return D};var Chain=new Class({chain:function(A){this.chains=this.chains||[];this.chains.push(A);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(B,A){if(A!=Class.empty){this.$events=this.$events||{};this.$events[B]=this.$events[B]||[];this.$events[B].include(A)}return this},fireEvent:function(C,B,A){if(this.$events&&this.$events[C]){this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this)}return this},removeEvent:function(B,A){if(this.$events&&this.$events[B]){this.$events[B].remove(A)}return this}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var A in this.options){if($type(this.options[A]=="function")&&(/^on[A-Z]/).test(A)){this.addEvent(A,this.options[A])}}}return this}});Array.extend({forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this)}},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B])}}return C},map:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this)}return C},every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false}}return true},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true}}return false},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B}}return -1},copy:function(D,C){D=D||0;if(D<0){D=this.length+D}C=C||(this.length-D);var A=[];for(var B=0;B<C;B++){A[B]=this[D++]}return A},remove:function(C){var B=0;var A=this.length;while(B<A){if(this[B]===C){this.splice(B,1);A--}else{B++}}return this},contains:function(A,B){return this.indexOf(A,B)!=-1},associate:function(C){var D={},B=Math.min(this.length,C.length);for(var A=0;A<B;A++){D[C[A]]=this[A]}return D},extend:function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B])}return this},merge:function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B])}return this},include:function(A){if(!this.contains(A)){this.push(A)}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(A){return Array.copy(A)}function $each(C,B,D){if(C&&typeof C.length=="number"&&$type(C)!="object"){Array.forEach(C,B,D)}else{for(var A in C){B.call(D||C,C[A],A)}}}Array.prototype.test=Array.prototype.contains;String.extend({test:function(A,B){return(($type(A)=="string")?new RegExp(A,B):A).test(this)},toInt:function(){return parseInt(this,10)},toFloat:function(){return parseFloat(this)},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(A){return(A.charAt(0)+"-"+A.charAt(1).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase()})},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s{2,}/g," ").trim()},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):false},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(A)?A.slice(1).hexToRgb(B):false},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}});Array.extend({rgbToHex:function(D){if(this.length<3){return false}if(this.length==4&&this[3]==0&&!D){return"transparent"}var B=[];for(var A=0;A<3;A++){var C=(this[A]-0).toString(16);B.push((C.length==1)?"0"+C:C)}return D?B:"#"+B.join("")},hexToRgb:function(C){if(this.length!=3){return false}var A=[];for(var B=0;B<3;B++){A.push(parseInt((this[B].length==1)?this[B]+this[B]:this[B],16))}return C?A:"rgb("+A.join(",")+")"}});Function.extend({create:function(A){var B=this;A=$merge({bind:B,event:false,"arguments":null,delay:false,periodical:false,attempt:false},A);if($chk(A.arguments)&&$type(A.arguments)!="array"){A.arguments=[A.arguments]}return function(E){var C;if(A.event){E=E||window.event;C=[(A.event===true)?E:new A.event(E)];if(A.arguments){C.extend(A.arguments)}}else{C=A.arguments||arguments}var F=function(){return B.apply($pick(A.bind,B),C)};if(A.delay){return setTimeout(F,A.delay)}if(A.periodical){return setInterval(F,A.periodical)}if(A.attempt){try{return F()}catch(D){return false}}return F()}},pass:function(A,B){return this.create({"arguments":A,bind:B})},attempt:function(A,B){return this.create({"arguments":A,bind:B,attempt:true})()},bind:function(B,A){return this.create({bind:B,"arguments":A})},bindAsEventListener:function(B,A){return this.create({bind:B,event:true,"arguments":A})},delay:function(B,C,A){return this.create({delay:B,bind:C,"arguments":A})()},periodical:function(A,C,B){return this.create({periodical:A,bind:C,"arguments":B})()}});Number.extend({toInt:function(){return parseInt(this)},toFloat:function(){return parseFloat(this)},limit:function(B,A){return Math.min(A,Math.max(B,this))},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A},times:function(B){for(var A=0;A<this;A++){B(A)}}});var Element=new Class({initialize:function(D,C){if($type(D)=="string"){if(window.ie&&C&&(C.name||C.type)){var A=(C.name)?' name="'+C.name+'"':"";var B=(C.type)?' type="'+C.type+'"':"";delete C.name;delete C.type;D="<"+D+A+B+">"}D=document.createElement(D)}D=$(D);return(!C||!D)?D:D.set(C)}});var Elements=new Class({initialize:function(A){return(A)?$extend(A,this):this}});Elements.extend=function(A){for(var B in A){this.prototype[B]=A[B];this[B]=$native.generic(B)}};function $(B){if(!B){return null}if(B.htmlElement){return Garbage.collect(B)}if([window,document].contains(B)){return B}var A=$type(B);if(A=="string"){B=document.getElementById(B);A=(B)?"element":false}if(A!="element"){return null}if(B.htmlElement){return Garbage.collect(B)}if(["object","embed"].contains(B.tagName.toLowerCase())){return B}$extend(B,Element.prototype);B.htmlElement=function(){};return Garbage.collect(B)}document.getElementsBySelector=document.getElementsByTagName;function $$(){var D=[];for(var C=0,B=arguments.length;C<B;C++){var A=arguments[C];switch($type(A)){case"element":D.push(A);case"boolean":break;case false:break;case"string":A=document.getElementsBySelector(A,true);default:D.extend(A)}}return $$.unique(D)}$$.unique=function(G){var D=[];for(var C=0,A=G.length;C<A;C++){if(G[C].$included){continue}var B=$(G[C]);if(B&&!B.$included){B.$included=true;D.push(B)}}for(var F=0,E=D.length;F<E;F++){D[F].$included=null}return new Elements(D)};Elements.Multi=function(A){return function(){var D=arguments;var B=[];var G=true;for(var E=0,C=this.length,F;E<C;E++){F=this[E][A].apply(this[E],D);if($type(F)!="element"){G=false}B.push(F)}return(G)?$$.unique(B):B}};Element.extend=function(A){for(var B in A){HTMLElement.prototype[B]=A[B];Element.prototype[B]=A[B];Element[B]=$native.generic(B);var C=(Array.prototype[B])?B+"Elements":B;Elements.prototype[C]=Elements.Multi(B)}};Element.extend({set:function(A){for(var C in A){var B=A[C];switch(C){case"styles":this.setStyles(B);break;case"events":if(this.addEvents){this.addEvents(B)}break;case"properties":this.setProperties(B);break;default:this.setProperty(C,B)}}return this},inject:function(C,A){C=$(C);switch(A){case"before":C.parentNode.insertBefore(this,C);break;case"after":var B=C.getNext();if(!B){C.parentNode.appendChild(this)}else{C.parentNode.insertBefore(this,B)}break;case"top":var D=C.firstChild;if(D){C.insertBefore(this,D);break}default:C.appendChild(this)}return this},injectBefore:function(A){return this.inject(A,"before")},injectAfter:function(A){return this.inject(A,"after")},injectInside:function(A){return this.inject(A,"bottom")},injectTop:function(A){return this.inject(A,"top")},adopt:function(){var A=[];$each(arguments,function(B){A=A.concat(B)});$$(A).inject(this);return this},remove:function(){return this.parentNode.removeChild(this)},clone:function(C){var B=$(this.cloneNode(C!==false));if(!B.$events){return B}B.$events={};for(var A in this.$events){B.$events[A]={keys:$A(this.$events[A].keys),values:$A(this.$events[A].values)}}return B.removeEvents()},replaceWith:function(A){A=$(A);this.parentNode.replaceChild(A,this);return A},appendText:function(A){this.appendChild(document.createTextNode(A));return this},hasClass:function(A){return this.className.contains(A," ")},addClass:function(A){if(!this.hasClass(A)){this.className=(this.className+" "+A).clean()}return this},removeClass:function(A){this.className=this.className.replace(new RegExp("(^|\\s)"+A+"(?:\\s|$)"),"$1").clean();return this},toggleClass:function(A){return this.hasClass(A)?this.removeClass(A):this.addClass(A)},setStyle:function(B,A){switch(B){case"opacity":return this.setOpacity(parseFloat(A));case"float":B=(window.ie)?"styleFloat":"cssFloat"}B=B.camelCase();switch($type(A)){case"number":if(!["zIndex","zoom"].contains(B)){A+="px"}break;case"array":A="rgb("+A.join(",")+")"}this.style[B]=A;return this},setStyles:function(A){switch($type(A)){case"object":Element.setMany(this,"setStyle",A);break;case"string":this.style.cssText=A}return this},setOpacity:function(A){if(A==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=(A==1)?"":"alpha(opacity="+A*100+")"}this.style.opacity=this.$tmp.opacity=A;return this},getStyle:function(C){C=C.camelCase();var A=this.style[C];if(!$chk(A)){if(C=="opacity"){return this.$tmp.opacity}A=[];for(var B in Element.Styles){if(C==B){Element.Styles[B].each(function(F){var E=this.getStyle(F);A.push(parseInt(E)?E:"0px")},this);if(C=="border"){var D=A.every(function(E){return(E==A[0])});return(D)?A[0]:false}return A.join(" ")}}if(C.contains("border")){if(Element.Styles.border.contains(C)){return["Width","Style","Color"].map(function(E){return this.getStyle(C+E)},this).join(" ")}else{if(Element.borderShort.contains(C)){return["Top","Right","Bottom","Left"].map(function(E){return this.getStyle("border"+E+C.replace("border",""))},this).join(" ")}}}if(document.defaultView){A=document.defaultView.getComputedStyle(this,null).getPropertyValue(C.hyphenate())}else{if(this.currentStyle){A=this.currentStyle[C]}}}if(window.ie){A=Element.fixStyle(C,A,this)}if(A&&C.test(/color/i)&&A.contains("rgb")){return A.split("rgb").splice(1,4).map(function(E){return E.rgbToHex()}).join(" ")}return A},getStyles:function(){return Element.getMany(this,"getStyle",arguments)},walk:function(A,C){A+="Sibling";var B=(C)?this[C]:this[A];while(B&&$type(B)!="element"){B=B[A]}return $(B)},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(A){return !!$A(this.getElementsByTagName("*")).contains(A)},getProperty:function(D){var B=Element.Properties[D];if(B){return this[B]}var A=Element.PropertiesIFlag[D]||0;if(!window.ie||A){return this.getAttribute(D,A)}var C=this.attributes[D];return(C)?C.nodeValue:null},removeProperty:function(B){var A=Element.Properties[B];if(A){this[A]=""}else{this.removeAttribute(B)}return this},getProperties:function(){return Element.getMany(this,"getProperty",arguments)},setProperty:function(C,B){var A=Element.Properties[C];if(A){this[A]=B}else{this.setAttribute(C,B)}return this},setProperties:function(A){return Element.setMany(this,"setProperty",A)},setHTML:function(){this.innerHTML=$A(arguments).join("");return this},setText:function(B){var A=this.getTag();if(["style","script"].contains(A)){if(window.ie){if(A=="style"){this.styleSheet.cssText=B}else{if(A=="script"){this.setProperty("text",B)}}return this}else{this.removeChild(this.firstChild);return this.appendText(B)}}this[$defined(this.innerText)?"innerText":"textContent"]=B;return this},getText:function(){var A=this.getTag();if(["style","script"].contains(A)){if(window.ie){if(A=="style"){return this.styleSheet.cssText}else{if(A=="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(E,A,D){if($chk(parseInt(A))){return A}if(["height","width"].contains(E)){var B=(E=="width")?["left","right"]:["top","bottom"];var C=0;B.each(function(F){C+=D.getStyle("border-"+F+"-width").toInt()+D.getStyle("padding-"+F).toInt()});return D["offset"+E.capitalize()]-C+"px"}else{if(E.test(/border(.+)Width|margin|padding/)){return"0px"}}return A};Element.Styles={border:[],padding:[],margin:[]};["Top","Right","Bottom","Left"].each(function(B){for(var A in Element.Styles){Element.Styles[A].push(A+B)}});Element.borderShort=["borderWidth","borderStyle","borderColor"];Element.getMany=function(B,D,C){var A={};$each(C,function(E){A[E]=B[D](E)});return A};Element.setMany=function(B,D,C){for(var A in C){B[D](A,C[A])}return B};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(B,A){if(this.addEventListener){this.addEventListener(B,A,false)}else{this.attachEvent("on"+B,A)}return this},removeListener:function(B,A){if(this.removeEventListener){this.removeEventListener(B,A,false)}else{this.detachEvent("on"+B,A)}return this}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(A){if(!A.$tmp){Garbage.elements.push(A);A.$tmp={opacity:1}}return A},trash:function(D){for(var B=0,A=D.length,C;B<A;B++){if(!(C=D[B])||!C.$tmp){continue}if(C.$events){C.fireEvent("trash").removeEvents()}for(var E in C.$tmp){C.$tmp[E]=null}for(var F in Element.prototype){C[F]=null}Garbage.elements[Garbage.elements.indexOf(C)]=null;C.htmlElement=C.$tmp=C=null}Garbage.elements.remove(null)},empty:function(){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(C){if(C&&C.$extended){return C}this.$extended=true;C=C||window.event;this.event=C;this.type=C.type;this.target=C.target||C.srcElement;if(this.target.nodeType==3){this.target=this.target.parentNode}this.shift=C.shiftKey;this.control=C.ctrlKey;this.alt=C.altKey;this.meta=C.metaKey;if(["DOMMouseScroll","mousewheel"].contains(this.type)){this.wheel=(C.wheelDelta)?C.wheelDelta/120:-(C.detail||0)/3}else{if(this.type.contains("key")){this.code=C.which||C.keyCode;for(var B in Event.keys){if(Event.keys[B]==this.code){this.key=B;break}}if(this.type=="keydown"){var A=this.code-111;if(A>0&&A<13){this.key="f"+A}}this.key=this.key||String.fromCharCode(this.code).toLowerCase()}else{if(this.type.test(/(click|mouse|menu)/)){this.page={x:C.pageX||C.clientX+document.documentElement.scrollLeft,y:C.pageY||C.clientY+document.documentElement.scrollTop};this.client={x:C.pageX?C.pageX-window.pageXOffset:C.clientX,y:C.pageY?C.pageY-window.pageYOffset:C.clientY};this.rightClick=(C.which==3)||(C.button==2);switch(this.type){case"mouseover":this.relatedTarget=C.relatedTarget||C.fromElement;break;case"mouseout":this.relatedTarget=C.relatedTarget||C.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(A){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(C,B){this.$events=this.$events||{};this.$events[C]=this.$events[C]||{keys:[],values:[]};if(this.$events[C].keys.contains(B)){return this}this.$events[C].keys.push(B);var A=C;var D=Element.Events[C];if(D){if(D.add){D.add.call(this,B)}if(D.map){B=D.map}if(D.type){A=D.type}}if(!this.addEventListener){B=B.create({bind:this,event:true})}this.$events[C].values.push(B);return(Element.NativeEvents.contains(A))?this.addListener(A,B):this},removeEvent:function(C,B){if(!this.$events||!this.$events[C]){return this}var F=this.$events[C].keys.indexOf(B);if(F==-1){return this}var A=this.$events[C].keys.splice(F,1)[0];var E=this.$events[C].values.splice(F,1)[0];var D=Element.Events[C];if(D){if(D.remove){D.remove.call(this,B)}if(D.type){C=D.type}}return(Element.NativeEvents.contains(C))?this.removeListener(C,E):this},addEvents:function(A){return Element.setMany(this,"addEvent",A)},removeEvents:function(A){if(!this.$events){return this}if(!A){for(var B in this.$events){this.removeEvents(B)}this.$events=null}else{if(this.$events[A]){this.$events[A].keys.each(function(C){this.removeEvent(A,C)},this);this.$events[A]=null}}return this},fireEvent:function(C,B,A){if(this.$events&&this.$events[C]){this.$events[C].keys.each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this)}return this},cloneEvents:function(C,A){if(!C.$events){return this}if(!A){for(var B in C.$events){this.cloneEvents(C,B)}}else{if(C.$events[A]){C.$events[A].keys.each(function(D){this.addEvent(A,D)},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(A){A=new Event(A);if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseenter",A)}}},mouseleave:{type:"mouseout",map:function(A){A=new Event(A);if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseleave",A)}}},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(B,A){return this.create({bind:B,"arguments":A,event:Event})}});Element.Events.domready={add:function(B){if(window.loaded){B.call(this);return }var A=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)){A()}}.periodical(50)}else{if(document.readyState&&window.ie){if(!$("ie_ready")){var C=(window.location.protocol=="https:")?"://0":"javascript:void(0)";document.write('<script id="ie_ready" defer src="'+C+'"><\/script>');$("ie_ready").onreadystatechange=function(){if(this.readyState=="complete"){A()}}}}else{window.addListener("load",A);document.addListener("DOMContentLoaded",A)}}}};window.onDomReady=function(A){return this.addEvent("domready",A)};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(A){return -(Math.cos(Math.PI*A)-1)/2},duration:500,unit:"px",wait:true,fps:50},initialize:function(A){this.element=this.element||null;this.setOptions(A);if(this.options.initialize){this.options.initialize.call(this)}},step:function(){var A=$time();if(A<this.time+this.options.duration){this.delta=this.options.transition((A-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(A){this.now=A;this.increase();return this},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(B,A){return(A-B)*this.delta+B},start:function(B,A){if(!this.options.wait){this.stop()}else{if(this.timer){return this}}this.from=B;this.to=A;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(A){if(!this.timer){return this}this.timer=$clear(this.timer);if(!A){this.fireEvent("onCancel",this.element)}return this},custom:function(B,A){return this.start(B,A)},clearTimer:function(A){return this.stop(A)}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(B,C){if(B.test(/color/i)){return this.Color}var A=$type(C);if((A=="array")||(A=="string"&&C.contains(" "))){return this.Multi}return this.Single},parse:function(C,D,A){if(!A.push){A=[A]}var F=A[0],E=A[1];if(!$chk(E)){E=F;F=C.getStyle(D)}var B=this.select(D,E);return{from:B.parse(F),to:B.parse(E),css:B}}};Fx.CSS.Single={parse:function(A){return parseFloat(A)},getNow:function(C,B,A){return A.compute(C,B)},getValue:function(C,A,B){if(A=="px"&&B!="opacity"){C=Math.round(C)}return C+A}};Fx.CSS.Multi={parse:function(A){return A.push?A:A.split(" ").map(function(B){return parseFloat(B)})},getNow:function(E,D,C){var A=[];for(var B=0;B<E.length;B++){A[B]=C.compute(E[B],D[B])}return A},getValue:function(C,A,B){if(A=="px"&&B!="opacity"){C=C.map(Math.round)}return C.join(A+" ")+A}};Fx.CSS.Color={parse:function(A){return A.push?A:A.hexToRgb(true)},getNow:function(E,D,C){var A=[];for(var B=0;B<E.length;B++){A[B]=Math.round(C.compute(E[B],D[B]))}return A},getValue:function(A){return"rgb("+A.join(",")+")"}};Fx.Style=Fx.Base.extend({initialize:function(B,C,A){this.element=$(B);this.property=C;this.parent(A)},hide:function(){return this.set(0)},setNow:function(){this.now=this.css.getNow(this.from,this.to,this)},set:function(A){this.css=Fx.CSS.select(this.property,A);return this.parent(this.css.parse(A))},start:function(C,B){if(this.timer&&this.options.wait){return this}var A=Fx.CSS.parse(this.element,this.property,[C,B]);this.css=A.css;return this.parent(A.from,A.to)},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property))}});Element.extend({effect:function(B,A){return new Fx.Style(this,B,A)}});Fx.Styles=Fx.Base.extend({initialize:function(B,A){this.element=$(B);this.parent(A)},setNow:function(){for(var A in this.from){this.now[A]=this.css[A].getNow(this.from[A],this.to[A],this)}},set:function(C){var A={};this.css={};for(var B in C){this.css[B]=Fx.CSS.select(B,C[B]);A[B]=this.css[B].parse(C[B])}return this.parent(A)},start:function(C){if(this.timer&&this.options.wait){return this}this.now={};this.css={};var E={},D={};for(var B in C){var A=Fx.CSS.parse(this.element,B,C[B]);E[B]=A.from;D[B]=A.to;this.css[B]=A.css}return this.parent(E,D)},increase:function(){for(var A in this.now){this.element.setStyle(A,this.css[A].getValue(this.now[A],this.options.unit,A))}}});Element.extend({effects:function(A){return new Fx.Styles(this,A)}});

/*
	Slimbox v1.58 - The ultimate lightweight Lightbox clone
	(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
	MIT-style license.
*/
var Slimbox=(function(){var G=window,v,h,H=-1,q,x,F,w,z,N,t,l=r.bindWithEvent(),f=window.opera&&(navigator.appVersion>="9.3"),p=document.documentElement,o={},u=new Image(),L=new Image(),J,b,i,K,e,I,c,B,M,y,j,d,D;G.addEvent("domready",function(){$(document.body).adopt($$(J=new Element("div",{id:"lbOverlay"}),b=new Element("div",{id:"lbCenter"}),I=new Element("div",{id:"lbBottomContainer"})).setStyle("display","none"));i=new Element("div",{id:"lbImage"}).injectInside(b).adopt(K=new Element("a",{id:"lbPrevLink",href:"#"}),e=new Element("a",{id:"lbNextLink",href:"#"}));K.onclick=C;e.onclick=g;var O;c=new Element("div",{id:"lbBottom"}).injectInside(I).adopt(O=new Element("a",{id:"lbCloseLink",href:"#"}),B=new Element("div",{id:"lbCaption"}),M=new Element("div",{id:"lbNumber"}),new Element("div",{styles:{clear:"both"}}));O.onclick=J.onclick=E});function A(){var P=G.getScrollLeft(),O=f?p.clientWidth:G.getWidth();$$(b,I).setStyle("left",P+(O/2));if(w){J.setStyles({left:P,top:G.getScrollTop(),width:O,height:G.getHeight()})}}function n(O){["object",G.ie6?"select":"embed"].forEach(function(Q){$each(document.getElementsByTagName(Q),function(R){if(O){R._slimbox=R.style.visibility}R.style.visibility=O?"hidden":R._slimbox})});J.style.display=O?"":"none";var P=O?"addEvent":"removeEvent";G[P]("scroll",A)[P]("resize",A);document[P]("keydown",l)}function r(P){var O=P.code;if(v.closeKeys.contains(O)){E()}else{if(v.nextKeys.contains(O)){g()}else{if(v.previousKeys.contains(O)){C()}}}P.stop()}function C(){return a(x)}function g(){return a(F)}function a(O){if(O>=0){H=O;q=h[O][0];x=(H||(v.loop?h.length:0))-1;F=((H+1)%h.length)||(v.loop?0:-1);s();b.className="lbLoading";o=new Image();o.onload=m;o.src=q}return false}function m(){b.className="";d.set(0);i.setStyles({width:o.width,backgroundImage:"url("+q+")",display:""});$$(i,K,e).setStyle("height",o.height);B.setHTML(h[H][1]||"");M.setHTML((((h.length>1)&&v.counterText)||"").replace(/{x}/,H+1).replace(/{y}/,h.length));if(x>=0){u.src=h[x][0]}if(F>=0){L.src=h[F][0]}N=i.offsetWidth;t=i.offsetHeight;var O=Math.max(0,z-(t/2));if(b.offsetHeight!=t){j.chain(j.start.pass({height:t,top:O},j))}if(b.offsetWidth!=N){j.chain(j.start.pass({width:N,marginLeft:-N/2},j))}j.chain(function(){I.setStyles({width:N,top:O+t,marginLeft:-N/2,visibility:"hidden",display:""});d.start(1)});j.callChain()}function k(){if(x>=0){K.style.display=""}if(F>=0){e.style.display=""}D.set(-c.offsetHeight).start(0);I.style.visibility=""}function s(){o.onload=Class.empty;o.src=u.src=L.src=q;j.clearChain();j.stop();d.stop();D.stop();$$(K,e,i,I).setStyle("display","none")}function E(){if(H>=0){s();H=x=F=-1;b.style.display="none";y.stop().chain(n).start(0)}return false}Element.extend({slimbox:function(O,P){$$(this).slimbox(O,P);return this}});Elements.extend({slimbox:function(O,R,Q){R=R||function(S){return[S.href,S.title]};Q=Q||function(){return true};var P=this;P.forEach(function(S){S.removeEvents("click").addEvent("click",function(T){var U=P.filter(Q,this);Slimbox.open(U.map(R),U.indexOf(this),O);T.stop()}.bindWithEvent(S))});return P}});return{open:function(Q,P,O){v=$extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeTransition:false,initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},O||{});y=J.effect("opacity",{duration:v.overlayFadeDuration});j=b.effects($extend({duration:v.resizeDuration},v.resizeTransition?{transition:v.resizeTransition}:{}));d=i.effect("opacity",{duration:v.imageFadeDuration,onComplete:k});D=c.effect("margin-top",{duration:v.captionAnimationDuration});if(typeof Q=="string"){Q=[[Q,P]];P=0}z=G.getScrollTop()+((f?p.clientHeight:G.getHeight())/2);N=v.initialWidth;t=v.initialHeight;b.setStyles({top:Math.max(0,z-(t/2)),width:N,height:t,marginLeft:-N/2,display:""});w=G.ie6||(J.currentStyle&&(J.currentStyle.position!="fixed"));if(w){J.style.position="absolute"}y.set(0).start(v.overlayOpacity);A();n(1);h=Q;v.loop=v.loop&&(h.length>1);return a(P)}}})();

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
Slimbox.scanPage = function() {
	$$($$("a").filter(function(el) {
		return el.rel && el.rel.test(/^lightbox/i);
	})).slimbox({/* Put custom options here */}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});
};
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	window.addEvent("domready", Slimbox.scanPage);
}

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



//calendar js
function changeout(){
		if(document.getElementById){ 
			var dropdownIndex = document.getElementById('arrivalMonth').selectedIndex;
			document.getElementById('departureMonth').selectedIndex=dropdownIndex;
		}else if(document.all){ 
			var dropdownIndex = document.all['arrivalMonth'].selectedIndex;
			document.all['departureMonth'].selectedIndex=dropdownIndex;
		}else if(document.layers){
			var dropdownIndex = document.layers['arrivalMonth'].selectedIndex;
			document.layers['departureMonth'].selectedIndex=dropdownIndex;
		}			
	}
	function lastday(mon, yr)
	{
		var start_date= new Date(yr, mon, 1);
		var end_date= new Date(yr, mon+1, 1);
		lday =( end_date - start_date);
		lday = lday/(24*60*60000);
		return lday;
	}
	function idays(m,d,y)
	{
		lday=lastday(m.options[m.selectedIndex].value-1 ,
	    y.options[y.selectedIndex].value);
		d.length=lday;
 	    for(i=0;i<lday;i++)
	    {
			d.options[i].text=i+1;
			d.options[i].value=i+1;
	    }
		var strDate = new Date();
		var strCurrentDate = new Date(m.value+"/"+d.value+"/"+y.value);
		var futuredate=new Date(parseInt(strCurrentDate.getMonth()+1,10) + "/" + (strCurrentDate.getDate()+2) + "/" + strCurrentDate.getFullYear());
		/*window.document.quicksearch.departureMonth.value=futuredate.getMonth()+1;
		window.document.quicksearch.departureDay.value=futuredate.getDate();
		window.document.quicksearch.departureYear.value=futuredate.getFullYear();*/
		
	}
	function fnToday()
	{
		var strDate = new Date();
		var strCurrentDate = new Date(strDate.getMonth()+1+"/"+strDate.getDate()+"/"+strDate.getFullYear());
		window.document.quicksearch.arrivalMonth.value=strDate.getMonth()+1;
		window.document.quicksearch.arrivalDay.value=strDate.getDate();
		window.document.quicksearch.arrivalYear.value=strDate.getFullYear();
		
		window.document.quicksearch.departureMonth.value=strDate.getMonth()+1;
		window.document.quicksearch.departureDay.value=strDate.getDate()+2;
		window.document.quicksearch.departureYear.value=strDate.getFullYear();
	}
	function fnSubmit()
	{	
		if(window.document.quicksearch.arrivalMonth.value<10)
		{window.document.quicksearch1.gstArrivalMonth.value="0"+parseInt(window.document.quicksearch.arrivalMonth.value);}
		else{window.document.quicksearch1.gstArrivalMonth.value=window.document.quicksearch.arrivalMonth.value;}
		window.document.quicksearch1.gstArrivalDay.value=window.document.quicksearch.arrivalDay.value;
		window.document.quicksearch1.gstArrivalYear.value=window.document.quicksearch.arrivalYear.value;
		if(window.document.quicksearch.departureMonth.value<10)
		{window.document.quicksearch1.gstDepartureMonth.value="0"+parseInt(window.document.quicksearch.departureMonth.value);}
		else{window.document.quicksearch1.gstDepartureMonth.value=window.document.quicksearch.departureMonth.value;}
		window.document.quicksearch1.gstDepartureDay.value=window.document.quicksearch.departureDay.value;
		window.document.quicksearch1.gstDepartureYear.value=window.document.quicksearch.departureYear.value;
		window.document.quicksearch.numRooms.value=window.document.quicksearch.selectedRooms.value;
		window.document.quicksearch1.numGstRooms.value=window.document.quicksearch.selectedRooms.value;
		var monthname=new Array("01","02","03","04","05","06","07","08","09","10","11","12");
		CheckInMonth=window.document.quicksearch.arrivalMonth.options[window.document.quicksearch.arrivalMonth.options.selectedIndex].value;
		CheckInDay=window.document.quicksearch.arrivalDay.value;
		
		var CheckInYear=window.document.quicksearch.arrivalYear.options[window.document.quicksearch.arrivalYear.options.selectedIndex].value;
		
		var strCurrentDate = new Date();
		var checkIn=new Date();
		checkIn = new Date(CheckInYear, CheckInMonth-1, CheckInDay, 23, 59, 59);  // set to midnight
		if(checkIn.getTime()<strCurrentDate.getTime())
		{			
			alert("Check-IN Date can not be passed date.");					 
			return false;
		}	
		
					
		var monthname1=new Array("01","02","03","04","05","06","07","08","09","10","11","12");
		//CheckOutMonthYear=window.document.quicksearch.departureMonth.options[window.document.quicksearch.departureMonth.options.selectedIndex].value;
		CheckOutMonth=window.document.quicksearch.departureMonth.options[window.document.quicksearch.departureMonth.options.selectedIndex].value;
		CheckOutDay=window.document.quicksearch.departureDay.value;
		
		
		var CheckOutDay=window.document.quicksearch.departureDay.options[window.document.quicksearch.departureDay.options.selectedIndex].value;
		var CheckOutYear=window.document.quicksearch.departureYear.options[window.document.quicksearch.departureYear.options.selectedIndex].value;
		 	  
		var checkOut=new Date();
		checkOut = new Date(CheckOutYear, CheckOutMonth-1, CheckOutDay, 23, 59, 59);  // set to midnight
		if(checkIn.getTime() >=checkOut.getTime())
		{			
			alert("Check-Out Date should be greater than Check-In Date.");					 
			return false;
		}
		//window.document.quicksearch.checkInDay.value=CheckInMonth+"/"+CheckInDay+"/"+CheckInYear;
		//window.document.quicksearch.checkOutDay.value=CheckOutMonth+"/"+CheckOutDay+"/"+CheckOutYear;	
		resclick(); 	
		if(window.document.quicksearch.selectedRooms.value > 4)
		{	
			window.document.quicksearch1.submit();
			return false;
		}		
	}
	


//searchcodefunctions.js
// $Header: /vc/cvsroot/nb3lf/web/htdocs/style/sharedcode/searchcodefunctions.js,v 1.1 2003/09/19 21:05:27 rgalbrai Exp $
      //************************************************************************
      // Global variables
      //************************************************************************

      var submitting = false;

      //************************************************************************
      // Function:  initForm
      // Purpose:   Initialize Arrival Date and Departure Date controls.
      // Input:     arr* - Arrival date
      //            dep* - Departure date
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    None
      //************************************************************************

      function initForm (formStr, arrYear, arrMonth, arrDay, depYear, depMonth, depDay, language, locale)
      {

        // Initialize date to todays date + 1.
        var myDate = new Date ();
        var month = myDate.getMonth () + 1;
        var year = getFullYear (myDate);
        var day = myDate.getDate () + 1;
        if (day > getDaysInMonth (month, year))
        {
         day = 1;
         month = month + 1;
         if (month > 12)
         {
            year = year + 1;
            month = 1;
         }
        }


        if (arrYear != "" && arrMonth != "" && arrDay != "")
        {
          // If Arrival date was posted in then initialize.
          year = parseInt (arrYear, 10);
          month = parseInt (arrMonth, 10);
          day = parseInt (arrDay, 10);

          myDate = new Date (arrYear, arrMonth, arrDay);
        }

        // Initialize arrival date.
        // Initalize form year.
        var index;
        for (index = 0; (index < document.getElementById('checkInYear').length) &&
                        (document.getElementById('checkInYear').options[index].value != year);
             index++);
        document.getElementById('checkInYear').options[index].selected = true;

        // Initalize form month.
        for (index = 0; (index < document.getElementById('checkInMonth').length) &&
                        (document.getElementById('checkInMonth').options[index].value != month);
             index++);
        document.getElementById('checkInMonth').options[index].selected = true;

        // Initalize form day.
        for (index = 0; (index < document.getElementById('checkInDay').length) &&
                        (document.getElementById('checkInDay').options[index].value != day);
             index++);
        document.getElementById('checkInDay').options[index].selected = true;

        // Initalize Day of the week.
        document.getElementById('DATERANGESTART_DOW').value = getDayOfWeek (buildCRSDate (year, month, day));

        if (depYear != "" && depMonth != "" && depDay != "")
        {
          // If departure date was posted in then initialize.
          year = parseInt (depYear, 10);
          month = parseInt (depMonth, 10);
          day = parseInt (depDay, 10);
        }
        else
        {
          // Add 1 to the current date to get the initial departure date.
          day = day + 1;
          if (day > getDaysInMonth (month, year))
          {
            day = 1;
            month = month + 1;
            if (month > 12)
            {
              year = year + 1;
              month = 1;
            }
          }
        }

        // Initalize form year.
        for (index = 0; (index < document.getElementById('DATERANGEEND_YEAR').length) &&
                        (document.getElementById('DATERANGEEND_YEAR').options[index].value != year);
             index++);
        document.getElementById('DATERANGEEND_YEAR').options[index].selected = true;

        // Initalize form month.
        for (index = 0; (index < document.getElementById('DATERANGEEND_MONTH').length) &&
                        (document.getElementById('DATERANGEEND_MONTH').options[index].value != month);
             index++);
        document.getElementById('DATERANGEEND_MONTH').options[index].selected = true;

        // Initalize form day.
        for (index = 0; (index < document.getElementById('DATERANGEEND_DAY').length) &&
                        (document.getElementById('DATERANGEEND_DAY').options[index].value != day);
             index++);
        document.getElementById('DATERANGEEND_DAY').options[index].selected = true;

        // Initalize Day of the week.
        document.getElementById('DATERANGEEND_DOW').value = getDayOfWeek (buildCRSDate (year, month, day));

        // other dropdowns are inited in XSL.
      }

      //************************************************************************
      // Function:  validateDay
      // Purpose:   Ensure that a selected day is valid. Example 2/31 is an
      //            invalid day. If an invalid date is selected, select the
      //            previous valid day.
      // Input:     yearCtrl - Year dropdown.
      //            monthCtrl - Month dropdown.
      //            dayCtrl - Day dropdown.
      // Output:    None
      //************************************************************************

      function validateDay (formStr, yearCtrl, monthCtrl, dayCtrl)
      {
        eval ("var year = parseInt (document.getElementById('" + yearCtrl + "').options[document.getElementById('" + yearCtrl + "').selectedIndex].value, 10)");
        eval ("var month = parseInt (document.getElementById('" + monthCtrl + "').options[document.getElementById('" + monthCtrl + "').selectedIndex].value, 10)");
        eval ("var day = parseInt (document.getElementById('" + dayCtrl + "').options[document.getElementById('" + dayCtrl + "').selectedIndex].value, 10)");

        if (day > (maxDay = getDaysInMonth (month, year)))
        {
          for (index = 0; (index < eval ("document.getElementById('" + dayCtrl + "').length")) &&
                          (eval ("document.getElementById('" + dayCtrl + "').options[" + index+ "].value != " + maxDay));
               index++);
          eval ("document.getElementById('" + dayCtrl + "').options[" + index + "].selected = true");
        }

      }

      //************************************************************************
      // Function:  updateDOW
      // Purpose:   Set the Day of the Week to the valid string (Monday, Tuesday, etc.)
      // Input:     yearCtrl - Year dropdown.
      //            monthCtrl - Month dropdown.
      //            dayCtrl - Day dropdown.
      //            dowCtrl - Day of the Week Control - Control to set.
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    None
      //************************************************************************

      function updateDOW (formStr, yearCtrl, monthCtrl, dayCtrl, dowCtrl, language, locale)
      {
        eval ("var year = parseInt (document.getElementById('" + yearCtrl + "').options[document.getElementById('" + yearCtrl + "').selectedIndex].value, 10)");
        eval ("var month = parseInt (document.getElementById('" + monthCtrl + "').options[document.getElementById('" + monthCtrl + "').selectedIndex].value, 10)");
        eval ("var day = parseInt (document.getElementById('" + dayCtrl + "').options[document.getElementById('" + dayCtrl + "').selectedIndex].value, 10)");

        eval ("document.getElementById('" + dowCtrl + "').value = getDayOfWeek (buildCRSDate (year, month, day))");
      }

      //************************************************************************
      // Function:  updateDATERANGEEND
      // Purpose:   Update the Departure Date to the Arrival Date + 1.
      // Input:     language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    None
      //************************************************************************

      function updateDATERANGEEND (formStr, language, locale)
      {

        // Get the current arrival date.
        var startYear = parseInt (document.getElementById('checkInYear').options[document.getElementById('checkInYear').selectedIndex].value, 10);
        var startMonth = parseInt (document.getElementById('checkInMonth').options[document.getElementById('checkInMonth').selectedIndex].value, 10);
        var startDay = parseInt (document.getElementById('checkInDay').options[document.getElementById('checkInDay').selectedIndex].value, 10);

        var startDate = new Date (startYear, startMonth - 1, startDay);

        // Get the current departure date.
        var endYear = parseInt (document.getElementById('DATERANGEEND_YEAR').options[document.getElementById('DATERANGEEND_YEAR').selectedIndex].value, 10);
        var endMonth = parseInt (document.getElementById('DATERANGEEND_MONTH').options[document.getElementById('DATERANGEEND_MONTH').selectedIndex].value, 10);
        var endDay = parseInt (document.getElementById('DATERANGEEND_DAY').options[document.getElementById('DATERANGEEND_DAY').selectedIndex].value, 10);

        var endDate = new Date (endYear, endMonth - 1, endDay);

        // If the arrival date is greater than the departure date then update the departure date.
        if (startDate.getTime () >= endDate.getTime ())
        {
          endDay = startDay + 1;
          endMonth = startMonth;
          endYear = startYear;

          if (endDay > getDaysInMonth (startMonth, startYear))
          {
            // Move to the first day of the next month.
            endDay = 1;
            endMonth = endMonth + 1

            // If endMonth is > 12, cycle into the next year.
            if (endMonth > 12)
            {
              endMonth = 1;
              endYear = startYear + 1;
            }
          }

          // Update departure year.
          for (index = 0; (index < document.getElementById('DATERANGEEND_YEAR').length) &&
                          (document.getElementById('DATERANGEEND_YEAR').options[index].value != endYear);
               index++);
          document.getElementById('DATERANGEEND_YEAR').options[index].selected = true;

          // Update departure month.
          for (index = 0; (index < document.getElementById('DATERANGEEND_MONTH').length) &&
                          (document.getElementById('DATERANGEEND_MONTH').options[index].value != endMonth);
               index++);
          document.getElementById('DATERANGEEND_MONTH').options[index].selected = true;

          // Update departure day.
          for (index = 0; (index < document.getElementById('DATERANGEEND_DAY').length) &&
                          (document.getElementById('DATERANGEEND_DAY').options[index].value != endDay);
               index++);
          document.getElementById('DATERANGEEND_DAY').options[index].selected = true;

          updateDOW (formStr, 'DATERANGEEND_YEAR', 'DATERANGEEND_MONTH', 'DATERANGEEND_DAY', 'DATERANGEEND_DOW', language, locale);
        }
      }

      //************************************************************************
      // Function:  checkForm
      // Purpose:   Check if the departure date is prior to the arrival date before submitting.
      // Input:     language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    None
      //************************************************************************

      function checkForm(formStr)
      {

        exit=false;

        // Get the current arrival date.
        var startYear = parseInt (document.getElementById('checkInYear').options[document.getElementById('checkInYear').selectedIndex].value, 10);
        var startMonth = parseInt (document.getElementById('checkInMonth').options[document.getElementById('checkInMonth').selectedIndex].value, 10);
        var startDay = parseInt (document.getElementById('checkInDay').options[document.getElementById('checkInDay').selectedIndex].value, 10);

        var startDate = new Date (startYear, startMonth - 1, startDay);

        // Get the current departure date.
        var endYear = parseInt (document.getElementById('DATERANGEEND_YEAR').options[document.getElementById('DATERANGEEND_YEAR').selectedIndex].value, 10);
        var endMonth = parseInt (document.getElementById('DATERANGEEND_MONTH').options[document.getElementById('DATERANGEEND_MONTH').selectedIndex].value, 10);
        var endDay = parseInt (document.getElementById('DATERANGEEND_DAY').options[document.getElementById('DATERANGEEND_DAY').selectedIndex].value, 10);

        var endDate = new Date (endYear, endMonth - 1, endDay);

        // If the arrival date is greater than the departure date then update the departure date.
        if (startDate.getTime () >= endDate.getTime ())
        {
            alert("Arrival date must be prior to the departure date!");
        }
        else
        {
            eval("document.getElementById('" + formStr +"').submit();");
        }
      }

      var exit=true;

      function leave(sURL) {
        ihit = 420;
        iwid = 500;
        ttl = (screen.availHeight/2)-(ihit/2);
        lll = (screen.availWidth/2)-(iwid/2);
        if (exit) {
          open(sURL,'Spoiler','toolbar=1,scrollbars=1,resizable=1,width=' + iwid + ',height=' + ihit + ',top=' + ttl + ',left=' + lll);
        }
      }

var monthName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	

	
//popupcalendarfunctions.js
// $RCSfile: popupcalendarfunctions.js,v $ $Revision: 1.2 $
         //************************************************************************
         // Global variables
         //************************************************************************

         var calendarWindow;

         //************************************************************************
      // Function:  getCalendarCtrlString
      // Purpose:   Return the appropriate localized calendar control string.
      //            (eg: prev, cancel, next).
      // Input:     stringID - Control string to return.
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    String containing the Calendar Control string.
         //************************************************************************

         var CALCTRLSTR_NEXT = 0;
         var CALCTRLSTR_PREV = 1;
         var CALCTRLSTR_CNCL = 2;

         function getCalendarCtrlString (stringID, language, locale)
         {
//          var enCalendarCtrlStrings = new Array ("Next", "Prev", "Close");
//          var esCalendarCtrlStrings = new Array ("Despu&#233s", "Anterior", "Cancelan");

            return (calendarCtrlStrings [stringID]);
         }

      //************************************************************************
      // Function:  parseYear
      // Purpose:   Find the index of the year in a HTML SELECT control.
      // Input:     year - year to locate in the control.
      //            inY - the control to search.
      // Output:    Index into the SELECT control.
         //************************************************************************

         function parseYear(year, yearCtrlStr)
         {
            var retval=0;
            var i=0;
            var formyear=0;
            for (i=0; i<=5; i++)
            {
               eval ("formyear = document.getElementById('" + yearCtrlStr + "').options[" + i + "].text;");
               if (year == formyear)
               {
                  retval=i;
                  break;
               }
         }
            return retval;
         }

         //************************************************************************
      // Function:  nextMonth
      // Purpose:   Increment the month.
      // Input:     month
      // Output:    month + 1
         //************************************************************************

         function nextMonth (month)
         {
            if (month==12)
            {
               return 1;
            }
            else
            {
               return (month+1);
            }
         }

         //************************************************************************
      // Function:  prevMonth
      // Purpose:   Previous month.
      // Input:     month
      // Output:    month - 1
         //************************************************************************

         function prevMonth (month)
         {
            var prevMonth = (month - 1)
            if (month==1)
            {
               prevMonth = 12;
            }
            return prevMonth
         }

         //************************************************************************
      // Function:  changeYear
      // Purpose:   Updates the year if incrementing or decrementing into the
      //            previous or following year.
      // Input:     direction - incrementing or decrementing
      //            month - month that is being updated.
      //            year - current year value.
      // Output:    Updated year.
         //************************************************************************

         function changeYear (direction, month, year)
         {
            // increments or decrements month when it goes past Jan or Dec
            var theYear = year
            if (direction=='next')
            {
               if (month == 12)
               {
                  theYear = (year + 1)
               }
            }
            if (direction=='prev')
            {
               if (month == 1)
               {
                  theYear = (year - 1)
               }
            }
            return theYear
         }

         //************************************************************************
      // Function:  createCalendar
      // Purpose:   Create the calendar popup.
      // Input:     formStr - HTML name of the form that contains the date controls.
      //            dayCtrlStr - HTML name of the day drop down.
      //            monthCtrlStr - HTML name of the month drop down.
      //            yearCtrlStr - HTML name of the year drop down.
      //            dowCtrlStr - HTML name of the day of week control.
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      //            callBackFn - JavaScript function to call when closing the calendar.
      // Output:    none
         //************************************************************************

         function createCalendar (formStr, dayCtrlStr, monthCtrlStr, yearCtrlStr, dowCtrlStr, language, locale, callBackFn)
         {
            calendarWindow = window.open ('', 'Calendar', 'width=220,height=200,top=400,left=225,resizable=no,scrollbars=no');
			
            var mthVal = eval ("parseInt(document.getElementById('" + monthCtrlStr + "').options [document.getElementById('" + monthCtrlStr + "').selectedIndex].value, 10)");
            var yearVal = eval ("document.getElementById('" + yearCtrlStr + "').options [document.getElementById('" + yearCtrlStr + "').selectedIndex].value");
            generateCalendar (calendarWindow, mthVal, yearVal, formStr, dayCtrlStr, monthCtrlStr, yearCtrlStr, dowCtrlStr, language, locale, callBackFn)
         }


         //************************************************************************
      // Function:  generateCalendar
      // Purpose:   Emit the HTML into the calendar popup window.
      // Input:     target - Target browser window for the calendar.
      //            month - Month of the calendar top create.
      //            year - Year of the calendar to create.
      //            formStr - HTML name of the form that contains the date controls.
      //            dayCtrlStr - HTML name of the day drop down.
      //            monthCtrlStr - HTML name of the month drop down.
      //            yearCtrlStr - HTML name of the year drop down.
      //            dowCtrlStr - HTML name of the day of week control.
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      //            callBackFn - JavaScript function to call when closing the calendar.
      // Output:    none
         //************************************************************************

         function generateCalendar(target, month, year, formStr, dayCtrlStr, monthCtrlStr, yearCtrlStr, dowCtrlStr, language, locale, callBackFn)
         {
            target.document.open()
            calendar = "<html><head><title>Calendar II</title>"
			calendar +="<STYLE><!-- \n"
            calendar +="body { font-family: Verdana, Arial, Helvetica, sans; font-size: 10px; color: #828282; font-weight: normal; }\n"
            calendar +=".monthtitle { font-weight: bold; FONT-FAMILY: verdana , arial, sans-serif; COLOR: #003586; FONT-SIZE: 10pt; line-height:11pt; BACKGROUND-COLOR: #dcd7cb } \n"
            calendar +=".wedaytitle { font-family: Verdana,Arial,Helvetica; font-size: 10px; color: black; } \n"
            calendar +=".daytitle { font-family: Verdana,Arial,Helvetica; font-size: 10px; color: #828282; } \n"
            calendar +=".day  { font-family: Verdana,Arial,Helvetica; font-size: 10px; color: #828282; } \n"
            calendar +=".nxtprev { font-family: Verdana,Arial,Helvetica; font-size: 10px; color: #828282; } \n"
            calendar +="A:link { font-size: 10px; color:#8C8C8C} A:visited {font-size: 10px; color:#8C8C8C} A:hover {font-size: 10px; color:#003300} \n"
            calendar +="--></STYLE>\n"
            calendar +="</head><body>\n"
            calendar +=" <table border=0 cellspacing=0 cellpadding=2 width=200>"
            calendar +="<tr valign=top>"
            var mthIdx = month;
            var endday = getDaysInMonth(mthIdx, year)
            var index = (mthIdx-1)
            var goPrevMonth = prevMonth(mthIdx)
            var goNextMonth = nextMonth(mthIdx)
            var nextYear = changeYear ('next', parseInt (month, 10), parseInt (year, 10))
            var prevYear = changeYear ('prev', parseInt (month, 10), parseInt (year, 10))
        // Create the calendar header
              calendar +=" <td colspan=1 align=left class=\"monthtitle\">"
              calendar +=" <a href='javascript:opener.generateCalendar(self," + goPrevMonth + "," + prevYear + ",\"" + formStr + "\",\"" + dayCtrlStr + "\",\"" + monthCtrlStr + "\",\"" + yearCtrlStr + "\",\""
             calendar +=  dowCtrlStr + "\", \"" + language + "\",\" " + locale + "\",\" " + callBackFn + "\")'><u>&lt;</u></a>"
            calendar +=" </td>"
            calendar +=" <td colspan=5 align=center class=\"monthtitle\">"
            calendar +=  getMonth (mthIdx) + " " + year
            calendar +=" </td>"
            calendar +=" <td colspan=1 align=right class=\"monthtitle\">"
            calendar +="<a href='javascript:opener.generateCalendar(self," + goNextMonth + "," + nextYear + ",\"" + formStr + "\",\"" + dayCtrlStr + "\",\"" + monthCtrlStr + "\",\"" + yearCtrlStr + "\",\""
            calendar +=  dowCtrlStr  + "\", \"" + language + "\",\" " + locale + "\",\" " + callBackFn + "\")'><u>&gt;</u></a></td></tr>"
            calendar +=" </tr><tr align=center>"
            calendar +=" <td width=10 class=\"wedaytitle\">&nbsp;S</td>"
            calendar +=" <td width=10 class=\"daytitle\">&nbsp;M</td>"
            calendar +=" <td width=10 class=\"daytitle\">&nbsp;T</td>"
            calendar +=" <td width=10 class=\"daytitle\">&nbsp;W</td>"
            calendar +=" <td width=10 class=\"daytitle\">&nbsp;T</td>"
            calendar +=" <td width=10 class=\"daytitle\">&nbsp;F</td>"
            calendar +=" <td width=10 class=\"wedaytitle\">&nbsp;S</td>"
            calendar +=" </tr>"

        // Create the days.
            wholeDate = month + "/01/" + year
            thedate = new Date(wholeDate)
            firstDay = thedate.getDay()
            selectedmonth = mthIdx;
            var today = new Date();
            var thisyear = today.getYear() + 1900;
            selectedyear = year
            var lastDay = (endday + firstDay+1)
            var iRows =0
            calendar +=" <tr>"
            for (var i = 1; i < lastDay; i++)
            {
               if (i <= firstDay)
               {
                  calendar +=" <td>&nbsp;</td>"
               }
               else
               {
                  calendar +=" <td align=center><a href='JavaScript:opener.closeCalendar(" + (i-firstDay) + ", \"" + formStr + "\", \"" + dayCtrlStr + "\", \"" + monthCtrlStr + "\",\"" + yearCtrlStr + "\",\"" + dowCtrlStr
                  calendar += "\", \"" +  language + "\", \"" + locale + "\",\"" + callBackFn + "\");self.close();'>"+(i-firstDay)+"</a></td>"
               }
               if (i % 7 == 0 )
               {
                  if (i != lastDay-1)
                  {
                     calendar +=" </tr><tr>"
                     iRows = iRows + 1
                  }
                  else
                  {
                     iRows = iRows
                  }
               }
            }
            calendar +=" </tr>"

        // Create the calendar footer
            iRows = iRows + 1
            calendar +=" <tr><td colspan=7 align=center width=200><hr noshade></td></tr>"
            for (var icounter = 1; icounter <= 6-iRows; icounter++)
            {
               //calendar +=" <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>"
            }

            calendar +=" <td align=center colspan=7 class=\"monthtitle\"><a href='javascript:self.close()'>" + getCalendarCtrlString (CALCTRLSTR_CNCL, language, locale) + "</a></td>"
            calendar +=" </tr></table></body></html>"

            target.document.write(calendar);
            target.document.close();
         }

         //************************************************************************
      // Function:  closeCalendar
      // Purpose:   Close the calendar and update the parent forms date controls.
      // Input:     day - selected day.
      //            formStr - HTML name of the form that contains the date controls.
      //            dayCtrlStr - HTML name of the day drop down.
      //            monthCtrlStr - HTML name of the month drop down.
      //            yearCtrlStr - HTML name of the year drop down.
      //            dowCtrlStr - HTML name of the day of week control.
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      //            callBackFn - JavaScript function to call when closing the calendar.
      // Output:    none
         //************************************************************************

         function closeCalendar (day, formStr, dayCtrlStr, monthCtrlStr, yearCtrlStr, dowCtrlStr, language, locale, callBackFn)
         {
        // Update the controls.
            var yrIdx = parseYear (selectedyear, yearCtrlStr);
            eval ("document.getElementById('" + dayCtrlStr + "').selectedIndex = " + parseInt(day-1, 10));
            eval ("document.getElementById('" + monthCtrlStr + "').selectedIndex = "  + selectedmonth + "-1");
            eval ("document.getElementById('" + yearCtrlStr + "').selectedIndex = " + yrIdx);

            eval ("document.getElementById('" + dowCtrlStr + "').value = '"
                           + getDayOfWeek (buildCRSDate (selectedyear,
                                                         selectedmonth,
                                                         day)) + "'");
														 
		if(dayCtrlStr != "departureDay")
		{
			var strDate = new Date();
			var strCurrentDate = new Date(selectedmonth+"/"+day+"/"+selectedyear);
			var futuredate=new Date(parseInt(strCurrentDate.getMonth()+1,10) + "/" + (strCurrentDate.getDate()+2) + "/" + strCurrentDate.getFullYear());
			window.document.quicksearch.departureMonth.value=futuredate.getMonth()+1;
			window.document.quicksearch.departureDay.value=futuredate.getDate();
			window.document.quicksearch.departureYear.value=futuredate.getFullYear();		
		}									 
        // Call the callback function.
        eval (callBackFn);
         }


		 
//datefunctions.js
// $RCSfile: datefunctions.js,v $ $Revision: 1.2 $
      //************************************************************************
      // Function:  getFullYear
      // Purpose:   Get the four digit year given a two digit year.
      // Input:     date - date to get the four digit year for.
      // Output:    Four digit year.
      //
      // Function required because NE 3.01 does not support date.getFullYear.
      // Code copied from O'Reilly - JavaScript The Definitive Guide
      //************************************************************************

      function getFullYear (date)
      {
        var year = date.getYear ();
        if (year < 1000) year += 1900;
        return (year);
      }

      //************************************************************************
      // Function:  getDayOfWeek
      // Purpose:   Get the day of the week for a given date.
      // Input:     date - date to get the four digit year for.
      // Output:    String containing the Day of the Week (Monday, Tuesday, etc).
      //************************************************************************

      function getDayOfWeek (crsDate)
      {
        var myDate = new Date (crsDate.substring (0, 4), parseInt(crsDate.substring (4, 6), 10) - 1,  parseInt(crsDate.substring (6, 8), 10));
        return (dayName [myDate.getDay ()]);
      }

      //************************************************************************
      // Function:  getDayOfWeek
      // Purpose:   Get the day of the week for a given date.
      // Input:     year, month, day
      // Output:    String containing the Day of the Week (Monday, Tuesday, etc).
      //************************************************************************

      function getDayOfWeek2 (year, month, day)
      {
        var myDate = new Date (year, parseInt(month, 10) - 1,  parseInt(day, 10));
        return (dayName [myDate.getDay ()]);
      }

      //************************************************************************
      // Function:  getMonth
      // Purpose:   Get the month description for a given date.
      // Input:     month - month to get the description for.
      // Output:    String containing the month (January, February, etc).
      //************************************************************************

      function getMonth (month)
      {
        return (monthName [month - 1]);
      }

      //************************************************************************
      // Function:  formatDateDisplay
      // Purpose:   Format a date in the form of January 1, 1999 Tuesday
      // Input:     crsDate - date to format
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    String containing the formatted date.
      //************************************************************************

      function formatDisplayDate (crsDate, language, locale)
      {
        var monthStr = getMonth (parseInt (crsDate.substring (4, 6), 10));
        return (monthStr  + " " + crsDate.substring (6, 8) + ", " + crsDate.substring (0, 4)
                  + " " + getDayOfWeek (crsDate));
      }

      //************************************************************************
      // Function:  formatDateDisplay
      // Purpose:   Format a date in the form of January 1, 1999 Tuesday
      // Input:     year
      //            month
      //            day
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    String containing the formatted date.
      //************************************************************************

      function formatDisplayDate2 (year, month, day, language, locale)
      {
        var monthStr = getMonth (parseInt (month, 10));
        return (monthStr  + " " + day + ", " + year
                  + " " + getDayOfWeek2 (year, month, day));
      }

      //************************************************************************
      // Function:  formatDateDisplayShort
      // Purpose:   Format a date in the form of January 1
      // Input:     crsDate - date to format
      //            language - language used by the WEB page.
      //            locale - locale used by the WEB page.
      // Output:    String containing the formatted date.
      //************************************************************************

      function formatDisplayDateShort (crsDate, language, locale)
      {
        monthStr = getMonth (parseInt (crsDate.substring (4, 6), 10));
        return (monthStr  + " " + crsDate.substring (6, 8));
      }

      //************************************************************************
      // Function:  buildCRSDate
      // Purpose:   Format a date in the form YYYYMMDD
      // Input:     year
      //            month
      //            day
      // Output:    String containing the formatted date.
      //************************************************************************

      function buildCRSDate (year, month, day)
      {
        if (day < 10)
        {
          dayString = "0" + day;
        }
        else
        {
          dayString = new String (day);
        }

        if (month < 10)
        {
          monthString = "0" + month;
        }
        else
        {
          monthString = new String(month);
        }

        return (year + monthString + dayString);
      }
      //************************************************************************
      // Function:  isLeapYear
      // Purpose:   Determine if a year is a leap year.
      // Input:     yrStr - year to determine leapness..
      // Output:    true - if the year is a leap year.
      //            false - otherwise.
      //************************************************************************

      function isLeapYear(yrStr)
      {
        var leapYear=false;
        // every fourth year is a leap year
        if ((parseInt(yrStr, 10)%4) == 0)
        {
          leapYear=true;
        }
        return leapYear;
      }

      //************************************************************************
      // Function:  getDaysInMonth
      // Purpose:   Determine the number of days in a month.
      // Input:     mthIdx - month
      //            yrStr - year
      // Output:    true - if the year is a leap year.
      //            false - otherwise.
      //************************************************************************

      function getDaysInMonth(mthIdx, YrStr)
      {
        // all the rest have 31
        var maxDays = 31
        // expect Feb. (of course)
        if (mthIdx==2)
        {
          if (isLeapYear(YrStr))
          {
            maxDays=29;
          }
          else
          {
            maxDays=28;
          }
        }
        // thirty days hath...
        if (mthIdx==4 || mthIdx==6 || mthIdx==9 || mthIdx==11)
        {
          maxDays=30;
        }
        return maxDays;
      }

var calendarCtrlStrings = new Array ("","","Close");
// WebTrends SmartSource Data Collector Tag
// Version: 8.5.0     
// Tag Builder Version: 2.0.0
// Created: 7/30/2008 12:19:29 AM

// *******************************************************
// Tag for Hilton property site Hilton Los Cabos
// *******************************************************
// David Sinner 10/3/2008
// This tag was modifed for Hilton to remain compatible with existing functionality.
// 
// 
// The following functions were added to the base tag and are identified with 
// //--WebTrends tag extension-->
// Added dcsCleanUp function and call to prevent resending parameters after dcsMultitrack call
//
// Updated functions dcsEvt and dcsDownload to prevent errors on certain javascript controls (e.g. calendar)
//
// Updated function dcsDynamic to check for certain javascript controls and exclude them
// 
// Added reftemp logic to limit size of referrer field to 500 prevent tag overflow
//
// Added function dcsCQP to automatically add WT.mc_ev=click whenver WT.mc_id is present. For Warehouse compatibility
// **************************************************************************************************************



function WebTrends(){
	var that=this;
	// begin: user modifiable
	this.dcsid="dcs9f2svsuz5bdrnbc7b7nmyt_2m2e";
	this.domain="statse.webtrendslive.com";
	this.timezone=-8;
	this.fpcdom="";
	this.onsitedoms=(function(){return(window.RegExp?new RegExp("javascript|.*hiltonloscabos\.com","i"):"");})();
	// original this.downloadtypes="xls,doc,pdf,txt,csv,zip";
	this.downloadtypes="xls,doc,pdf,txt,csv,zip,vcs,flv,swf,mov,avi,mpeg,exe,wmv,mp3,dmb,mjp,movie,qt,3gp,asf,asx,mp4,mpg,rm,ipx,mvr,jpg,gif,jpeg";
	this.rightclicktypes="xls,doc,pdf,txt,csv,zip,vcs,flv,swf,mov,avi,mpeg,exe,wmv,mp3,dmb,mjp,movie,qt,3gp,asf,asx,mp4,mpg,rm,ipx,mvr,jpg,gif,jpeg";
	this.adclickparam="WT.ac";
	this.trackevents=true;
	this.evi={cookie:"accountNo",qp:"WT.dcsvid",crumb:"",sep:""};
	this.enabled=true;
	this.i18n=false;
	this.fpc="WT_FPC";
	// end: user modifiable
	this.DCS={};
	this.WT={};
	this.DCSext={};
	this.images=[];
	this.index=0;
	this.qp=[];
	this.exre=(function(){return(window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):"");})();
	this.re=(function(){return(window.RegExp?(that.i18n?{"%25":/\%/g}:{"%09":/\t/g,"%20":/ /g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/g,"%7F":/\x7F/g,"%A0":/\xA0/g}):"");})();
}
WebTrends.prototype.dcsGetId=function(){
	if (this.enabled&&(document.cookie.indexOf(this.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){
		document.write("<scr"+"ipt type='text/javascript' src='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+this.domain+"/"+this.dcsid+"/wtid.js"+"'><\/scr"+"ipt>");
	}
}
WebTrends.prototype.dcsGetCookie=function(name){
	var cookies=document.cookie.split("; ");
	var cmatch=[];
	var idx=0;
	var i=0;
	var namelen=name.length;
	var clen=cookies.length;
	for (i=0;i<clen;i++){
		var c=cookies[i];
		if ((c.substring(0,namelen+1))==(name+"=")){
			cmatch[idx++]=c;
		}
	}
	var cmatchCount=cmatch.length;
	if (cmatchCount>0){
		idx=0;
		if ((cmatchCount>1)&&(name==this.fpc)){
			var dLatest=new Date(0);
			for (i=0;i<cmatchCount;i++){
				var lv=parseInt(this.dcsGetCrumb(cmatch[i],"lv"));
				var dLst=new Date(lv);
				if (dLst>dLatest){
					dLatest.setTime(dLst.getTime());
					idx=i;
				}
			}
		}
		return unescape(cmatch[idx].substring(namelen+1));
	}
	else{
		return null;
	}
}
WebTrends.prototype.dcsGetCrumb=function(cval,crumb,sep){
	var aCookie=cval.split(sep||":");
	for (var i=0;i<aCookie.length;i++){
		var aCrumb=aCookie[i].split("=");
		if (crumb==aCrumb[0]){
			return aCrumb[1];
		}
	}
	return null;
}
WebTrends.prototype.dcsGetIdCrumb=function(cval,crumb){
	var id=cval.substring(0,cval.indexOf(":lv="));
	var aCrumb=id.split("=");
	for (var i=0;i<aCrumb.length;i++){
		if (crumb==aCrumb[0]){
			return aCrumb[1];
		}
	}
	return null;
}
WebTrends.prototype.dcsIsFpcSet=function(name,id,lv,ss){
	var c=this.dcsGetCookie(name);
	if (c){
		return ((id==this.dcsGetIdCrumb(c,"id"))&&(lv==this.dcsGetCrumb(c,"lv"))&&(ss==this.dcsGetCrumb(c,"ss")))?0:3;
	}
	return 2;
}
WebTrends.prototype.dcsFPC=function(){
	if (document.cookie.indexOf("WTLOPTOUT=")!=-1){
		return;
	}
	var WT=this.WT;
	var name=this.fpc;
	var dCur=new Date();
	var adj=(dCur.getTimezoneOffset()*60000)+(this.timezone*3600000);
	dCur.setTime(dCur.getTime()+adj);
	var dExp=new Date(dCur.getTime()+315360000000);
	var dSes=new Date(dCur.getTime());
	WT.co_f=WT.vt_sid=WT.vt_f=WT.vt_f_a=WT.vt_f_s=WT.vt_f_d=WT.vt_f_tlh=WT.vt_f_tlv="";
	if (document.cookie.indexOf(name+"=")==-1){
		if ((typeof(gWtId)!="undefined")&&(gWtId!="")){
			WT.co_f=gWtId;
		}
		else if ((typeof(gTempWtId)!="undefined")&&(gTempWtId!="")){
			WT.co_f=gTempWtId;
			WT.vt_f="1";
		}
		else{
			WT.co_f="2";
			var curt=dCur.getTime().toString();
			for (var i=2;i<=(32-curt.length);i++){
				WT.co_f+=Math.floor(Math.random()*16.0).toString(16);
			}
			WT.co_f+=curt;
			WT.vt_f="1";
		}
		if (typeof(gWtAccountRollup)=="undefined"){
			WT.vt_f_a="1";
		}
		WT.vt_f_s=WT.vt_f_d="1";
		WT.vt_f_tlh=WT.vt_f_tlv="0";
	}
	else{
		var c=this.dcsGetCookie(name);
		var id=this.dcsGetIdCrumb(c,"id");
		var lv=parseInt(this.dcsGetCrumb(c,"lv"));
		var ss=parseInt(this.dcsGetCrumb(c,"ss"));
		if ((id==null)||(id=="null")||isNaN(lv)||isNaN(ss)){
			return;
		}
		WT.co_f=id;
		var dLst=new Date(lv);
		WT.vt_f_tlh=Math.floor((dLst.getTime()-adj)/1000);
		dSes.setTime(ss);
		if ((dCur.getTime()>(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){
			WT.vt_f_tlv=Math.floor((dSes.getTime()-adj)/1000);
			dSes.setTime(dCur.getTime());
			WT.vt_f_s="1";
		}
		if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){
			WT.vt_f_d="1";
		}
	}
	WT.co_f=escape(WT.co_f);
	WT.vt_sid=WT.co_f+"."+(dSes.getTime()-adj);
	var expiry="; expires="+dExp.toGMTString();
	var cur=dCur.getTime().toString();
	var ses=dSes.getTime().toString();
	document.cookie=name+"="+"id="+WT.co_f+":lv="+cur+":ss="+ses+expiry+"; path=/"+(((this.fpcdom!=""))?("; domain="+this.fpcdom):(""));
	var rc=this.dcsIsFpcSet(name,WT.co_f,cur,ses);
	if (rc!=0){
		WT.co_f=WT.vt_sid=WT.vt_f_s=WT.vt_f_d=WT.vt_f_tlh=WT.vt_f_tlv="";
		WT.vt_f=WT.vt_f_a=rc;
    }
}
// Code section for Generate an Ad View query parameter for every Ad Click link.
WebTrends.prototype.dcsAdSearch=function(){
	if (document.links){
		var param=this.adclickparam+"=";
		var paramlen=param.length;
		var paramre=new RegExp(param,"i");
		var len=document.links.length;
		for (var i=0;i<len;i++){
		    if (document.links[i].href){
			    var anch=document.links[i].href+"";
			    var pos=anch.search(paramre);
			    if (pos!=-1){
				    var start=pos+paramlen;
				    var end=anch.indexOf("&",start);
				    var value=anch.substring(start,(end!=-1)?end:anch.length);
				    this.WT.ad=this.WT.ad?(this.WT.ad+";"+value):value;
			    }
			}
		}
	}
}
// Code section for Assign your query parameters to WebTrends query parameters. You will also need to configure the tag to recognize your query parameters.
WebTrends.prototype.dcsQP=function(N){
	if (typeof(N)=="undefined"){
		return "";
	}
	var qry=location.search.substring(1);
	if (qry!=""){
		var pairs=qry.split("&");
		for (var i=0;i<pairs.length;i++){
			var pos=pairs[i].indexOf("=");
			if (pos!=-1){
				if (pairs[i].substring(0,pos)==N){
					this.qp[this.qp.length]=(i==0?"":"&")+pairs[i];
					return pairs[i].substring(pos+1);
				}
			}
		}
	}
	return "";
}
WebTrends.prototype.dcsIsOnsite=function(host){
	if (host.length>0){
	    host=host.toLowerCase();
	    if (host==window.location.hostname.toLowerCase()){
		    return true;
	    }
	    if (typeof(this.onsitedoms.test)=="function"){
		    return this.onsitedoms.test(host);
	    }
	    else if (this.onsitedoms.length>0){
		    var doms=this.dcsSplit(this.onsitedoms);
		    var len=doms.length;
		    for (var i=0;i<len;i++){
			    if (host==doms[i]){
			        return true;
			    }
		    }
	    }
	}
	return false;
}
WebTrends.prototype.dcsTypeMatch=function(pth, typelist){
	var type=pth.substring(pth.lastIndexOf(".")+1,pth.length);
	var types=this.dcsSplit(typelist);
	var tlen=types.length;	
	for (var i=0;i<tlen;i++){
		if (type==types[i]){
			return true;
		}
	}
	return false;
}
//--WebTrends tag extension-modifed from tag builder->

WebTrends.prototype.dcsEvt=function(evt,tag){
    var e=evt.target||evt.srcElement;
    if(!e || e.tagName == "")
    {
        return false;
    }
    while (e.tagName&&(e.tagName!=tag)){
        e=e.parentElement||e.parentNode;
        if(!e || e.tagName == "")
        {
            return false;
        }
    }    
    return e;
}
//-end--WebTrends tag extension-->

WebTrends.prototype.dcsNavigation=function(evt){
	return "";
}
WebTrends.prototype.dcsBind=function(event,func){
	if ((typeof(func)=="function")&&document.body){
		if (document.body.addEventListener){
			document.body.addEventListener(event, func.wtbind(this), true);
		}
		else if(document.body.attachEvent){
			document.body.attachEvent("on"+event, func.wtbind(this));
		}
	}
}
WebTrends.prototype.dcsET=function(){
	var e=(navigator.appVersion.indexOf("MSIE")!=-1)?"click":"mousedown";
	this.dcsBind(e,this.dcsDownload);
//	this.dcsBind(e,this.dcsDynamic);
	this.dcsBind(e,this.dcsFormButton);
	this.dcsBind(e,this.dcsOffsite);
	this.dcsBind("contextmenu",this.dcsRightClick);
	this.dcsBind(e,this.dcsImageMap);
}
WebTrends.prototype.dcsMultiTrack=function(){
	var args=dcsMultiTrack.arguments?dcsMultiTrack.arguments:arguments;
	if (args.length%2==0){
		for (var i=0;i<args.length;i+=2){
			if (args[i].indexOf('WT.')==0){
				this.WT[args[i].substring(3)]=args[i+1];
			}
			else if (args[i].indexOf('DCS.')==0){
				this.DCS[args[i].substring(4)]=args[i+1];
			}
			else if (args[i].indexOf('DCSext.')==0){
				this.DCSext[args[i].substring(7)]=args[i+1];
			}
		}
		var dCurrent=new Date();
		this.DCS.dcsdat=dCurrent.getTime();
		this.dcsFunc(this.dcsFPC());
		this.dcsTag();
	}
}
WebTrends.prototype.dcsSplit=function(list){
	var items=list.toLowerCase().split(",");
	var len=items.length;
	for (var i=0;i<len;i++){
		items[i]=items[i].replace(/^\s*/,"").replace(/\s*$/,"");
	}
	return items;
}
// Code section for Track clicks to download links.
//--WebTrends tag extension-modifed from tag builder->

WebTrends.prototype.dcsDownload=function(evt){
  	evt=evt||(window.event||"");
  	if (evt&&((typeof(evt.which)!="number")||(evt.which==1))){
  		var e=this.dcsEvt(evt,"A");
          if (e.href) {
              if (e.hostname&&this.dcsIsOnsite(e.hostname)){
                  if (this.dcsTypeMatch(e.pathname,this.downloadtypes)){
                      var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):"";
                      var pth=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/";
                      var ttl="";
                      var text=document.all?e.innerText:e.text;
                      var img=this.dcsEvt(evt,"IMG");
                      if (img.alt){
                          ttl=img.alt;
                      }
                      else if (text){
                          ttl=text;
                      }
                      else if (e.innerHTML){
                          ttl=e.innerHTML;
                      }
                      this.dcsMultiTrack("DCS.dcssip",e.hostname,"DCS.dcsuri",pth,"DCS.dcsqry",e.search||"","WT.ti","Download:"+ttl,"WT.dl","20","WT.nv",this.dcsNavigation(evt));
                      this.DCS.dcssip=this.DCS.dcsuri=this.DCS.dcsqry=this.WT.ti=this.WT.dl=this.WT.nv="";
                  }
              }
          }
  	}
}
//-end -WebTrends tag extension-->

// Code section for Track right clicks to download links.
WebTrends.prototype.dcsRightClick=function(evt){
	evt=evt||(window.event||"");
	if (evt){
		var btn=evt.which||evt.button;
		if ((btn!=1)||(navigator.userAgent.indexOf("Safari")!=-1)){
			var e=this.dcsEvt(evt,"A");
			if ((typeof(e.href)!="undefined")&&e.href){
				if ((typeof(e.protocol)!="undefined")&&e.protocol&&(e.protocol.indexOf("http")!=-1)){
					if ((typeof(e.pathname)!="undefined")&&this.dcsTypeMatch(e.pathname,this.rightclicktypes)){
						var pth=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/";
						var hn=e.hostname?(e.hostname.split(":")[0]):"";
						this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry","","WT.ti","RightClick:"+pth,"WT.dl","25");
						this.DCS.dcssip=this.DCS.dcsuri=this.WT.ti=this.WT.dl=this.WT.nv="";
					}
				}
			}
		}
	}
}
// Code section for Track clicks to dynamic links.
//--WebTrends tag extension-modifed from tag builder->

WebTrends.prototype.dcsDynamic=function(evt){
	evt=evt||(window.event||"");
	if (evt&&((typeof(evt.which)!="number")||(evt.which==1))){
		var e=this.dcsEvt(evt,"A");
		if (e.href&&e.protocol){
			var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):"";
			var keys=["fn","photo_tour","calendar", "goto", "perform", "zoom", "close"];
			var trackLink = true;
			for (var i=0;i<keys.length;i++){
			   if (e.outerHTML.toLowerCase().indexOf(keys[i].toLowerCase()) != -1)
		              { trackLink = false;
		           }
		        }
			if ((e.protocol=="javascript:") && (trackLink == true)){
				this.dcsMultiTrack("DCS.dcssip","","DCS.dcsuri",e.href,"WT.ti","JavaScript:"+e.innerHTML,"WT.dl","22","WT.nv",this.dcsNavigation(evt));
				this.DCS.dcssip=this.DCS.dcsuri=this.WT.ti=this.WT.cl=this.WT.nv="";
			}
			else if (e.protocol=="mailto:"){
				this.dcsMultiTrack("DCS.dcssip","","DCS.dcsuri",e.href,"WT.ti","MailTo:"+e.innerHTML,"WT.dl","23","WT.nv",this.dcsNavigation(evt));
				this.DCS.dcssip=this.DCS.dcsuri=this.WT.ti=this.WT.dl=this.WT.nv="";
			}
		}
	}
}

//-end -WebTrends tag extension-->

// Code section for Track form button clicks.
WebTrends.prototype.dcsFormButton=function(evt){
	evt=evt||(window.event||"");
	if (evt&&((typeof(evt.which)!="number")||(evt.which==1))){
		var tags=["INPUT","BUTTON"];
		for (var j=0;j<tags.length;j++){
			var e=this.dcsEvt(evt,tags[j]);
			var type=e.type||"";
			if (type&&((type=="submit")||(type=="image")||(type=="button")||(type=="reset"))||((type=="text")&&((evt.which||evt.keyCode)==13))){
				var uri="";
				var ttl="";
				var qry="";
				var id=0;
				if (e.form){
					// begin: field capture
					// end: field capture
					uri=e.form.action||window.location.pathname;
					ttl=e.form.id||e.form.name||e.form.className||"Unknown";
					id=(e.form.method&&(e.form.method.toLowerCase()=="post"))?"27":"26";
				}
				else{
					uri=window.location.pathname;
					ttl=e.name||e.id||"Unknown";
					id=(tags[j].toLowerCase()=="input")?"28":"29";
				}
				if (uri&&ttl&&(evt.keyCode!=9)){
					this.dcsMultiTrack("DCS.dcsuri",uri,"DCS.dcsqry",qry,"WT.ti","FormButton:"+ttl,"WT.dl",id,"WT.nv",this.dcsNavigation(evt));
				}
				this.DCS.dcsuri=this.DCS.dcsqry=this.WT.ti=this.WT.dl=this.WT.nv="";
				break;
			}
		}
	}
}
// Code section for Track clicks to links leading offsite.
WebTrends.prototype.dcsOffsite=function(evt){
	evt=evt||(window.event||"");
	if (evt&&((typeof(evt.which)!="number")||(evt.which==1))){
		var e=this.dcsEvt(evt,"A");
		if (e.href){
		    var hn=e.hostname?(e.hostname.split(":")[0]):"";
		    var pr=e.protocol||"";
		    if ((hn.length>0)&&(pr.indexOf("http")==0)&&!this.dcsIsOnsite(hn)){
			    var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):"";
			    var pth=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/";
			    var trim=true;
			    this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry",trim?"":qry,"WT.ti","Offsite:"+hn+pth+qry,"WT.dl","24","WT.nv",this.dcsNavigation(evt));
			    this.DCS.dcssip=this.DCS.dcsuri=this.DCS.dcsqry=this.WT.ti=this.WT.dl=this.WT.nv="";
		    }
		}
	}
}
// Code section for Assign cookie to query paraemter.
WebTrends.prototype.dcsEvi=function(){
	var t=this;
	var evi=t.evi;
	var qp=evi.qp;
	var c=t.dcsGetCookie(evi.cookie);
	if (c){
		if ((evi.crumb.length>0)&&(evi.sep.length>0)){
			c=t.dcsGetCrumb(c,evi.crumb,evi.sep);
		}
		if (c){
			if (qp.indexOf("WT.")==0){
				t.WT[qp.substring(3)]=c;
			}
			else if (qp.indexOf("DCS.")==0){
				t.DCS[qp.substring(4)]=c;
			}
			else if (qp.indexOf("DCSext.")==0){
				t.DCSext[qp.substring(7)]=c;
			}
			else{
				t.DCSext[qp]=c;
			}
		}
	}
}
// Code section for clicks to image maps.
WebTrends.prototype.dcsImageMap=function(evt){
	evt=evt||(window.event||"");
	if (evt){
		var e=this.dcsEvt(evt,"AREA");
		if (e.href){
		    var hn=e.hostname?(e.hostname.split(":")[0]):"";
		    if ((hn!="")&&e.protocol&&(e.protocol.indexOf("http")!=-1)){
			    var ttl="";
			    var map=this.dcsEvt(evt,"MAP");
			    if (map){
			        if (map.name){
				        ttl=map.name;
			        }
			        else if (map.id){
				        ttl=map.id;
			        }
			    }
			    var pth=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/";
			    this.dcsMultiTrack("DCS.dcssip",hn,"DCS.dcsuri",pth,"DCS.dcsqry",e.search||"","WT.ti","ImageMap:"+ttl,"WT.dl","30","WT.nv",this.dcsNavigation(evt));
			    this.DCS.dcssip=this.DCS.dcsuri=this.DCS.dcsqry=this.WT.ti=this.WT.dl=this.WT.nv="";
		    }			
		}			
	}
}
WebTrends.prototype.dcsAdv=function(){
	if (this.trackevents&&(typeof(this.dcsET)=="function")){
		if (window.addEventListener){
			window.addEventListener("load",this.dcsET.wtbind(this),false);
		}
		else if (window.attachEvent){
			window.attachEvent("onload",this.dcsET.wtbind(this));
		}
	}
	this.dcsFunc(this.dcsFPC());
	this.dcsFunc(this.dcsAdSearch());
	this.dcsFunc(this.dcsEvi());
}
WebTrends.prototype.dcsVar=function(){
	var dCurrent=new Date();
	var WT=this.WT;
	var DCS=this.DCS;
	WT.tz=parseInt(dCurrent.getTimezoneOffset()/60*-1)||"0";
	WT.bh=dCurrent.getHours()||"0";
	WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;
	if (typeof(screen)=="object"){
		WT.cd=navigator.appName=="Netscape"?screen.pixelDepth:screen.colorDepth;
		WT.sr=screen.width+"x"+screen.height;
	}
	if (typeof(navigator.javaEnabled())=="boolean"){
		WT.jo=navigator.javaEnabled()?"Yes":"No";
	}
	if (document.title){
		if (window.RegExp){
			var tire=new RegExp("^"+window.location.protocol+"//"+window.location.hostname+"\\s-\\s");
			WT.ti=document.title.replace(tire,"");
		}
		else{
			WT.ti=document.title;
		}
	}
	WT.js="Yes";
	WT.jv=(function(){
		var agt=navigator.userAgent.toLowerCase();
		var major=parseInt(navigator.appVersion);
		var mac=(agt.indexOf("mac")!=-1);
		var ff=(agt.indexOf("firefox")!=-1);
		var ff0=(agt.indexOf("firefox/0.")!=-1);
		var ff10=(agt.indexOf("firefox/1.0")!=-1);
		var ff15=(agt.indexOf("firefox/1.5")!=-1);
		var ff20=(agt.indexOf("firefox/2.0")!=-1);
		var ff3up=(ff&&!ff0&&!ff10&!ff15&!ff20);
		var nn=(!ff&&(agt.indexOf("mozilla")!=-1)&&(agt.indexOf("compatible")==-1));
		var nn4=(nn&&(major==4));
		var nn6up=(nn&&(major>=5));
		var ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));
		var ie4=(ie&&(major==4)&&(agt.indexOf("msie 4")!=-1));
		var ie5up=(ie&&!ie4);
		var op=(agt.indexOf("opera")!=-1);
		var op5=(agt.indexOf("opera 5")!=-1||agt.indexOf("opera/5")!=-1);
		var op6=(agt.indexOf("opera 6")!=-1||agt.indexOf("opera/6")!=-1);
		var op7up=(op&&!op5&&!op6);
		var jv="1.1";
		if (ff3up){
			jv="1.8";
		}
		else if (ff20){
			jv="1.7";
		}
		else if (ff15){
			jv="1.6";
		}
		else if (ff0||ff10||nn6up||op7up){
			jv="1.5";
		}
		else if ((mac&&ie5up)||op6){
			jv="1.4";
		}
		else if (ie5up||nn4||op5){
			jv="1.3";
		}
		else if (ie4){
			jv="1.2";
		}
		return jv;
	})();
	WT.ct="unknown";
	if (document.body&&document.body.addBehavior){
		try{
			document.body.addBehavior("#default#clientCaps");
			WT.ct=document.body.connectionType||"unknown";
			document.body.addBehavior("#default#homePage");
			WT.hp=document.body.isHomePage(location.href)?"1":"0";
		}
		catch(e){
		}
	}
	if (document.all){
		WT.bs=document.body?document.body.offsetWidth+"x"+document.body.offsetHeight:"unknown";
	}
	else{
		WT.bs=window.innerWidth+"x"+window.innerHeight;
	}
	WT.fv=(function(){
		var i,flash;
		if (window.ActiveXObject){
			for(i=10;i>0;i--){
				try{
					flash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
					return i+".0";
				}
				catch(e){
				}
			}
		}
		else if (navigator.plugins&&navigator.plugins.length){
			for (i=0;i<navigator.plugins.length;i++){
				if (navigator.plugins[i].name.indexOf('Shockwave Flash')!=-1){
					return navigator.plugins[i].description.split(" ")[2];
				}
			}
		}
		return "Not enabled";
	})();
	WT.slv=(function(){
		var slv="Not enabled";
		try{     
			if (navigator.userAgent.indexOf('MSIE')!=-1){
				var sli = new ActiveXObject('AgControl.AgControl');
				if (sli){
					slv="Unknown";
				}
			}
			else if (navigator.plugins["Silverlight Plug-In"]){
				slv="Unknown";
			}
		}
		catch(e){
		}
		if (slv!="Not enabled"){
			var i,j,v;
			if ((typeof(Silverlight)=="object")&&(typeof(Silverlight.isInstalled)=="function")){
				for (j=9;j>=0;j--){
					for(i=3;i>0;i--){
						v=i+"."+j;
						if (Silverlight.isInstalled(v)){
							slv=v;
							break;
						}
					}
					if (slv==v){
						break;
					}
				}
			}
		}
		return slv;
	})();
	if (this.i18n){
		if (typeof(document.defaultCharset)=="string"){
			WT.le=document.defaultCharset;
		} 
		else if (typeof(document.characterSet)=="string"){
			WT.le=document.characterSet;
		}
		else{
			WT.le="unknown";
		}
	}
	WT.tv="8.5.0";
//	WT.sp="@@SPLITVALUE@@";
	WT.dl="0";
	WT.ssl=(window.location.protocol.indexOf('https:')==0)?"1":"0";
	DCS.dcsdat=dCurrent.getTime();
	DCS.dcssip=window.location.hostname;
	DCS.dcsuri=window.location.pathname;
	WT.es=DCS.dcssip+DCS.dcsuri;
	if (window.location.search){
		DCS.dcsqry=window.location.search;
		if (this.qp.length>0){
			for (var i=0;i<this.qp.length;i++){
				var pos=DCS.dcsqry.indexOf(this.qp[i]);
				if (pos!=-1){
					var front=DCS.dcsqry.substring(0,pos);
					var end=DCS.dcsqry.substring(pos+this.qp[i].length,DCS.dcsqry.length);
					DCS.dcsqry=front+end;
				}
			}
		}
	}
//--WebTrends tag extension-modified to limit to 500 chars to prevent overflow->
	if ((window.document.referrer!="")&&(window.document.referrer!="-")){
		if (!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4)){
	       		var refTemp=this.i18n?this.dcsEscape(window.document.referrer, I18NRE):window.document.referrer;
			DCS.dcsref=(refTemp.length>500)?refTemp.substring(0,500):refTemp;

		}
	}
}
//-end -WebTrends tag extension-->

WebTrends.prototype.dcsEscape=function(S, REL){
	if (REL!=""){
		S=S.toString();
		for (var R in REL){
 			if (REL[R] instanceof RegExp){
				S=S.replace(REL[R],R);
 			}
		}
		return S;
	}
	else{
		return escape(S);
	}
}
WebTrends.prototype.dcsA=function(N,V){
	if (this.i18n&&(this.exre!="")&&!this.exre.test(N)){
		if (N=="dcsqry"){
			var newV="";
			var params=V.substring(1).split("&");
			for (var i=0;i<params.length;i++){
				var pair=params[i];
				var pos=pair.indexOf("=");
				if (pos!=-1){
					var key=pair.substring(0,pos);
					var val=pair.substring(pos+1);
					if (i!=0){
						newV+="&";
					}
					newV+=key+"="+this.dcsEncode(val);
				}
			}
			V=V.substring(0,1)+newV;
		}
		else{
			V=this.dcsEncode(V);
		}
	}
	return "&"+N+"="+this.dcsEscape(V, this.re);
}
WebTrends.prototype.dcsEncode=function(S){
	return (typeof(encodeURIComponent)=="function")?encodeURIComponent(S):escape(S);
}
WebTrends.prototype.dcsCreateImage=function(dcsSrc){
	if (document.images){
		this.images[this.index]=new Image();
		this.images[this.index].src=dcsSrc;
		this.index++;
	}
	else{
		document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="'+dcsSrc+'">');
	}
}
WebTrends.prototype.dcsMeta=function(){
	var elems;
	if (document.all){
		elems=document.all.tags("meta");
	}
	else if (document.documentElement){
		elems=document.getElementsByTagName("meta");
	}
	if (typeof(elems)!="undefined"){
		var length=elems.length;
		for (var i=0;i<length;i++){
			var name=elems.item(i).name;
			var content=elems.item(i).content;
			var equiv=elems.item(i).httpEquiv;
			if (name.length>0){
				if (name.indexOf("WT.")==0){
					this.WT[name.substring(3)]=content;
				}
				else if (name.indexOf("DCSext.")==0){
					this.DCSext[name.substring(7)]=content;
				}
				else if (name.indexOf("DCS.")==0){
					this.DCS[name.substring(4)]=content;
				}
			}
		}
	}
}
WebTrends.prototype.dcsTag=function(){
	if (document.cookie.indexOf("WTLOPTOUT=")!=-1){
		return;
	}
	var WT=this.WT;
	var DCS=this.DCS;
	var DCSext=this.DCSext;
	var i18n=this.i18n;
	var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+this.domain+(this.dcsid==""?'':'/'+this.dcsid)+"/dcs.gif?";
	if (i18n){
		WT.dep="";
	}
	for (var N in DCS){
 		if (DCS[N]&&(typeof DCS[N]!="function")){
			P+=this.dcsA(N,DCS[N]);
		}
	}
	var keys=["co_f","vt_sid","vt_f_tlv"];
	for (var i=0;i<keys.length;i++){
		var key=keys[i];
		if (WT[key]){
			P+=this.dcsA("WT."+key,WT[key]);
			delete WT[key];
		}
	}
	for (N in WT){
		if (WT[N]&&(typeof WT[N]!="function")){
			P+=this.dcsA("WT."+N,WT[N]);
		}
	}
	for (N in DCSext){
		if (DCSext[N]&&(typeof DCSext[N]!="function")){
			if (i18n){
				WT.dep=(WT.dep.length==0)?N:(WT.dep+";"+N);
			}
			P+=this.dcsA(N,DCSext[N]);
		}
	}
	if (i18n&&(WT.dep.length>0)){
		P+=this.dcsA("WT.dep",WT.dep);
	}
	if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){
		P=P.substring(0,2040)+"&WT.tu=1";
	}
	this.dcsCreateImage(P);
	this.WT.ad="";
}
WebTrends.prototype.dcsFunc=function(func){
	if (typeof(func)=="function"){
		func();
	}
}
WebTrends.prototype.dcsDebug=function(){
	var t=this;
	var i=t.images[0].src;
	var q=i.indexOf("?");
	var r=i.substring(0,q).split("/");
	var m="<b>Protocol</b><br><code>"+r[0]+"<br></code>";
	m+="<b>Domain</b><br><code>"+r[2]+"<br></code>";
	m+="<b>Path</b><br><code>/"+r[3]+"/"+r[4]+"<br></code>";
	m+="<b>Query Params</b><code>"+i.substring(q+1).replace(/\&/g,"<br>")+"</code>";
	m+="<br><b>Cookies</b><br><code>"+document.cookie.replace(/\;/g,"<br>")+"</code>";
	if (t.w&&!t.w.closed){
		t.w.close();
	}
	t.w=window.open("","dcsDebug","width=500,height=650,scrollbars=yes,resizable=yes");
	t.w.document.write(m);
	t.w.focus();
}
//--WebTrends tag extension-added this.WT.mc_ev=this.dcsCQP();->

WebTrends.prototype.dcsCollect=function(){
    if (this.enabled){
        this.dcsVar();
        this.dcsMeta();
        this.dcsQP();
        this.WT.mc_ev=this.dcsCQP();
        this.dcsFunc(this.dcsAdv());
        this.dcsTag();
    }
}
//-end -WebTrends tag extension-->

WebTrends.prototype.dcsCleanup = function()
{
    this.DCS={};
    this.WT={};
    this.DCSext={};
    var WT=this.WT;
    var DCS=this.DCS;
    var DCSext=this.DCSext;
     
    if (arguments.length%2==0){
        for (var i=0;i<arguments.length;i+=2){
			if (arguments[i].indexOf('WT.')==0){
				WT[arguments[i].substring(3)]=arguments[i+1];
			}
			else if (arguments[i].indexOf('DCS.')==0){
				DCS[arguments[i].substring(4)]=arguments[i+1];
			}
			else if (arguments[i].indexOf('DCSext.')==0){
				DCSext[arguments[i].substring(7)]=arguments[i+1];
			}
		}
    }
}
//--WebTrends tag extension-->
WebTrends.prototype.dcsCQP=function()
{
  var WT=this.WT;
  var qry=window.location.search.toLowerCase();
  if((qry && (qry.indexOf("wt.mc_id")!=-1) && (qry.indexOf("wt.mc_ev")==-1)) || ((WT.mc_id!=null) && (WT.mc_id.toString()!="")) ) {
  	return "click";
  }
  else{
  	return "";
  }
}
//-end -WebTrends tag extension-->

function dcsMultiTrack(){
	if (typeof(_tag)!="undefined"){
		return(_tag.dcsMultiTrack());
	}
}

Function.prototype.wtbind = function(obj){
	var method=this;
	var temp=function(){
		return method.apply(obj,arguments);
	};
	return temp;
}

var _tag=new WebTrends();
_tag.dcsGetId();

// WebTrends SmartSource Data Collector Tag
// Version: 8.5.0     
// Tag Builder Version: 2.0.0
// Created: 7/30/2008 12:19:29 AM

_tag.dcsCollect();


