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();
		}
	}
}

var browserName=navigator.appName;
//if(browserName=="Microsoft Internet Explorer")jQuery.noConflict();

//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//
// JavaScript Document
function isPastDate(strDate) { var check_In=new Date(); check_In=new Date(strDate);  var strCurrentDate = new Date(date()); if(check_In<strCurrentDate) return true; else return false; }
 function frmSubmit() { var f= window.document.quicksearch; var intMon=parseInt(f.checkInMonth.options[f.checkInMonth.selectedIndex].value,10); var intDate=parseInt(f.checkInDay.options[f.checkInDay.selectedIndex].value,10); var intYear=parseInt(f.checkInYear.options[f.checkInYear.selectedIndex].value,10); var checkindate = new Date(intMon+"/"+intDate+"/"+intYear); var checkinday = checkindate.getDate(); f.checkInDate.value=checkinday; var checkinmonth = checkindate.getMonth(); var checkinyear = checkindate.getFullYear(); checkindate.setDate(checkindate.getDate()+parseInt(f.number_Nights.value)); MM2=checkindate.getMonth()+parseInt(1); YY2=checkindate.getFullYear(); DD2=checkindate.getDate();   f.checkInMonthYear.value = checkinmonth+""+checkinyear;   window.document.quicksearch.DateOut.value = window.document.quicksearch.MM2.value+"/"+window.document.quicksearch.DD2.value+"/"+window.document.quicksearch.YY2.value; window.document.quicksearch.checkOutFullDate.value=MM2+"/"+DD2+"/"+YY2;   if(isPastDate(intMon+"/"+intDate+"/"+intYear)) { alert("Check-IN Date can not be passed date."); f.checkInDay.focus(); return false; } else{ strEvent = "event1"; strText = "Home Page - " +"Reservation Widget"; var s=s_gi('thayintermiami');s.linkTrackVars='prop1,eVar1,events';s.events="'"+strEvent+"'";s.prop1=""+strText+"";s.eVar1=""+strText+"";s.tl(this,'o', ""+strText+""); } }
 function fnToday() { var strDate = new Date(); window.document.quicksearch.checkInMonth.value=strDate.getMonth()+parseInt(1); window.document.quicksearch.checkInDay.value=strDate.getDate(); window.document.quicksearch.checkInYear.value=strDate.getFullYear();  }   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;     } }
///End Calendar.js///

///promo//
function submitPromo(){ var promoCodeEntered = document.forms['promo'].promocode.value; switch (promoCodeEntered) { case 'IBPHI': case 'ILCOC': case 'IPCHV': case 'IPDDT': case 'IPIBM': case 'IPPCW': case 'IPXOM': self.location = 'corporate/' + promoCodeEntered + '.html'; break; default: break; } }
function submitForm(){ b_valid = true; if(!htlDoaCal.returnSelectedDate("doa_yy","doa_mm","doa_dd")) b_valid = false; if(!htlDodCal.returnSelectedDate("dod_yy","dod_mm","dod_dd")) b_valid = false; return (b_valid); }
//END promo//
function showit(z){ if(z=="attract"){ document.getElementById('muse').style.display="none"; document.getElementById('rest').style.display="none"; document.getElementById('attract').style.display="block"; }		
if(z=="rest"){ document.getElementById('attract').style.display="none"; document.getElementById('muse').style.display="none"; document.getElementById('rest').style.display="block"; }				
if(z=="muse"){ document.getElementById('attract').style.display="none"; document.getElementById('rest').style.display="none";		 document.getElementById('muse').style.display="block"; } }

//Boxover.js//
/* --- BoxOver ---
/* --- v 2.1 17th June 2006
By Oliver Bryant with help of Matthew Tagg
http://boxover.swazz.org */

if (typeof document.attachEvent!='undefined') {
   window.attachEvent('onload',init);
   document.attachEvent('onmousemove',moveMouse);
   document.attachEvent('onclick',checkMove); }
else {
   window.addEventListener('load',init,false);
   document.addEventListener('mousemove',moveMouse,false);
   document.addEventListener('click',checkMove,false);
}

var oDv=document.createElement("div");
var dvHdr=document.createElement("div");
var dvBdy=document.createElement("div");
var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;
boxOpen=false;
ox=10;
oy=10;
lockX=0;
lockY=0;

function init() {
	oDv.style.zIndex="1";
	oDv.appendChild(dvHdr);
	oDv.appendChild(dvBdy);
	oDv.style.position="absolute";
	oDv.style.visibility='hidden';
	document.body.appendChild(oDv);	
}

function defHdrStyle() {
	dvHdr.style.zIndex="1";
	dvHdr.innerHTML='<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;'+dvHdr.innerHTML;
	dvHdr.style.fontWeight='bold';
	dvHdr.style.width='150px';
	dvHdr.style.fontFamily='arial';
	dvHdr.style.border='1px solid #b9963a';
	dvHdr.style.padding='3';
	dvHdr.style.fontSize='11';
	dvHdr.style.color='#b9963a';
	dvHdr.style.background='#000000';
	dvHdr.style.filter='alpha(opacity=100)'; // IE
	dvHdr.style.opacity='1.00'; // FF
}

function defBdyStyle() {
	dvBdy.style.zIndex="1";
	dvBdy.style.borderBottom='1px solid #b9963a';
	dvBdy.style.borderLeft='1px solid #b9963a';
	dvBdy.style.borderRight='1px solid #b9963a';
	dvBdy.style.width='150px';
	dvBdy.style.fontFamily='arial';
	dvBdy.style.fontSize='11';
	dvBdy.style.padding='3';
	dvBdy.style.color='#1B4966';
	dvBdy.style.background='#FFFFFF';
	dvBdy.style.filter='alpha(opacity=100)'; // IE
	dvBdy.style.opacity='1.00'; // FF
}

function checkElemBO(txt) {
if (!txt || typeof(txt) != 'string') return false;
if ((txt.indexOf('header')>-1)&&(txt.indexOf('body')>-1)&&(txt.indexOf('[')>-1)&&(txt.indexOf('[')>-1)) 
   return true;
else
   return false;
}

function scanBO(curNode) {
	  if (checkElemBO(curNode.title)) {
         curNode.boHDR=getParam('header',curNode.title);
         curNode.boBDY=getParam('body',curNode.title);
			curNode.boCSSBDY=getParam('cssbody',curNode.title);			
			curNode.boCSSHDR=getParam('cssheader',curNode.title);
			curNode.IEbugfix=(getParam('hideselects',curNode.title)=='on')?true:false;
			curNode.fixX=parseInt(getParam('fixedrelx',curNode.title));
			curNode.fixY=parseInt(getParam('fixedrely',curNode.title));
			curNode.absX=parseInt(getParam('fixedabsx',curNode.title));
			curNode.absY=parseInt(getParam('fixedabsy',curNode.title));
			curNode.offY=(getParam('offsety',curNode.title)!='')?parseInt(getParam('offsety',curNode.title)):10;
			curNode.offX=(getParam('offsetx',curNode.title)!='')?parseInt(getParam('offsetx',curNode.title)):10;
			curNode.fade=(getParam('fade',curNode.title)=='on')?true:false;
			curNode.fadespeed=(getParam('fadespeed',curNode.title)!='')?getParam('fadespeed',curNode.title):0.04;
			curNode.delay=(getParam('delay',curNode.title)!='')?parseInt(getParam('delay',curNode.title)):0;
			if (getParam('requireclick',curNode.title)=='on') {
				curNode.requireclick=true;
				document.all?curNode.attachEvent('onclick',showHideBox):curNode.addEventListener('click',showHideBox,false);
				document.all?curNode.attachEvent('onmouseover',hideBox):curNode.addEventListener('mouseover',hideBox,false);
			}
			else {// Note : if requireclick is on the stop clicks are ignored   			
   			if (getParam('doubleclickstop',curNode.title)!='off') {
   				document.all?curNode.attachEvent('ondblclick',pauseBox):curNode.addEventListener('dblclick',pauseBox,false);
   			}	
   			if (getParam('singleclickstop',curNode.title)=='on') {
   				document.all?curNode.attachEvent('onclick',pauseBox):curNode.addEventListener('click',pauseBox,false);
   			}
   		}
			curNode.windowLock=getParam('windowlock',curNode.title).toLowerCase()=='off'?false:true;
			curNode.title='';
			curNode.hasbox=1;
	   }
	   else
	      curNode.hasbox=2;   
}


function getParam(param,list) {
	var reg = new RegExp('([^a-zA-Z]' + param + '|^' + param + ')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]');
	var res = reg.exec(list);
	var returnvar;
	if(res)
		return res[2].replace('[[','[').replace(']]',']');
	else
		return '';
}

function Left(elem){	
	var x=0;
	if (elem.calcLeft)
		return elem.calcLeft;
	var oElem=elem;
	while(elem){
		 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderLeftWidth);
		 x+=elem.offsetLeft;
		 elem=elem.offsetParent;
	  } 
	oElem.calcLeft=x;
	return x;
	}

function Top(elem){
	 var x=0;
	 if (elem.calcTop)
	 	return elem.calcTop;
	 var oElem=elem;
	 while(elem){		
	 	 if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))
		 	x+=parseInt(elem.currentStyle.borderTopWidth); 
		 x+=elem.offsetTop;
	         elem=elem.offsetParent;
 	 } 
 	 oElem.calcTop=x;
 	 return x;
 	 
}

var ah,ab;
function applyStyles() {
	if(ab)
		oDv.removeChild(dvBdy);
	if (ah)
		oDv.removeChild(dvHdr);
	dvHdr=document.createElement("div");
	dvBdy=document.createElement("div");
	CBE.boCSSBDY?dvBdy.className=CBE.boCSSBDY:defBdyStyle();
	CBE.boCSSHDR?dvHdr.className=CBE.boCSSHDR:defHdrStyle();
	dvHdr.innerHTML=CBE.boHDR;
	dvBdy.innerHTML=CBE.boBDY;
	dvHdr.style.zIndex="1";
	dvBdy.style.zIndex="1";
	ah=false;
	ab=false;
	if (CBE.boHDR!='') {		
		oDv.appendChild(dvHdr);
		ah=true;
	}	
	if (CBE.boBDY!=''){
		oDv.appendChild(dvBdy);
		ab=true;
	}	
}

var CSE,iterElem,LSE,CBE,LBE, totalScrollLeft, totalScrollTop, width, height ;
var ini=false;

// Customised function for inner window dimension
function SHW() {
   if (document.body && (document.body.clientWidth !=0)) {
      width=document.body.clientWidth;
      height=document.body.clientHeight;
   }
   if (document.documentElement && (document.documentElement.clientWidth!=0) && (document.body.clientWidth + 20 >= document.documentElement.clientWidth)) {
      width=document.documentElement.clientWidth;   
      height=document.documentElement.clientHeight;   
   }   
   return [width,height];
}


var ID=null;
function moveMouse(e) {
   //boxMove=true;
	e?evt=e:evt=event;
	
	CSE=evt.target?evt.target:evt.srcElement;
	
	if (!CSE.hasbox) {
	   // Note we need to scan up DOM here, some elements like TR don't get triggered as srcElement
	   iElem=CSE;
	   while ((iElem.parentNode) && (!iElem.hasbox)) {
	      scanBO(iElem);
	      iElem=iElem.parentNode;
	   }	   
	}
	
	if ((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){		
	   if (!CSE.boxItem) {
			iterElem=CSE;
			while ((iterElem.hasbox==2)&&(iterElem.parentNode))
					iterElem=iterElem.parentNode; 
			CSE.boxItem=iterElem;
			}
		iterElem=CSE.boxItem;
		if (CSE.boxItem&&(CSE.boxItem.hasbox==1))  {
			LBE=CBE;
			CBE=iterElem;
			if (CBE!=LBE) {
				applyStyles();
				if (!CBE.requireclick)
					if (CBE.fade) {
						if (ID!=null)
							clearTimeout(ID);
						ID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay);
					}
					else {
						if (ID!=null)
							clearTimeout(ID);
						COL=1;
						ID=setTimeout("oDv.style.visibility='visible';ID=null;",CBE.delay);						
					}
				if (CBE.IEbugfix) {hideSelects();} 
				fixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;
				fixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;			
				lockX=0;
				lockY=0;
				boxMove=true;
				ox=CBE.offX?CBE.offX:10;
				oy=CBE.offY?CBE.offY:10;
			}
		}
		else if (!isChild(CSE,dvHdr) && !isChild(CSE,dvBdy) && (boxMove))	{
			// The conditional here fixes flickering between tables cells.
			if ((!isChild(CBE,CSE)) || (CSE.tagName!='TABLE')) {   			
   			CBE=null;
   			if (ID!=null)
  					clearTimeout(ID);
   			fadeOut();
   			showSelects();
			}
		}
		LSE=CSE;
	}
	else if (((isChild(CSE,dvHdr) || isChild(CSE,dvBdy))&&(boxMove))) {
		totalScrollLeft=0;
		totalScrollTop=0;
		
		iterElem=CSE;
		while(iterElem) {
			if(!isNaN(parseInt(iterElem.scrollTop)))
				totalScrollTop+=parseInt(iterElem.scrollTop);
			if(!isNaN(parseInt(iterElem.scrollLeft)))
				totalScrollLeft+=parseInt(iterElem.scrollLeft);
			iterElem=iterElem.parentNode;			
		}
		if (CBE!=null) {
			boxLeft=Left(CBE)-totalScrollLeft;
			boxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;
			boxTop=Top(CBE)-totalScrollTop;
			boxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;
			doCheck();
		}
	}
	
	if (boxMove&&CBE) {
		// This added to alleviate bug in IE6 w.r.t DOCTYPE
		bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
		bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;
		mouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;
		mouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;
		if ((CBE)&&(CBE.windowLock)) {
			mouseY < -oy?lockY=-mouseY-oy:lockY=0;
			mouseX < -ox?lockX=-mouseX-ox:lockX=0;
			mouseY > (SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;
			mouseX > (SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX;			
		}
		oDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";
		oDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px";		
		
	}
}

function doCheck() {	
	if (   (mouseX < boxLeft)    ||     (mouseX >boxRight)     || (mouseY < boxTop) || (mouseY > boxBottom)) {
		if (!CBE.requireclick)
			fadeOut();
		if (CBE.IEbugfix) {showSelects();}
		CBE=null;
	}
}

function pauseBox(e) {
   e?evt=e:evt=event;
	boxMove=false;
	evt.cancelBubble=true;
}

function showHideBox(e) {
	oDv.style.visibility=(oDv.style.visibility!='visible')?'visible':'hidden';
	oDv.style.zIndex="1";
}

function hideBox(e) {
	oDv.style.visibility='hidden';
}

var COL=0;
var stopfade=false;
function fadeIn(fs) {
		ID=null;
		COL=0;
		oDv.style.visibility='visible';
		oDv.style.zIndex="1";
		fadeIn2(fs);
}

function fadeIn2(fs) {
		COL=COL+fs;
		COL=(COL>1)?1:COL;
		oDv.style.filter='alpha(opacity='+parseInt(100*COL)+')';
		oDv.style.opacity=COL;
		oDv.style.zIndex="1";		
		if (COL<1)
		 setTimeout("fadeIn2("+fs+")",20);		
}


function fadeOut() {
	oDv.style.visibility='hidden';
	
}

function isChild(s,d) {
	while(s) {
		if (s==d) 
			return true;
		s=s.parentNode;
	}
	return false;
}

var cSrc;
function checkMove(e) {
	e?evt=e:evt=event;
	cSrc=evt.target?evt.target:evt.srcElement;
	if ((!boxMove)&&(!isChild(cSrc,oDv))) {
		fadeOut();
		if (CBE&&CBE.IEbugfix) {showSelects();}
		boxMove=true;
		CBE=null;
	}
}

function showSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
      elements[i].style.visibility='visible';
   }
}

function hideSelects(){
   var elements = document.getElementsByTagName("select");
   for (i=0;i< elements.length;i++){
   elements[i].style.visibility='hidden';
   }
}
//end boxover.js//
//cal.js//
	<!--
	var calCheckIn= new CalendarPopup("calendarCheckIn");
	calCheckIn.setReturnFunction("showDateCheckIn");
	calCheckIn.setDayHeaders('Su','M','Tu','W','Th','F','Sa');
	var offsetX=0;
	var offsetY=0;
	var bn=navigator.platform;
	var leftmargin=0;
	var scrheight=0;scrwidth=0;
	var bw=navigator.userAgent;
	var os="Win";
	var ie=false;
	var ns=false;
	var sf=false;
	var fx=false;
	var op=false;
	var mz=false;
//	alert(bw);
	scrheight =(window.screen.height);
	scrwidth =(window.screen.width);
	//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
	//alert(bw);
	if(bn.indexOf("Win32")==-1){os="Mac";}
	if(bw.indexOf("Opera")!=-1)
	{op=true;}
	else if(bw.indexOf("Safari")!=-1)
	{sf=true;}
	else if(bw.indexOf("Firefox")!=-1)
	{fx=true;}
	else if(bw.indexOf("MSIE")!=-1)
	{ie=true;}
	else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
	{ns=true;}
	else if(bw.indexOf("Mozilla")!=-1)
	{mz=true;}
	else
	{op=true;}
	
//cal one
	var pos=new Array(-248,0,-248,0,-248,0,-248,0,  		// win-ie 800x600;1024x768;1152x864;1280x720 
				      -248,0,-248,0,-248,0,-248,0, 	  		// win-op 800x600;1024x768;1152x864;1280x720
				      550,336,600,336,664,336,730,336,	// win-fx 800x600;1024x768;1152x864;1280x720 
				  	  550,336,600,336,664,336,730,336,	// win-ns 800x600;1024x768;1152x864;1280x720
				  	  550,336,600,336,664,336,730,336,	// win-mz 800x600;1024x768;1152x864;1280x720
					   
				     -250,-308,-296,-308,-364,-308,-426,-308,// mac-ie 800x600;1024x768;1152x864;1280x720 
					  -248,0,-248,0,-248,0,-248,0, 	           // mac-op 800x600;1024x768;1152x864;1280x720 
				      550,336,600,336,664,336,730,336,	// mac-fx 800x600;1024x768;1152x864;1280x720 
					  550,336,600,336,664,336,730,336,	// mac-ns 800x600;1024x768;1152x864;1280x720
					  550,336,600,336,664,336,730,336,
					  730,730,730);   // mac-sf 800x600;1024x768;1152x864;1280x720 			
	setPos(pos);

	function setPos(pos)
	{
		if(os=="Win")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
				//alert("X:"+offsetX+"   Y:"+offsetY);

			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[23]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(ns)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[31]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
			else if(mz)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[81]);offsetY=parseInt(pos[39]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[39]);}
				//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
			}
		}
		else if(os=="Mac")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			else if(ns)
			{
				
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
			
			else if(sf)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
				//alert("X:"+offsetX +"Y:" +offsetY);
			}
		}
	}
	if(ie){ calCheckIn.offsetY = offsetY-185; 
	}else if(fx){
		calCheckIn.offsetY = offsetY-150; 
	}else{
		calCheckIn.offsetY = offsetY;
	}
	if(fx){ calCheckIn.offsetX = 0; }else{
		calCheckIn.offsetX = offsetX;
	}
	var calCheckOut= new CalendarPopup("calendarCheckOut");
	calCheckOut.setReturnFunction("showDateCheckOut");
	calCheckOut.setDayHeaders('Su','M','Tu','W','Th','F','Sa');
		
	if(ie){ calCheckOut.offsetY = offsetY-185; }else{
		calCheckOut.offsetY = offsetY;
	}
	if(fx){ calCheckOut.offsetX = 0; }else{
		calCheckOut.offsetX = offsetX;
	}
	
	//calCheckIn.offsetX = 0;
	//calCheckIn.offsetY = 35;
	function changeDate(varSelectedDate)
	{
		var takeDay = parseInt(varSelectedDate.value);
		var SelectedDate = new Date(window.document.quicksearch.checkInDate1.value);
		var dispDate=new Date(parseInt(SelectedDate.getMonth()+1,10) + "/" + (parseInt(SelectedDate.getDate()+takeDay)) + "/" + SelectedDate.getFullYear());
		var dispDay = dispDate.getDate();
		var dispMonth = parseInt(dispDate.getMonth()+1,10);
		var dispYear = dispDate.getFullYear();
		
		// display check out date
		window.document.quicksearch.checkOutDate1.value=dispMonth+"/"+dispDay+"/"+dispYear;
	}
	
	function showDateCheckIn(y,m,d)
	{
		// display check in date
		window.document.quicksearch.checkInDate1.value=m+"/"+d+"/"+y;
		var dispNights="";
		var dispDate="";
		var dispMonth ="";
		var dispYear ="";
		var iShowNights ;
		var SelectedDate = new Date(window.document.quicksearch.checkInDate1.value);
		var dtShowCheckOut =new Date(window.document.quicksearch.checkOutDate1.value);
		if (dtShowCheckOut<SelectedDate)
		{
			iShowNights = 1;
		}
		else
		{
			iShowNights = Math.ceil((dtShowCheckOut.getTime() - SelectedDate.getTime())/(1000*60*60*24));
			if (iShowNights > 30) 
			{
				iShowNights = 30;
			}
		}
		window.document.quicksearch.numberOfNights.value = iShowNights;
		dispNights=parseInt(window.document.quicksearch.numberOfNights.value);
		
		dispDate=new Date(parseInt(SelectedDate.getMonth()+1,10) + "/" + (SelectedDate.getDate()+dispNights) + "/" + SelectedDate.getFullYear());
		dispDay = dispDate.getDate();
		dispMonth = parseInt(dispDate.getMonth()+1,10);
		dispYear = dispDate.getFullYear();
		
		// display check out date
		
		window.document.quicksearch.checkOutDate1.value=dispMonth+"/"+dispDay+"/"+dispYear;
	}
	document.write(calCheckIn.getStyles());
	
	//calendar 2
	

	function calDatesNights()
	{
		var dtCheckIn = new Date(window.document.quicksearch.checkInDate1.value);
		var dtCheckOut = new Date(window.document.quicksearch.checkOutDate1.value);
		var iNights = Math.ceil((dtCheckOut.getTime() - dtCheckIn.getTime())/(1000*60*60*24));
		var displayNights = "";
		if ( dtCheckOut < dtCheckIn )
		{
			var showDate1=new Date(parseInt(dtCheckIn.getMonth()+1,10) + "/" + (dtCheckIn.getDate()+1) + "/" + dtCheckIn.getFullYear());
		    window.document.quicksearch.checkOutDate1.value=parseInt(showDate1.getMonth()+1,10)+"/"+showDate1.getDate()+"/"+showDate1.getFullYear();
			iNights = 1;
		}
		if (iNights > 30) 
		{
			displayNights = 30;
			var showDate=new Date(parseInt(dtCheckIn.getMonth()+1,10) + "/" + (dtCheckIn.getDate()+displayNights) + "/" + dtCheckIn.getFullYear());
		    window.document.quicksearch.checkOutDate1.value=parseInt(showDate.getMonth()+1,10)+"/"+showDate.getDate()+"/"+showDate.getFullYear();
		}
		else
		{
			displayNights = iNights;
		}
		window.document.quicksearch.numberOfNights.value = displayNights;
	}
	function showDateCheckOut(y,m,d)
	{
		/*window.document.quicksearch.checkOutMonth.value = m;
		window.document.quicksearch.checkOutDay.value = d;
		window.document.quicksearch.checkOutYear.value = y;*/
		window.document.quicksearch.checkOutDate1.value=m+"/"+d+"/"+y
		calDatesNights();
		
	}
	document.write(calCheckOut.getStyles());
	//-->
//end cal.js//
//calpos.js
// Common part Position Start Here 
var offsetX=0;
var offsetY=0;
var bn=navigator.platform;
var leftmargin=0;
var scrheight=0;scrwidth=0;
var bw=navigator.userAgent;
var os="Win";
var ie=false;
var ns=false;
var sf=false;
var fx=false;
var op=false;
var mz=false;
scrheight =(window.screen.height);
scrwidth =(window.screen.width);
//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
//alert(bw);
if(bn.indexOf("Win32")==-1){os="Mac";}
if(bw.indexOf("Opera")!=-1)
{op=true;}
else if(bw.indexOf("Safari")!=-1)
{sf=true;}
else if(bw.indexOf("Firefox")!=-1)
{fx=true;}
else if(bw.indexOf("MSIE")!=-1)
{ie=true;}
else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
{ns=true;}
else if(bw.indexOf("Mozilla")!=-1)
{mz=true;}
else
{op=true;}	

function setPos(pos)
{
	if(os=="Win")
	{
		if(ie)
		{//alert('ie');
			if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(op)
		{//alert('op');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
			if(parseInt(scrwidth)=="1600" && parseInt(scrheight)=="900"){offsetX=parseInt(pos[123]);offsetY=parseInt(pos[124]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(ns)
		{//alert('ns');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(mz)
		{//alert('mz');
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
	}
	else if(os=="Mac")
	{
		if(ie)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[81]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[83]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[84]);offsetY=parseInt(pos[85]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[86]);offsetY=parseInt(pos[87]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(op)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[88]);offsetY=parseInt(pos[89]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[90]);offsetY=parseInt(pos[91]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[92]);offsetY=parseInt(pos[93]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[94]);offsetY=parseInt(pos[95]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[96]);offsetY=parseInt(pos[97]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[98]);offsetY=parseInt(pos[99]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[100]);offsetY=parseInt(pos[101]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[102]);offsetY=parseInt(pos[103]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(ns)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[104]);offsetY=parseInt(pos[105]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[106]);offsetY=parseInt(pos[107]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[108]);offsetY=parseInt(pos[109]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[110]);offsetY=parseInt(pos[111]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}

		else if(sf)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[112]);offsetY=parseInt(pos[113]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[114]);offsetY=parseInt(pos[115]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[116]);offsetY=parseInt(pos[117]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[118]);offsetY=parseInt(pos[119]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
	}
}

var pos=new Array(    800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  		// win-ie 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-op 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				      800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-fx 800x600;1024x768;1152x864;1280x720(110,65,60);1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  	// win-ns 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-mz 800x600;1024x768;1152x864;1280x720

				      800,600,1024,768,1152,864,1280,720,		// mac-ie 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,            			// mac-op 800x600;1024x768;1152x864;1280x720
				      800,600,1024,768,1152,864,1280,720,   		// mac-fx 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720, 	    	// mac-ns 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,
					  1280,1280,1280,900,1600);     						// mac-sf 800x600;1024x768;1152x864;1280x720
	setPos(pos);
//end calpos.js
//popupwindow.js//
function PopupWindow_getXYPosition(anchorname) {
	var coordinates;
	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
	this.x = coordinates.x;
	this.y = coordinates.y;
	}
// Set width/height of DIV/popup window
function PopupWindow_setSize(width,height) {
	this.width = width;
	this.height = height;
	}
// Fill the window with contents
function PopupWindow_populate(contents) {
	this.contents = contents;
	this.populated = false;
	}
// Refresh the displayed contents of the popup
function PopupWindow_refresh() {
	if (this.divName != null) {
		// refresh the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).innerHTML = this.contents;
			}
		else if (this.use_css) { 
			document.all[this.divName].innerHTML = this.contents;
			}
		else if (this.use_layers) { 
			var d = document.layers[this.divName]; 
			d.document.open();
			d.document.writeln(this.contents);
			d.document.close();
			}
		}
	else {
		if (this.popupWindow != null && !this.popupWindow.closed) {
			this.popupWindow.document.open();
			this.popupWindow.document.writeln(this.contents);
			this.popupWindow.document.close();
			}
		}
	}
// Position and show the popup, relative to an anchor object
function PopupWindow_showPopup(anchorname) {
	this.getXYPosition(anchorname);
	this.x += this.offsetX;
	this.y += this.offsetY;
	if (!this.populated && (this.contents != "")) {
		this.populated = true;
		this.refresh();
		}
	if (this.divName != null) {
		// Show the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).style.left = this.x;
			document.getElementById(this.divName).style.top = this.y;
			document.getElementById(this.divName).style.visibility = "visible";
			}
		else if (this.use_css) {
			document.all[this.divName].style.left = this.x;
			document.all[this.divName].style.top = this.y;
			document.all[this.divName].style.visibility = "visible";
			}
		else if (this.use_layers) {
			document.layers[this.divName].left = this.x;
			document.layers[this.divName].top = this.y;
			document.layers[this.divName].visibility = "visible";
			}
		}
	else {
		if (this.popupWindow == null || this.popupWindow.closed) {
			this.popupWindow = window.open("about:blank","window_"+anchorname,"toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no,width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
			}
		this.refresh();
		}
	}
// Hide the popup
function PopupWindow_hidePopup() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.visibility = "hidden";
			}
		else if (this.use_css) {
			document.all[this.divName].style.visibility = "hidden";
			}
		else if (this.use_layers) {
			document.layers[this.divName].visibility = "hidden";
			}
		}
	else {
		if (this.popupWindow && !this.popupWindow.closed) {
			this.popupWindow.close();
			this.popupWindow = null;
			}
		}
	}
// Pass an event and return whether or not it was the popup DIV that was clicked
function PopupWindow_isClicked(e) {
	if (this.divName != null) {
		if (this.use_layers) {
			var clickX = e.pageX;
			var clickY = e.pageY;
			var t = document.layers[this.divName];
			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
				return true;
				}
			else { return false; }
			}
		else if (document.all) { // Need to hard-code this to trap IE for error-handling
			var t = window.event.srcElement;
			while (t.parentElement != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentElement;
				}
			return false;
			}
		else if (this.use_gebi) {
			var t = e.originalTarget;
			while (t.parentNode != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentNode;
				}
			return false;
			}
		return false;
		}
	return false;
	}

// Check an onMouseDown event to see if we should hide
function PopupWindow_hideIfNotClicked(e) {
	if (this.autoHideEnabled && !this.isClicked(e)) {
		this.hidePopup();
		}
	}
// Call this to make the DIV disable automatically when mouse is clicked outside it
function PopupWindow_autoHide() {
	this.autoHideEnabled = true;
	}
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
function PopupWindow_hidePopupWindows(e) {
	for (var i=0; i<popupWindowObjects.length; i++) {
		if (popupWindowObjects[i] != null) {
			var p = popupWindowObjects[i];
			p.hideIfNotClicked(e);
			}
		}
	}
// Run this immediately to attach the event listener
function PopupWindow_attachListener() {
	if (document.layers) {
		document.captureEvents(Event.MOUSEUP);
		}
	window.popupWindowOldEventListener = document.onmouseup;
	if (window.popupWindowOldEventListener != null) {
		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
		}
	else {
		document.onmouseup = PopupWindow_hidePopupWindows;
		}
	}
// CONSTRUCTOR for the PopupWindow object
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
function PopupWindow() {
	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
	if (!window.listenerAttached) {
		window.listenerAttached = true;
		PopupWindow_attachListener();
		}
	this.index = popupWindowIndex++;
	popupWindowObjects[this.index] = this;
	this.divName = null;
	this.popupWindow = null;
	this.width=0;
	this.height=0;
	this.populated = false;
	this.visible = false;
	this.autoHideEnabled = false;
	
	this.contents = "";
	if (arguments.length>0) {
		this.type="DIV";
		this.divName = arguments[0];
		}
	else {
		this.type="WINDOW";
		}
	this.use_gebi = false;
	this.use_css = false;
	this.use_layers = false;
	if (document.getElementById) { this.use_gebi = true; }
	else if (document.all) { this.use_css = true; }
	else if (document.layers) { this.use_layers = true; }
	else { this.type = "WINDOW"; }
	this.offsetX = 0;
	this.offsetY = 0;
	// Method mappings
	this.getXYPosition = PopupWindow_getXYPosition;
	this.populate = PopupWindow_populate;
	this.refresh = PopupWindow_refresh;
	this.showPopup = PopupWindow_showPopup;
	this.hidePopup = PopupWindow_hidePopup;
	this.setSize = PopupWindow_setSize;
	this.isClicked = PopupWindow_isClicked;
	this.autoHide = PopupWindow_autoHide;
	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
	}
//end popupwindow.js//
//thayercalendarpopup.js
function CalendarPopup() {
	var newCalendar;
	if (arguments.length>0) {
		newCalendar = new PopupWindow(arguments[0]);
		}
	else {
		newCalendar = new PopupWindow();
		newCalendar.setSize(150,175);
		}
	newCalendar.offsetX = -152;
	newCalendar.offsetY = 25;
	newCalendar.autoHide();
	// Calendar-specific properties

	newCalendar.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	newCalendar.dayHeaders = new Array("S","M","T","W","T","F","S");
	newCalendar.returnFunction = "tmpReturnFunction";
	newCalendar.weekStartDay = 0;
	// Method mappings
	newCalendar.setReturnFunction = CalendarPopup_setReturnFunction;
	newCalendar.setMonthNames = CalendarPopup_setMonthNames;
	newCalendar.setDayHeaders = CalendarPopup_setDayHeaders;
	newCalendar.setWeekStartDay = CalendarPopup_setWeekStartDay;
	newCalendar.showCalendar = CalendarPopup_showCalendar;
	newCalendar.hideCalendar = CalendarPopup_hideCalendar;
	newCalendar.getStyles = CalendarPopup_getStyles;
	newCalendar.refreshCalendar = CalendarPopup_refreshCalendar;
	newCalendar.getCalendar = CalendarPopup_getCalendar;
	// Return the object
	return newCalendar;
	}

// Temporary default function to be called when a date is clicked, so no error is thrown
function CalendarPopup_tmpReturnFunction(y,m,d) {
	alert('Use setReturnFunction() to define which function will get the clicked results!');
	}

// Set the name of the function to call to get the clicked date
function CalendarPopup_setReturnFunction(name) {
	this.returnFunction = name;
	}

// Over-ride the built-in month names
function CalendarPopup_setMonthNames() {
	for (var i=0; i<arguments.length; i++) {
		this.monthNames[i] = arguments[i];
		}
	}

// Over-ride the built-in column headers for each day
function CalendarPopup_setDayHeaders() {
	for (var i=0; i<arguments.length; i++) {
		this.dayHeaders[i] = arguments[i];
		}
	}

// Set the day of the week (0-7) that the calendar display starts on
// This is for countries other than the US whose calendar displays start on Monday(1), for example
function CalendarPopup_setWeekStartDay(day) {
	this.weekStartDay = day;
	}

// Hide a calendar object
function CalendarPopup_hideCalendar() {
	if (arguments.length > 0) {
		window.popupWindowObjects[arguments[0]].hidePopup();
		}
	else {
		this.hidePopup();
		}
	}

// Refresh the contents of the calendar display
function CalendarPopup_refreshCalendar(index) {
	var calObject = window.popupWindowObjects[index];
	if (arguments.length>1) { 
		calObject.populate(calObject.getCalendar(arguments[1],arguments[2]));
		}
	else {
		calObject.populate(calObject.getCalendar());
		}
	calObject.refresh();
	}

// Populate the calendar and display it
function CalendarPopup_showCalendar(anchorname) {
	this.populate(this.getCalendar());
	this.showPopup(anchorname);
	}

// Get style block needed to display the calendar correctly
function CalendarPopup_getStyles() {
	var result = "";
	result += "<STYLE>\n";
	result += "TD.cal { font-family:arial; font-size: 8pt; }\n";
	result += "TD.calmonth { font-family:arial; font-size: 8pt; text-align: right;}\n";
	result += "TD.caltoday { font-family:arial; font-size: 8pt; text-align: right; color: red; border-width:1; border-type:solid; border-color:#800000; }\n";
	result += "A.cancel { font-family:arial; font-size: 8pt; height: 20px; color: gray; }\n";
	result += "A.cal { text-decoration:none; color:#000000; }\n";
	result += "A.calthismonth { text-decoration:none; color:#000000; font-weight: bold;}\n";
	result += "A.calothermonth { text-decoration:none; color:#808080; }\n";
	result += "</STYLE>\n";
	return result;
	}

// Return a string containing all the calendar code to be displayed
function CalendarPopup_getCalendar() {
	var now = new Date();
	if (arguments.length > 0) { var month = arguments[0]; }
		else { var month = now.getMonth()+1; }
	if (arguments.length > 1) { var year = arguments[1]; }
		else { var year = now.getFullYear(); }
	var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
	if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) { // leap year
		daysinmonth[2] = 29;
		}
	var current_month = new Date(year,month-1,1);
	var display_year = year;
	var display_month = month;
	var display_date = 1;
	var weekday= current_month.getDay();
	var offset = 0;
	if (weekday >= this.weekStartDay) {
		offset = weekday - this.weekStartDay;
		}
	else {
		offset = 7-this.weekStartDay+weekday;
		}
	if (offset > 0) {
		display_month--;
		if (display_month < 1) { display_month = 12; display_year--; }
		display_date = daysinmonth[display_month]-offset+1;
		}
	var next_month = month+1;
	var next_month_year = year;
	if (next_month > 12) { next_month=1; next_month_year++; }
	var last_month = month-1;
	var last_month_year = year;
	if (last_month < 1) { last_month=12; last_month_year--; }
	var date_class;
	var result = "";
	if (this.type == "WINDOW") {
		var windowref = "window.opener.";
		}
	else {
		var windowref = "";
		}
	// If POPUP, write entire HTML document
	if (this.type == "WINDOW") {
		result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
		result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';
		result += '<TR BGCOLOR="#99CCFF">\n';
		result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="http://www.thayerinteractive.com/images/calclose.gif" width="7" height="7" alt="" border="0"></a></TD>\n';
		result += '</TR>\n';
		}
	else {
		result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=1 BORDERCOLOR="#000000" CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">\n';
		// result += '<TR BGCOLOR="#99CCFF">\n';
		// result += ' <TD BGCOLOR="#99CCFF" COLSPAN="3" VALIGN="MIDDLE"><A HREF="#" onClick="cal.hidePopup();return false;"><img src="http://www.thayerinteractive.com/images/calclose.gif" alt="" border="0"></A></TD>\n';
		// result += '</TR>\n';
		result += '<TR><TD ALIGN=CENTER>\n';
		result += '<CENTER>\n';
		result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
		}
	result += '<TR BGCOLOR="#FFFFFF" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#FFFFFF" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="http://www.thayerinteractive.com/images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=100 ALIGN=CENTER>'+this.monthNames[month-1]+' '+year+'</TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="http://www.thayerinteractive.com/images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	result += '<TABLE WIDTH=120 BORDER=1 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	result += '<TR BGCOLOR="#ffffff">\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+1)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+2)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+3)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+4)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+5)%7]+'</TD>\n';
	result += '	<TD CLASS="cal" ALIGN=CENTER WIDTH=14% BGCOLOR="#ffffff">'+this.dayHeaders[(this.weekStartDay+6)%7]+'</TD>\n';
	result += '</TR>\n';
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	for (var row=1; row<=6; row++) {
		result += '<TR>\n';
		for (var col=1; col<=7; col++) {
			if (display_month == month) {
				date_class = "calthismonth";
				}
			else {
				date_class = "calothermonth";
				}
			if ((display_month == now.getMonth()+1) && (display_date==now.getDate()) && (display_year==now.getFullYear())) {
				td_class="caltoday";
				}
			else {
				td_class="calmonth";
				}
			result += '	<TD CLASS="'+td_class+'" ALIGN="CENTER"><A HREF="javascript:'+windowref+this.returnFunction+'('+display_year+','+display_month+','+display_date+');'+windowref+'CalendarPopup_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+display_date+'</A></TD>\n';
			display_date++;
			if (display_date > daysinmonth[display_month]) {
				display_date=1;
				display_month++;
				}
			if (display_month > 12) {
				display_month=1;
				display_year++;
				}
			}
		result += '</TR>';
		}
	result += '<TR><TD COLSPAN=7 ALIGN=CENTER><IMG SRC="images/graypixel.gif" WIDTH=120 HEIGHT=1></TD></TR>\n';
	result += '<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF">\n';
	result += '<TR BGCOLOR="#ffffff" HEIGHT="15">\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+last_month+','+last_month_year+');"><img src="http://www.thayerinteractive.com/images/prevmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=100 ALIGN=CENTER></TD>\n';
	result += '	<TD BGCOLOR="#ffffff" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+'CalendarPopup_refreshCalendar('+this.index+','+next_month+','+next_month_year+');"><img src="http://www.thayerinteractive.com/images/nextmonth.gif" width="13" height="11" alt="" border="0"></A></B></TD>\n';
	result += '</TR></TABLE>\n';
	// result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';
	// result += '<TR>\n';
	// result += '	<TD COLSPAN=7 ALIGN=CENTER>\n';
	// result += '		<A HREF="#" class="cancel" onClick="cal.hidePopup();return false;">Cancel</A>\n';
	// result += '		<BR>\n';
	// result += '	</TD></TR></TABLE>';
	result += '	</CENTER></TD></TR></TABLE>\n';
	if (this.type == "WINDOW") {
		result += "</BODY></HTML>\n";
		}
	return result;
	}
//end//
//anchorposition.js//
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var coordinates = new Object();
	var x=0;
	var y=0;
	// Browser capability sniffing
	var use_gebi = false;
	var use_css = false;
	var use_layers = false;
	if (document.getElementById) { use_gebi = true; }
	else if (document.all) { use_css = true; }
	else if (document.layers) { use_layers = true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o = document.getElementById(anchorname);
		x = o.offsetLeft;
		y = o.offsetTop;
		}
 	else if (use_css) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name == anchorname) {
				found=1;
				break;
				}
			}
		if (found == 0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x = document.anchors[i].x;
		y = document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates = getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x = coordinates.x + window.screenLeft;
			y = coordinates.y + window.screenTop;
			}
		else {
			x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
			y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
			}
		}
	else if (document.all) {
		x = coordinates.x + window.screenLeft;
		y = coordinates.y + window.screenTop;
		}
	else if (document.layers) {
		x = coordinates.x + window.screenX + (window.outerWidth-window.innerWidth) - window.pageXOffset;
		y = coordinates.y + window.screenY + (window.outerHeight-24-window.innerHeight) - window.pageYOffset;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { 
		ol += el.offsetLeft; 
		}
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	var scrollamount = document.body.scrollLeft;
	return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot = el.offsetTop;
	while((el = el.offsetParent) != null) { 
		ot += el.offsetTop; 
		}
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	var scrollamount = document.body.scrollTop;
	return AnchorPosition_getPageOffsetTop(el)-scrollamount;
	}


