ObjectTools = new function(){	 
	this.classes = { 
		AgentThumb : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					if(this.getAttribute('contactlink')) window.location = this.getAttribute('contactlink'); 
					else window.location = "agent_"+this.getAttribute('agentid')+".html"; 
					 
					 
				}; 
			} 
		},  
		AgentThumbImg : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		AgentThumbImgStatic : { 
			mixins: ["OpacityElement"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		AlphaRollover : { 
			mixins: ["MouseEventElement", "OpacityElement"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onmouseout = function(e){ 
				 
				 
				 
					try{ 
						if(this.checkMouseOut(e)){ 
						EaseManager.createEase({ 
							subject:this, 
							getter:"getOpacity", 
							setter:"setOpacity", 
							end: 1, 
							seconds: 0.5, 
							allowFractions: true 
						}); 
						} 
					}catch(e){ 
						this.handleError("onmouseout",e,arguments); 
					}; 
				};	 
				this.onmouseover = function(e){ 
				 
				 
				 
					try{ 
						if(this.checkMouseOver(e)){ 
						EaseManager.createEase({ 
							subject:this, 
							getter:"getOpacity", 
							setter:"setOpacity", 
							end:0.7, 
							seconds: 0.5, 
							allowFractions: true 
						}); 
						} 
					}catch(e){ 
						this.handleError("onmouseover",e,arguments); 
					}; 
				}; 
			} 
		},  
		AnimationBroadcaster : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.animationInterval = false; 
					 
				this.FRAME_RATE = 20; 
					 
				this.listeners = []; 
				 	 
				this.activateBroadcaster = function(){ 
				 
				 
				 
					try{ 
						TimeoutManager.setTimeout(this,"broadcast",Math.floor(1000/this.FRAME_RATE),true); 
					}catch(e){ 
						this.handleError("activateBroadcaster",e,arguments); 
					}; 
				};	 
				this.addListener = function(obj, functionName){ 
				 
				 
				 
					try{ 
						this.removeListener(obj,functionName); 
						this.listeners.push({obj:obj,functionName:functionName}); 
						if(!this.animationInterval) this.activateBroadcaster(); 
					}catch(e){ 
						this.handleError("addListener",e,arguments); 
					}; 
				};	 
				this.broadcast = function(){ 
				 
				 
				 
					try{ 
						for(var i=0; i<this.listeners.length; i++){ 
							this.listeners[i].obj[this.listeners[i].functionName]();	 
						} 
						 
					}catch(e){ 
						this.handleError("broadcast",e,arguments); 
					}; 
				};	 
				this.deactivateBroadcaster = function(){ 
				 
				 
				 
					try{ 
						TimeoutManager.clearTimeout(this,"broadcast"); 
						 
					}catch(e){ 
						this.handleError("deactivateBroadcaster",e,arguments); 
					}; 
				};	 
				this.removeListener = function(obj, functionName){ 
				 
				 
				 
					try{ 
						for(var i=0; i<this.listeners.length; i++){ 
							if(this.listeners[i].obj == obj && this.listeners[i].functionName == functionName){ 
								this.listeners.splice(i,1); 
								i--; 
							} 
						} 
						if(this.listeners.length==0) this.deactivateBroadcaster(); 
					}catch(e){ 
						this.handleError("removeListener",e,arguments); 
					}; 
				}; 
			} 
		},  
		Binding : { 
			mixins: ["Event"], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
			 	 
				this.addBinding = function(l){ 
				 
				 
				 
					if(!l.func) l.func = l.obj.modelChanged; 
					this.listeners.push(l); 
					l.obj.modelChanged(); 
					 
				};	 
				this.set = function(obj, property, value){ 
				 
				 
				 
					var e = { 
					        obj: obj, 
					        property: property, 
					        oldValue: obj[property], 
					        newValue: value 
					} 
					obj[property] = value; 
					this.broadcast(e); 
					 
				}; 
			} 
		},  
		BrowserDetect : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.dataBrowser = [ 
						{ 
							string: navigator.userAgent, 
							subString: "Chrome", 
							identity: "Chrome" 
						}, 
						{ 	string: navigator.userAgent, 
							subString: "OmniWeb", 
							versionSearch: "OmniWeb/", 
							identity: "OmniWeb" 
						}, 
						{ 
							string: navigator.vendor, 
							subString: "Apple", 
							identity: "Safari", 
							versionSearch: "Version" 
						}, 
						{ 
							prop: window.opera, 
							identity: "Opera" 
						}, 
						{ 
							string: navigator.vendor, 
							subString: "iCab", 
							identity: "iCab" 
						}, 
						{ 
							string: navigator.vendor, 
							subString: "KDE", 
							identity: "Konqueror" 
						}, 
						{ 
							string: navigator.userAgent, 
							subString: "Firefox", 
							identity: "Firefox" 
						}, 
						{ 
							string: navigator.vendor, 
							subString: "Camino", 
							identity: "Camino" 
						}, 
						{		// for newer Netscapes (6+) 
							string: navigator.userAgent, 
							subString: "Netscape", 
							identity: "Netscape" 
						}, 
						{ 
							string: navigator.userAgent, 
							subString: "MSIE", 
							identity: "Explorer", 
							versionSearch: "MSIE" 
						}, 
						{ 
							string: navigator.userAgent, 
							subString: "Gecko", 
							identity: "Mozilla", 
							versionSearch: "rv" 
						}, 
						{ 		// for older Netscapes (4-) 
							string: navigator.userAgent, 
							subString: "Mozilla", 
							identity: "Netscape", 
							versionSearch: "Mozilla" 
						} 
					]; 
					 
				this.dataOS = [ 
						{ 
							string: navigator.platform, 
							subString: "Win", 
							identity: "Windows" 
						}, 
						{ 
							string: navigator.platform, 
							subString: "Mac", 
							identity: "Mac" 
						}, 
						{ 
							   string: navigator.userAgent, 
							   subString: "iPhone", 
							   identity: "iPhone/iPod" 
					    }, 
						{ 
							string: navigator.platform, 
							subString: "Linux", 
							identity: "Linux" 
						} 
					] 
				; 
				 	 
				this.init = function(){ 
				 
				 
				 
					this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; 
							this.version = this.searchVersion(navigator.userAgent) 
								|| this.searchVersion(navigator.appVersion) 
								|| "an unknown version"; 
							this.OS = this.searchString(this.dataOS) || "an unknown OS"; 
					 
					 
				};	 
				this.searchString = function(data){ 
				 
				 
				 
					for (var i=0;i<data.length;i++)	{ 
								var dataString = data[i].string; 
								var dataProp = data[i].prop; 
								this.versionSearchString = data[i].versionSearch || data[i].identity; 
								if (dataString) { 
									if (dataString.indexOf(data[i].subString) != -1) 
										return data[i].identity; 
								} 
								else if (dataProp) 
									return data[i].identity; 
							} 
					 
				};	 
				this.searchVersion = function(dataString){ 
				 
				 
				 
					var index = dataString.indexOf(this.versionSearchString); 
							if (index == -1) return; 
							return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); 
					 
				}; 
			} 
		},  
		Cookies : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
			 	 
				this.clear = function(name){ 
				 
				 
				 
					createCookie(name,"",-1); 
					 
				};	 
				this.get = function(name){ 
				 
				 
				 
					var nameEQ = name + "="; 
					var ca = document.cookie.split(';'); 
					for(var i=0;i < ca.length;i++) { 
						var c = ca[i]; 
						while (c.charAt(0)==' ') c = c.substring(1,c.length); 
						if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 
					} 
					return null; 
					 
				};	 
				this.set = function(name, value, days){ 
				 
				 
				 
					if(days){ 
					var date = new Date(); 
					date.setTime(date.getTime()+(days*24*60*60*1000)); 
					var expires = "; expires="+date.toGMTString(); 
					} 
					else var expires = ""; 
					document.cookie = name+"="+value+expires+"; path=/"; 
					 
				}; 
			} 
		},  
		Ease : { 
			mixins: [], 
			singleton: false, 
			domElement: false, 
			constructor: function(){ 
				 
				this.easeParams = null; 
					 
				this.frameCounter = null; 
				 	 
				this.enterFrame = function(){ 
				 
				 
				 
					try{ 
						var easeParams = this.easeParams; 
						 
						//Figure out the end value (this may change from frame to frame). 
						var endValue; 
						if(easeParams.endObjectGetter){ 
							endValue = easeParams.endObject[easeParams.endObjectGetter](); 
						}else{ 
							endValue = easeParams.endObject[easeParams.endProperty]; 
						} 
						 
						endValue = parseFloat(endValue); 
						 
						//Figure out the current value. 
						var currentValue = easeParams.easeFunction( 
						this.frameCounter, 
						easeParams.beginning, 
						endValue-easeParams.beginning, 
						easeParams.frames 
						); 
						if(!easeParams.allowFractions) currentValue = Math.floor(currentValue); 
						if(easeParams.unit) currentValue += easeParams.unit; 
						 
						//Set the current value. 
						if(easeParams.setter){ 
						easeParams.subject[easeParams.setter](currentValue); 
						}else{ 
						easeParams.subject[easeParams.property] = currentValue; 
						} 
						 
						//Stop the ease if it is that time. 
						if (this.frameCounter == easeParams.frames) { 
						EaseManager.removeEase(easeParams); 
						if (easeParams.callback) easeParams.callbackObject[easeParams.callback](); 
						} 
						 
						this.frameCounter++; 
						 
					}catch(e){ 
						this.handleError("enterFrame",e,arguments); 
					}; 
				};	 
				this.setParameters = function(easeParams){ 
				 
				 
				 
					try{ 
						this.easeParams = easeParams; 
						 
						//Set up the beginning value. 
						if(easeParams.beginning==undefined){ 
							if(easeParams.getter){ 
								easeParams.beginning = parseFloat(easeParams.subject[easeParams.getter]()); 
							}else{ 
								easeParams.beginning = parseFloat(easeParams.subject[easeParams.property]);	 
							} 
							if(!easeParams.beginning) easeParams.beginning = 0; 
						} 
						 
						//Set up the end object. 
						if(!easeParams.endObject){ 
							if(easeParams.endProperty){ 
								easeParams.endObject = easeParams.subject; 
							}else{ 
								easeParams.endObject = {endProperty:easeParams.end}; 
								easeParams.endProperty = "endProperty"; 
							} 
						} 
						 
						//Default callback object is the subject. 
						if(!easeParams.callbackObject) easeParams.callbackObject = easeParams.subject; 
						 
						//Default ease function is easeOutSine. 
						if(!easeParams.easeFunction) easeParams.easeFunction = EaseFunctions.easeOutSine; 
						 
						//Figure frames from seconds or set to default value. 
						if(!easeParams.frames){ 
							if(easeParams.seconds) easeParams.frames = Math.floor(easeParams.seconds*AnimationBroadcaster.FRAME_RATE); 
							else easeParams.frames = 16; 
						} 
						 
						//Set the subject to the beginning, in case it is not already there. 
						this.enterFrame(); 
					}catch(e){ 
						this.handleError("setParameters",e,arguments); 
					}; 
				}; 
			} 
		},  
		EaseFunctions : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
			 	 
				this.easeInLinear = function(t, b, c, d){ 
				 
				 
				 
					try{ 
						if(t==d) return b+c; 
						return c*t/d+b; 
					}catch(e){ 
						this.handleError("easeInLinear",e,arguments); 
					}; 
				};	 
				this.easeInSine = function(t, b, c, d){ 
				 
				 
				 
					try{ 
						if(t==d) return b+c; 
						return -c*Math.cos(t/d*(Math.PI/2))+c+b; 
					}catch(e){ 
						this.handleError("easeInSine",e,arguments); 
					}; 
				};	 
				this.easeOutLinear = function(t, b, c, d){ 
				 
				 
				 
					try{ 
						if(t==d) return b+c; 
						return c*t/d+b; 
					}catch(e){ 
						this.handleError("easeOutLinear",e,arguments); 
					}; 
				};	 
				this.easeOutSine = function(t, b, c, d){ 
				 
				 
				 
					try{ 
						if(t==d) return b+c; 
						return c*Math.sin(t/d*(Math.PI/2))+b; 
					}catch(e){ 
						this.handleError("easeOutSine",e,arguments); 
					}; 
				}; 
			} 
		},  
		EaseManager : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.eases = []; 
				 	 
				this.createEase = function(easeParams){ 
				 
				 
				 
					try{ 
						this.removeEase(easeParams); 
						var ease = ObjectTools.createFromClass("Ease"); 
						ease.setParameters(easeParams); 
						this.eases.push(ease); 
						AnimationBroadcaster.addListener(ease,'enterFrame'); 
						return ease; 
					}catch(e){ 
						this.handleError("createEase",e,arguments); 
					}; 
				};	 
				this.removeEase = function(easeParams){ 
				 
				 
				 
					try{ 
						for(var i=0; i<this.eases.length;i++){ 
							var ease = this.eases[i]; 
							//If the subject matches and either the property or setter matches, 
							//then remove the ease. 
							if(ease.easeParams.subject==easeParams.subject 
							   && ( 
							   easeParams.property && easeParams.property==ease.easeParams.property || 
							   easeParams.setter && easeParams.setter==ease.easeParams.setter 
							   ) 
							){ 
								AnimationBroadcaster.removeListener(ease,'enterFrame'); 
								this.eases.splice(i,1); 
								 
								//there should only ever be one ease to remove 
								break; 
							} 
						} 
					}catch(e){ 
						this.handleError("removeEase",e,arguments); 
					}; 
				}; 
			} 
		},  
		Event : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.listeners = []; 
				 	 
				this.addListener = function(listener){ 
				 
				 
				 
					this.listeners.push(listener); 
				};	 
				this.broadcast = function(e){ 
				 
				 
				 
					var l = this.listeners; 
					for(var i=0; i<l.length; i++){ 
					      if(!l[i].test || l[i].test(e)) l[i].func.call(l[i].obj,e); 
					} 
				};	 
				this.removeListener = function(listener){ 
				 
				 
				 
					var l = this.listeners; 
					for(var i=0; i<l.length; i++){ 
					if(l[i].obj==listener.obj && l[i].func==listener.func) l.splice(i,1); 
					} 
				}; 
			} 
		},  
		EventBroadcaster : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
				 
				this.eventRegistry = {}; 
				 	 
				this.addListener = function(listenerObject, eventType){ 
				 
				 
				 
					try{ 
						if(!this.eventRegistry[eventType]) this.eventRegistry[eventType] = []; 
						this.eventRegistry[eventType].push(listenerObject); 
					}catch(e){ 
						this.handleError("addListener",e,arguments); 
					}; 
				};	 
				this.broadcast = function(eventType, eventObject){ 
				 
				 
				 
					try{ 
						if(this.eventRegistry[eventType]){ 
							for(var i=0;i<this.eventRegistry[eventType].length;i++){ 
								this.eventRegistry[eventType][i][eventType](eventObject); 
							} 
						} 
					}catch(e){ 
						this.handleError("broadcast",e,arguments); 
					}; 
				};	 
				this.removeListener = function(listenerObject, eventType){ 
				 
				 
				 
					try{ 
						if(this.eventRegistry[eventType]){ 
							for(var i=0; i<this.eventRegistry[eventType].length; i++) { 
								if(this.eventRegistry[eventType][i]==listenerObject) { 
								this.eventRegistry[eventType].splice(i,1); 
								} 
							} 
						} 
					}catch(e){ 
						this.handleError("removeListener",e,arguments); 
					}; 
				}; 
			} 
		},  
		FeaturedImage : { 
			mixins: ["OpacityElement"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					window.location = "real_estate_listing_"+this.getAttribute("listing")+".html"; 
				}; 
			} 
		},  
		FeaturedImageImg : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this.parentNode, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
					 
				}; 
			} 
		},  
		FormCheckbox : { 
			mixins: ["FormInput"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.getValue = function(){ 
				 
				 
				 
					try{ 
						return this.checked; 
						 
					}catch(e){ 
						this.handleError("getValue",e,arguments); 
					}; 
				}; 
			} 
		},  
		FormInput : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.getForm = function(){ 
				 
				 
				 
					try{ 
						return ObjectTools.getAncestor(this,function(node){ 
						if(node.nodeName=="FORM") return true; 
						}); 
					}catch(e){ 
						this.handleError("getForm",e,arguments); 
					}; 
				};	 
				this.getValue = function(){ 
				 
				 
				 
					try{ 
						return this.value; 
					}catch(e){ 
						this.handleError("getValue",e,arguments); 
					}; 
				}; 
			} 
		},  
		FormTextarea : { 
			mixins: ["FormInput"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.getValue = function(){ 
				 
				 
				 
					try{ 
						return this.firstChild.nodeValue; 
					}catch(e){ 
						this.handleError("getValue",e,arguments); 
					}; 
				}; 
			} 
		},  
		FullscreenManager : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.abs = ["ExitFullscreenSmall","ExitFullscreen","Controls","ControlsInside","Map","ResultList"]; 
					 
				this.es = []; 
					 
				this.hide = ["Instructions","Header","Footer","Page"]; 
				 	 
				this.doLayout = function(){ 
				 
				 
				 
					var v = Viewport.getSize(); 
					 
					mmw = 620; 
					 
					var h = 162; 
					 
					var tw = 320; 
					 
					var mh = 512; 
					 
					var cw = 496; 
					 
					this.es.Body.style.height = v.h+"px"; 
					 
					var v = Viewport.getSize(); 
					 
					if(v.w<1123){ 
					this.es.ExitFullscreen.style.display="none"; 
					this.es.ExitFullscreenSmall.style.display="block"; 
					}else{ 
					this.es.ExitFullscreen.style.display="block"; 
					this.es.ExitFullscreenSmall.style.display="none"; 
					} 
					 
					var cols = v.w<1418 ? 1 : parseInt((v.w-755)/tw); 
					 
					var rw = cols*tw+24; 
					 
					var mw = Math.max(mmw,v.w-rw-16); 
					 
					var mh = v.h-h-32; 
					 
					var template = { 
					"ExitFullscreenSmall": { 
					top: 32, 
					left: 32  
					}, 
					"Controls": { 
					top: 16, 
					left: 16, 
					width: mw+2, 
					height: h 
					}, 
					"ExitFullscreen":{ 
					top: 32, 
					left: 16 
					}, 
					"ControlsInside":{ 
					top: 16, 
					width: cw, 
					left: mw-cw 
					}, 
					"Map": { 
					top: h+16, 
					left: 0, 
					width: mw, 
					height: mh 
					}, 
					"ResultList": { 
					top: 0, 
					left: mw+16, 
					width: rw, 
					height: v.h 
					} 
					} 
					 
					for(var id in template){ 
					var s = template[id]; 
					for(var property in s){ 
					this.es[id].style[property]=s[property]+"px"; 
					} 
					} 
					 
				};	 
				this.exitFullscreen = function(){ 
				 
				 
				 
					 
					 
				};	 
				this.goFullscreen = function(){ 
				 
				 
				 
					var l = this.abs; 
					var e; 
					for(var i=0; i<l.length; i++){ 
					e = document.getElementById(l[i]); 
					e.style.position = "absolute"; 
					e.style.top = "0px"; 
					e.style.left = "0px"; 
					e.style.visibility = "visible"; 
					this.es[l[i]] = e; 
					} 
					 
					l = this.hide; 
					for(var i=0; i<l.length; i++){ 
					e = document.getElementById(l[i]); 
					e.style.visibility = "hidden"; 
					this.es[l[i]] = e; 
					} 
					 
					this.es.ResultList.style.overflow = "auto"; 
					 
					var s = this.es.Controls.style; 
					s.backgroundImage = "url(resources/images/mls_background.gif)"; 
					s.backgroundRepeat = "no-repeat"; 
					s.backgroundPosition = "bottom right"; 
					 
					this.es.Body = document.getElementsByTagName("body")[0]; 
					e.scroll="no"; 
					s = e.style; 
					//s.overflow = "hidden"; 
					s.backgroundImage = "none"; 
					s.backgroundColor = "#ffffff"; 
					 
					s = document.getElementsByTagName("html")[0].style; 
					s.backgroundImage = "none"; 
					s.backgroundColor = "#ffffff"; 
					 
					Viewport.addListener({ 
					fn: this.doLayout, 
					scope: this 
					}); 
					 
					this.doLayout(); 
					 
				};	 
				this.init = function(){ 
				 
				 
				 
					if(typeof(RestoreQuery)=="object" && RestoreQuery.query.fullscreen) this.goFullscreen(); 
					 
				}; 
			} 
		},  
		H1 : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.init = function(){ 
				 
				 
				 
					var img = document.createElement("img"); 
					 
					img.setAttribute("src","resources/text.php?text="+escape(this.innerHTML)+"&font=corbel&color=0088A8&size=24&pad_right=16"); 
					 
					this.innerHTML = ""; 
					 
					this.appendChild(img); 
				}; 
			} 
		},  
		H2 : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.init = function(){ 
				 
				 
				 
					var img = document.createElement("img"); 
					 
					img.setAttribute("src","resources/text.php?text="+escape(this.innerHTML)+"&font=corbel&color=0088A8&size=18&pad_right=16&pad_bottom=8"); 
					 
					this.innerHTML = ""; 
					 
					this.appendChild(img); 
				}; 
			} 
		},  
		IdxImageManager : { 
			mixins: ["RemoteBoat"], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.images = []; 
				 	 
				this.activate = function(){ 
				 
				 
				 
					this.isActivated = true; 
					this.checkImages(); 
					 
				};	 
				this.checkImages = function(){ 
				 
				 
				 
					if(!this.isActivated) return; 
					 
					TimeoutManager.setDelay({ 
					id: "idx_image_manager", 
					fn: this.checkImagesNow, 
					scope: this, 
					seconds: 2 
					}); 
					 
				};	 
				this.checkImagesNow = function(){ 
				 
				 
				 
					var imageNames = []; 
					for(var i=0; i<this.images.length; i++){ 
					imageNames.push(this.images[i].image);	 
					} 
					 
					this.sendRequest({ 
					url: 'check_idx_images.php', 
					query: 'images='+imageNames.join(","), 
					callbackObject: this, 
					callback: "handleResponse", 
					responseFormat: "json" 
					}); 
					 
				};	 
				this.clearImages = function(){ 
				 
				 
				 
					this.images = []; 
				};	 
				this.handleResponse = function(response){ 
				 
				 
				 
					for(var i=0; i<this.images.length;){ 
					var image = this.images[i]; 
					var r = response[image.image]; 
					if(r && r.status == "2"){ 
					image.e.setImage(image); 
					this.images.splice(i,1); 
					}else{ 
					i++; 
					} 
					} 
					 
					if(this.images.length==0){ 
					this.isActivated = false;	 
					}else{ 
					this.checkImages(); 
					} 
					 
				};	 
				this.registerImage = function(p){ 
				 
				 
				 
					this.images.push(p); 
					this.activate(); 
					 
				}; 
			} 
		},  
		ImageLoader : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.isActive = false; 
					 
				this.parallel = 4; 
					 
				this.queue = []; 
					 
				this.timeout = 4000; 
				 	 
				this.activate = function(){ 
				 
				 
				 
					try{ 
						this.isActive = true; 
						this.update(); 
						 
						//its safe to do this even if there is a timeout set already 
						//timeoutmanager limits to one timeout per object per function 
						//TimeoutManager.setTimeout(this,'update',1000); 
						 
						 
					}catch(e){ 
						this.handleError("activate",e,arguments); 
					}; 
				};	 
				this.load = function(element, filename){ 
				 
				 
				 
					try{ 
						//add to queue 
						this.queue.push({ 
						element: element, 
						filename: filename, 
						added: new Date() 
						}); 
						 
						//activate loader 
						this.activate(); 
						 
					}catch(e){ 
						this.handleError("load",e,arguments); 
					}; 
				};	 
				this.reportComplete = function(item){ 
				 
				 
				 
					try{ 
						//remove the item from the queue 
						for(var i=this.queue.length-1; i>=0; i--){ 
							if(this.queue[i]==item){ 
								this.queue.splice(i,1); 
							} 
						} 
						 
						//update the queue if the loader is active 
						if(this.isActive) this.update(); 
						 
					}catch(e){ 
						this.handleError("reportComplete",e,arguments); 
					}; 
				};	 
				this.update = function(){ 
				 
				 
				 
					try{ 
						for(var i=0; i<this.parallel; i++){ 
							var item = this.queue[i]; 
							var el = item.element; 
							var filename = item.filename; 
							if(el.src!=filename){ 
								el.loaderQueueItem = item; 
						                el.onload = function(){ 
									ImageLoader.reportComplete(this.loaderQueueItem); 
						                        if(this.onLoadComplete) this.onLoadComplete(); 
								}; 
								el.src = filename; 
							} 
						} 
						 
						 
					}catch(e){ 
						this.handleError("update",e,arguments); 
					}; 
				}; 
			} 
		},  
		IndexListingThumbImg : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		Layout : { 
			mixins: ["EventBroadcaster"], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.allowErrors = true; 
				 	 
				this.getSize = function(){ 
				 
				 
				 
					try{ 
						var s = {}; 
						 
						//viewport size 
						if (window.innerHeight) // all except Explorer 
						{ 
						    s.vw = window.innerWidth-18; 
						    s.vh = window.innerHeight; 
						} 
						else if (document.documentElement && document.documentElement.clientHeight) 
						// Explorer 6 Strict Mode 
						{ 
						    s.vw = document.documentElement.clientWidth; 
						    s.vh = document.documentElement.clientHeight; 
						} 
						else if (document.body) // other Explorers 
						{ 
						    s.vw = document.body.clientWidth; 
						    s.vh = document.body.clientHeight; 
						} 
						 
						//page size  
						s.pw = Math.max(s.vw,document.body.scrollWidth); 
						s.ph = Math.max(s.vh,document.body.scrollHeight); 
						 
						//scroll position 
						if (self.pageYOffset) // all except Explorer 
						{ 
							s.sx = self.pageXOffset; 
							s.sy = self.pageYOffset; 
						} 
						else if (document.documentElement && document.documentElement.scrollTop) 
							// Explorer 6 Strict 
						{ 
							s.sx = document.documentElement.scrollLeft; 
							s.sy = document.documentElement.scrollTop; 
						} 
						else if (document.body) // all other Explorers 
						{ 
							s.sx = document.body.scrollLeft; 
							s.sy = document.body.scrollTop; 
						} 
						 
						return s; 
						 
					}catch(e){ 
						this.handleError("getSize",e,arguments); 
					}; 
				};	 
				this.init = function(){ 
				 
				 
				 
					try{ 
						window.onresize = function(){ 
							Layout.onResize(); 
						}; 
						window.onscroll = function(){ 
							Layout.onScroll(); 
						}; 
						window.onunload = function(){ 
							Layout.onUnload(); 
						};  
						 
					}catch(e){ 
						this.handleError("init",e,arguments); 
					}; 
				};	 
				this.onResize = function(s){ 
				 
				 
				 
					try{ 
						var s = this.getSize(); 
						this.broadcast("onResize",s); 
						 
					}catch(e){ 
						this.handleError("onResize",e,arguments); 
					}; 
				};	 
				this.onScroll = function(){ 
				 
				 
				 
					try{ 
						var s = this.getSize(); 
						this.broadcast("onScroll",s); 
					}catch(e){ 
						this.handleError("onScroll",e,arguments); 
					}; 
				};	 
				this.onUnload = function(){ 
				 
				 
				 
					try{ 
						TimeoutManager.clearAllTimeouts(); 
						 
					}catch(e){ 
						this.handleError("onUnload",e,arguments); 
					}; 
				}; 
			} 
		},  
		ListingAgentThumb : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					window.location = "contact_"+this.getAttribute("agentid")+"_"+this.getAttribute("listingid")+".html"; 
				}; 
			} 
		},  
		ListingAgentThumbImg : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		ListingDetailThumb : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					ListingImageBox.setImage(this.getAttribute("image_number")); 
				}; 
			} 
		},  
		ListingDetailThumbImg : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.init = function(){ 
				 
				 
				 
					if(this.getAttribute("idx")){ 
					IdxImageManager.registerImage({ 
					e: this, 
					image: this.getAttribute("image"), 
					folder: this.getAttribute("folder"), 
					status: this.getAttribute("status") 
					}); 
					} 
					 
				};	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this.parentNode, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
					 
					 
				};	 
				this.setImage = function(p){ 
				 
				 
				 
					this.src = "idx_detail_thumb_"+p.folder+"_"+p.image; 
					 
				}; 
			} 
		},  
		ListingImageBox : { 
			mixins: [], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.setImage = function(imageNumber){ 
				 
				 
				 
					//delete the old image 
					this.firstChild.removeChild(this.firstChild.firstChild); 
					 
					//add the new one 
					var newImg = ObjectTools.createDomElementFromClass("img","ListingLargeImageImg"); 
					 
					this.firstChild.appendChild(newImg); 
					 
					if(this.getAttribute("service")=="idx"){ 
						this.firstChild.firstChild.setAttribute("src","idx_large_"+this.getAttribute("folder")+"_"+this.getAttribute("listing")+"_"+imageNumber+".jpg"); 
					}else{ 
						this.firstChild.firstChild.setAttribute("src","listing_detail_large_image/"+this.getAttribute("listing")+"_"+imageNumber+".jpg"); 
					} 
					 
					 
				}; 
			} 
		},  
		ListingLargeImageImg : { 
			mixins: ["OpacityElement"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.init = function(){ 
				 
				 
				 
					if(this.getAttribute("idx")){ 
					IdxImageManager.registerImage({ 
					e: this, 
					image: this.getAttribute("image"), 
					folder: this.getAttribute("folder"), 
					status: this.getAttribute("status") 
					}); 
					} 
				};	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				};	 
				this.setImage = function(p){ 
				 
				 
				 
					this.src = "idx_large_"+p.folder+"_"+p.image; 
				}; 
			} 
		},  
		ListingThumb : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					window.location = "real_estate_listing_"+this.getAttribute('listingid')+".html"; 
				}; 
			} 
		},  
		ListingThumbImg : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		Logger : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.handleError = function(functionName, e, args){ 
				 
				 
				 
					if(true){ 
						 
					//The arguments object does not have a join method, even though it acts like an array.  It needs one. 
					args.join = [].join; 
					 
					var message = this.clazz+"."+functionName+"("+args.join(", ")+"): "+e.message+". "; //+line; 
					try{  
						console.log(message); 
					}catch(e){ 
						//alert(message); 
					} 
					 
					} 
				};	 
				this.log = function(message){ 
				 
				 
				 
					message = this.clazz+": "+message; 
					try{  
						console.log(message); 
					}catch(e){ 
						var body = document.getElementsByTagName('body')[0]; 
						body.appendChild(document.createTextNode(message)); 
						body.appendChild(document.createElement('br')); 
					} 
					 
				};	 
				this.logFunctionCall = function(functionName, args){ 
				 
				 
				 
					//The arguments object does not have a join method, even though it acts like an array.  It needs one. 
					args.join = [].join; 
					 
					this.log(functionName+"("+args.join(", ")+")"); 
					 
				}; 
			} 
		},  
		Map : { 
			mixins: ["Logger"], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
				 
				this.markers = []; 
				 	 
				this.add = function(listing){ 
				 
				 
				 
					var marker = new google.maps.Marker({ 
					position: new google.maps.LatLng(listing.latitude,listing.longitude),  
					map: this.map,  
					title: listing.address, 
					icon: "resources/images/"+listing.letter+".gif" 
					//clickable: true 
					}); 
					/* 
					google.maps.event.addListener(marker, 'click', function(){ 
					switch(listing.service){ 
					 
					case 'carvill': 
					window.location = "real_estate_listing_"+listing.id+".html"; 
					break; 
					 
					case 'idx': 
					window.location = "real_estate_idx_"+listing.id+".html"; 
					break; 
					 
					} 
					}); 
					*/ 
					this.markers.push(marker); 
					 
				};	 
				this.clear = function(){ 
				 
				 
				 
					for(var i=0; i<this.markers.length; i++){ 
					this.markers[i].setMap(null); 
					} 
					this.markers = []; 
					 
				};	 
				this.init = function(){ 
				 
				 
				 
					this.geocoder = new google.maps.Geocoder(); 
					 
					this.map = new google.maps.Map(this,{ 
					zoom: RestoreQuery.map.zoom, 
					center: new google.maps.LatLng(RestoreQuery.map.latitude, RestoreQuery.map.longitude), 
					mapTypeId: google.maps.MapTypeId.ROADMAP 
					}); 
					 
					try{ 
					console.log("inited map"); 
					}catch(e){ 
					 
					} 
					 
					Search.handleResponse(RestoreQuery); 
					 
					//redo the search when the bounds change 
					TimeoutManager.setDelay({ 
					id: "add_map_listener", 
					scope: this, 
					fn: function(){ 
					google.maps.event.addListener(this.map, 'bounds_changed', function(){ 
					TimeoutManager.setTimeout(Search,"doSearch",1000); 
					}); 
					}, 
					seconds: 1 
					}); 
					 
					 
				}; 
			} 
		},  
		MouseEventElement : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.checkMouseOut = function(event){ 
				 
				 
				 
					try{ 
						if (!event) var event = window.event; 
						if (!event){ 
							this.log("No event object available"); 
							return true; 
						} 
						var target = window.event ? event.srcElement : event.target; 
						 
						var relatedTarget = event.relatedTarget ? event.relatedTarget : event.toElement; 
						 
						while (relatedTarget && relatedTarget.nodeName != 'BODY'){ 
							if(relatedTarget==this) return false; 
							relatedTarget = relatedTarget.parentNode; 
						} 
						return true; 
						 
						 
					}catch(e){ 
						this.handleError("checkMouseOut",e,arguments); 
					}; 
				};	 
				this.checkMouseOver = function(event){ 
				 
				 
				 
					try{ 
						if (!event) var event = window.event; 
						var target = (window.event) ? event.srcElement : event.target; 
						var relatedTarget = (event.relatedTarget) ? event.relatedTarget : event.fromElement; 
						 
						while (relatedTarget && relatedTarget.nodeName != 'BODY'){ 
							if(relatedTarget==this) return false; 
							relatedTarget = relatedTarget.parentNode; 
						} 
						return true; 
						 
						 
					}catch(e){ 
						this.handleError("checkMouseOver",e,arguments); 
					}; 
				};	 
				this.getEventTarget = function(e){ 
				 
				 
				 
					try{ 
						//Credit Peter-Paul Koch 
						//quirksmode.org 
						var target; 
						if (!e) var e = window.event; 
						if (e.target) target = e.target; 
						else if (e.srcElement) target = e.srcElement; 
						if (target.nodeType == 3) // defeat Safari bug 
							target = target.parentNode; 
						return target; 
					}catch(e){ 
						this.handleError("getEventTarget",e,arguments); 
					}; 
				}; 
			} 
		},  
		ObjectTools : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
			 	 
				this.arraySelect = function(arr, match){ 
				 
				 
				 
					try{ 
						result = []; 
						for(var i=0; i<arr.length; i++){ 
							if(match(arr[i])) result.push(arr[i]); 
						} 
						return result; 
						 
					}catch(e){ 
						this.handleError("arraySelect",e,arguments); 
					}; 
				};	 
				this.contains = function(needle, haystack){ 
				 
				 
				 
					try{ 
						for(var i=0; i<haystack.length; i++){ 
							if(needle==haystack[i]) return true; 
						} 
						return false; 
						 
						 
					}catch(e){ 
						this.handleError("contains",e,arguments); 
					}; 
				};	 
				this.createDomElementFromClass = function(nodeName, className){ 
				 
				 
				 
					try{ 
						var e = document.createElement(nodeName); 
							e.className = className; 
							ObjectTools.mixIn(e,className); 
							if(e.init) e.init(); 
						return e; 
						 
					}catch(e){ 
						this.handleError("createDomElementFromClass",e,arguments); 
					}; 
				};	 
				this.createFromClass = function(name){ 
				 
				 
				 
					try{ 
						var c = this.classes[name]; 
						var o = new c.constructor(); 
						o.clazz = name; 
						for(var i=0; i<c.mixins.length; i++){ 
							this.mixIn(o,c.mixins[i]); 
						} 
						if(!o.log) this.mixIn(o,"Logger"); 
						return o; 
						 
					}catch(e){ 
						this.handleError("createFromClass",e,arguments); 
					}; 
				};	 
				this.getAncestor = function(node, match){ 
				 
				 
				 
					try{ 
						if(match(node)) return node; 
						if(node.parentNode) return this.getAncestor(node.parentNode,match); 
						 
					}catch(e){ 
						this.handleError("getAncestor",e,arguments); 
					}; 
				};	 
				this.getKeys = function(obj){ 
				 
				 
				 
					try{ 
						var keys = []; 
						for(key in obj){ 
							keys.push(key); 
						} 
						return keys; 
					}catch(e){ 
						this.handleError("getKeys",e,arguments); 
					}; 
				};	 
				this.hasKey = function(obj, key){ 
				 
				 
				 
					try{ 
						for(aKey in obj){ 
							if(aKey == key) return true; 
						} 
						return false; 
					}catch(e){ 
						this.handleError("hasKey",e,arguments); 
					}; 
				};	 
				this.init = function(){ 
				 
				 
				 
					var domMixins = []; 
					 
					var inits = []; 
					 
					for(var name in this.classes){ 
						var c = this.classes[name]; 
						//Find the singletons, instantiate or mix in to dom elements as appropriate. 
						if(c.singleton){ 
							if(c.domElement){ 
								var e = document.getElementById(name); 
								if(e){ 
									ObjectTools.mixIn(e,name); 
									window[name] = e; 
								} 
							}else{ 
								if(name!=this.clazz){ 
									window[name] = this.createFromClass(name); 
								} 
								 
							} 
							if(window[name] && window[name].init && name!=this.clazz) inits.push(window[name]); 
						}else{ 
							if(c.domElement){ 
								domMixins.push({ 
									name: name, 
									regex: new RegExp("^(.*? )?"+name+"( .*?)?$") 
								}); 
							}else{ 
								//Do nothing. 
							} 
						} 
					} 
					 
					//Scan the document and mix in classes based on class names. 
					var elements = document.getElementsByTagName("*"); 
					for(var i=0; i<elements.length; i++){ 
						var e = elements[i]; 
						if(e.className){ 
							for(var j=0; j<domMixins.length; j++){ 
								var mixin = domMixins[j]; 
								if(e.className.match(mixin.regex)){ 
									ObjectTools.mixIn(e,mixin.name); 
									if(e.init) inits.push(e); 
								} 
							} 
						} 
					} 
					 
					//Execute the inits 
					for(var i=0; i<inits.length; i++){ 
						inits[i].init(); 
					} 
					 
					 
					//Layout the display 
					Layout.onResize(); 
					 
				};	 
				this.merge = function(source, destination){ 
				 
				 
				 
					try{ 
						for(var name in source){ 
						destination[name] = source[name]; 
						} 
					}catch(e){ 
						this.handleError("merge",e,arguments); 
					}; 
				};	 
				this.mixIn = function(iceCream, cherries){ 
				 
				 
				 
					try{ 
						//Instantiate an object of the class if a class name is specified. 
						if(typeof cherries == "string") cherries = this.createFromClass(cherries); 
						 
						//Copy the properties from cherries to object. 
						for(name in cherries){ 
							if(iceCream[name]==undefined) iceCream[name] = cherries[name];	 
						} 
						return iceCream; 
					}catch(e){ 
						this.handleError("mixIn",e,arguments); 
					}; 
				}; 
			} 
		},  
		OpacityElement : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.getOpacity = function(){ 
				 
				 
				 
					try{ 
						var opacity; 
						if(this.filters){ 
							opacity = this.filters.item(0).opacity/100; 
						}else{ 
							opacity = parseFloat(this.style.opacity); 
						} 
						 
						//if opacity is not explicitly set, then we assume  
						//there is full opacity as the browser would render it 
						if(typeof opacity != "number" || isNaN(opacity)) opacity=1; 
						 
						return opacity; 
					}catch(e){ 
						this.handleError("getOpacity",e,arguments); 
					}; 
				};	 
				this.setOpacity = function(opacity){ 
				 
				 
				 
					try{ 
						try{ 
						if(this.filters){ 
						this.filters.item(0).opacity = Math.floor(opacity*100);	 
						}else{ 
						 
						//safari bug 
						if(opacity==1 && BrowserDetect.browser == "Safari" && BrowserDetect.OS == "Mac") this.style.opacity=0.99; 
						else this.style.opacity = opacity; 
						 
						} 
						}catch(e){ 
						//ignore it	 
						}; 
						 
					}catch(e){ 
						this.handleError("setOpacity",e,arguments); 
					}; 
				}; 
			} 
		},  
		PasswordField : { 
			mixins: ["ValidatingInputField"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.validate = function(){ 
				 
				 
				 
					try{ 
						if(this.getValue().length>0){ 
						 
						if(this.getForm().password_confirm.getValue()==this.getValue()) this.setValidationState("valid"); 
						else this.setValidationState("invalid","Passwords must match."); 
						 
						}else{ 
						 
						this.setValidationState("invalid","The field '"+this.name+"' is required."); 
						 
						} 
						 
						 
						 
						 
					}catch(e){ 
						this.handleError("validate",e,arguments); 
					}; 
				}; 
			} 
		},  
		RemoteBoat : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
			 	 
				this.getXMLHTTPRequest = function(){ 
				 
				 
				 
					try{ 
						var req = false; 
						// branch for native XMLHttpRequest object 
						if(window.XMLHttpRequest) { 
							try { 
								req = new XMLHttpRequest(); 
						    } catch(e) { 
								req = false; 
						    } 
						// branch for IE/Windows ActiveX version 
						} else if(window.ActiveXObject) { 
						   	try { 
						    	req = new ActiveXObject("Msxml2.XMLHTTP"); 
						  	} catch(e) { 
						    	try { 
						      		req = new ActiveXObject("Microsoft.XMLHTTP"); 
						    	} catch(e) { 
						      		req = false; 
						    	} 
							} 
						} 
						return req; 
					}catch(e){ 
						this.handleError("getXMLHTTPRequest",e,arguments); 
					}; 
				};	 
				this.sendRequest = function(params){ 
				 
				 
				 
					try{ 
						var request = this.getXMLHTTPRequest(); 
						 
						//The default callback object is this. 
						if(params.callbackObject==undefined) params.callbackObject = this; 
						 
						//If an XML doc has been provided, serialize it. 
						if(typeof params.query == "object"){ 
							//For Gecko browsers. 
							if(params.query.xml) params.query = params.query.xml; 
							//For IE 
							else params.query = (new XMLSerializer()).serializeToString(params.query); 
						} 
						 
						//Prepare to handle the completed request. 
						request.onreadystatechange = function(){ 
						 
							// only if request shows "loaded" 
							if (request.readyState == 4) { 
								// only if "OK" 
								if (request.status == 200) { 
									 
									//in IE6 you can't mixin to the request object 
						 
									var result = {responseText: request.responseText, responseXML: request.responseXML}; 
									 
									if(params.mixin){ 
										ObjectTools.mixIn(result,params.mixin); 
									} 
						 
						                        if(params.responseFormat=="json"){ 
							                    result = eval('(' + request.responseText + ')'); 
						                        } 
						                        if(params.responseFormat=="text"){ 
							                    result = request.responseText; 
						                        } 
						 
									if(params.callback) params.callbackObject[params.callback](result); 
								} else { 
									alert("There was a problem executing the query: " + request.statusText); 
								} 
							} 
						} 
						//Send the request. 
						request.open('POST',params.url,true); 
						 
						if(params.query){ 
						request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 
						//request.setRequestHeader("Content-length", params.query.length); 
						//request.setRequestHeader("Connection", "close"); 
						} 
						 
						if(params.query) request.send(params.query);	 
						else request.send(""); 
						 
					}catch(e){ 
						this.handleError("sendRequest",e,arguments); 
					}; 
				}; 
			} 
		},  
		RequiredField : { 
			mixins: ["ValidatingInputField"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.validate = function(){ 
				 
				 
				 
					try{ 
						if(this.getValue().length>0) this.setValidationState("valid"); 
						else this.setValidationState("invalid","The field '"+this.name+"' is required."); 
						 
					}catch(e){ 
						this.handleError("validate",e,arguments); 
					}; 
				}; 
			} 
		},  
		ResultList : { 
			mixins: [], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.add = function(p){ 
				 
				 
				 
					var e = this.appendChild(ObjectTools.createDomElementFromClass("table","ResultThumb")); 
					e.setup(p); 
					 
					 
				};	 
				this.clear = function(){ 
				 
				 
				 
					this.innerHTML = ""; 
				}; 
			} 
		},  
		ResultThumb : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					switch(this.service){ 
					 
					case 'carvill': 
					window.location = "real_estate_listing_"+this.listingId+".html"; 
					break; 
					 
					case 'idx': 
					window.location = "real_estate_idx_"+this.listingId+".html"; 
					break; 
					 
					} 
					 
				};	 
				this.setup = function(p){ 
				 
				 
				 
					var e = this; 
					e.service = p.service; 
					e.listingId = p.id; 
					e = e.appendChild(document.createElement("tbody")); 
					e = e.appendChild(document.createElement("tr")); 
					e = e.appendChild(document.createElement("td")); 
					e.setAttribute("valign","top"); 
					e = e.appendChild(ObjectTools.createDomElementFromClass("div","ResultThumbImg")); 
					if(p.service=="idx" && p.image){ 
					e.style.backgroundImage = "url(idx_thumb_"+p.image_folder+"_"+p.image+")"; 
					/* 
					Wait for images to download 
					this is not nessesary now as 
					all thumbs are cached. 
					 
					IdxImageManager.registerImage({ 
					e: e, 
					image: p.image, 
					folder: p.image_folder, 
					status: p.image_status 
					}); 
					*/ 
					}else if(p.service=="carvill"){ 
					e.style.backgroundImage = "url("+p.image+")"; 
					} 
					e = e.appendChild(document.createElement("img")); 
					e.src = "resources/images/"+p.letter+".gif"; 
					e = e.parentNode; 
					e = e.parentNode; 
					e = e.parentNode; 
					e = e.appendChild(document.createElement("td")); 
					e.setAttribute("valign","top"); 
					e.className = "Caption"; 
					e = e.appendChild(document.createElement("h2")); 
					e.style.marginTop = "0px"; 
					e.style.width = "132px"; 
					e.appendChild(document.createTextNode(p.address)); 
					e = e.parentNode; 
					e = e.appendChild(document.createElement("div")); 
					e.appendChild(document.createTextNode(p.bedrooms+" bedrooms,")); 
					e = e.parentNode; 
					e = e.appendChild(document.createElement("div")); 
					e.appendChild(document.createTextNode(p.bathrooms+" bathrooms")); 
					e = e.parentNode; 
					e = e.appendChild(document.createElement("div")); 
					e.appendChild(document.createTextNode(p.price)); 
					e = e.parentNode; 
					e = e.appendChild(document.createElement("img")); 
					e.src = "resources/images/more_arrow.gif"; 
					e.style.display = "block"; 
					e.style.marginTop = "8px"; 
				}; 
			} 
		},  
		ResultThumbImg : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 1, 
						allowFractions: true 
					}); 
				};	 
				this.setImage = function(p){ 
				 
				 
				 
					this.style.backgroundImage = "url(idx_thumb_"+p.folder+"_"+p.image+")"; 
					 
				}; 
			} 
		},  
		Search : { 
			mixins: ["RemoteBoat"], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
				 
				this.enable = true; 
					 
				this.firstSearch = true; 
				 	 
				this.doSearch = function(){ 
				 
				 
				 
					if(this.enable) TimeoutManager.setDelay({ 
					id: "search", 
					scope: this, 
					fn: this.doSearchNow, 
					seconds: 1.5 
					}); 
					 
				};	 
				this.doSearchNow = function(){ 
				 
				 
				 
					var query; 
					 
					var m = Map.map; 
					 
					var b = m.getBounds(); 
					 
					var sw = b.getSouthWest(); 
					var ne = b.getNorthEast(); 
					 
					var lat_diff = ne.lat()-sw.lat(); 
					 
					var lng_diff = ne.lng()-sw.lng(); 
					 
					var center = m.getCenter(); 
					 
					query = "?"+ 
					"property_type="+this.getValue('property_type')+ 
					"&tenure="+this.getValue('tenure')+ 
					"&price_max="+this.getValue('price_max')+ 
					"&price_min="+this.getValue('price_min')+ 
					"&bedrooms="+this.getValue('bedrooms')+ 
					//"&bathrooms="+this.getValue('bathrooms')+ 
					"&page_number="+this.getValue('page_number')+ 
					"&latitude_max="+(ne.lat()-lat_diff*0.1)+ 
					"&latitude_min="+(sw.lat()+lat_diff*0.1)+ 
					"&longitude_max="+(ne.lng()-lng_diff*0.1)+ 
					"&longitude_min="+(sw.lng()+lng_diff*0.1)+ 
					"&map_zoom="+m.getZoom()+ 
					"&map_latitude="+center.lat()+ 
					"&map_longitude="+center.lng()+ 
					"&fullscreen="+RestoreQuery.fullscreen; 
					 
					var session_id = Cookies.get("carvill_mls_search"); 
					 
					if(session_id){ 
					 
					query += "&session_id="+escape(session_id); 
					 
					} 
					 
					this.sendRequest({ 
					url: "search.php"+query, 
					callbackObject: this, 
					callback: "handleResponse", 
					responseFormat: "json" 
					}); 
					 
					var e = document.getElementById("results_message"); 
					e.style.display = "none"; 
					 
					e = document.getElementById("searching_message"); 
					e.style.display = "block"; 
					 
				};	 
				this.getDistance = function(a, b, zoom){ 
				 
				 
				 
					var OFFSET = 268435456; 
					var RADIUS = 85445659.4471; 
					 
					function lonToX(lon) { 
					    return Math.round(OFFSET + RADIUS * lon * Math.PI / 180);         
					} 
					 
					function latToY(lat) { 
					    return Math.round(OFFSET - RADIUS *  
					                Math.log((1 + Math.sin(lat * Math.PI / 180)) /  
					                (1 - Math.sin(lat * Math.PI / 180))) / 2); 
					} 
					 
					x1 = lonToX(a.longitude); 
					y1 = latToY(a.latitude); 
					 
					x2 = lonToX(b.longitude); 
					y2 = latToY(b.latitude); 
					 
					return Math.sqrt(Math.pow((x1-x2),2) + Math.pow((y1-y2),2)) >> (21 - zoom); 
					 
					 
				};	 
				this.getValue = function(id){ 
				 
				 
				 
					var s = document.getElementById(id); 
					if(s.selectedIndex>-1) 
					return escape(s.options[s.selectedIndex].value); 
					 
				};	 
				this.handleResponse = function(response){ 
				 
				 
				 
					IdxImageManager.clearImages(); 
					 
					Cookies.set("carvill_mls_search",response.session_id,60); 
					 
					if(response.query.source == "session" || response.query.source == "defaults"){ 
					 
					this.enable = false; 
					 
					this.firstSearch = false; 
					 
					Map.map.setCenter(new google.maps.LatLng(response.map.latitude, response.map.longitude)); 
					 
					Map.map.setZoom(response.map.zoom); 
					 
					this.setValue('property_type',response.query.property_type); 
					 
					this.setValue('tenure',response.query.tenure); 
					 
					this.setValue('price_min',response.query.price_min); 
					 
					this.setValue('price_max',response.query.price_max); 
					 
					this.setValue('bedrooms',response.query.bedrooms); 
					 
					//this.setValue('bathrooms',response.query.bathrooms); 
					 
					this.setValue('page_number',response.query.page_number); 
					 
					TimeoutManager.setDelay({ 
					id: "pause_search_listeners", 
					fn: function(){this.enable = true;}, 
					scope: this, 
					seconds: 2 
					}); 
					 
					} 
					 
					this.setResults(response.results); 
					 
					var e = document.getElementById("results_message"); 
					e.style.display = "block"; 
					e.innerHTML = response.count+" results found."; 
					 
					e = document.getElementById("searching_message"); 
					e.style.display = "none"; 
					 
					e = document.getElementById("page_number"); 
					while(e.firstChild) e.removeChild(e.firstChild); 
					for(var i=1; i<=response.pages; i++){ 
					var f = document.createElement("option"); 
					f.value = i; 
					f.appendChild(document.createTextNode(i)); 
					e.appendChild(f); 
					} 
					 
					e.setValue(response.query.page_number); 
					 
					e = document.getElementById("total_pages"); 
					e.firstChild.data = response.pages; 
					 
					 
				};	 
				this.setResults = function(results){ 
				 
				 
				 
					ResultList.clear(); 
					Map.clear(); 
					 
					results.sort(function(a,b){ 
					ad = a.latitude-a.longitude; 
					bd = b.latitude-b.longitude; 
					if(ad>bd) return -1; 
					if(ad<bd) return 1; 
					return 0; 
					}); 
					 
					var d = []; 
					var nextLetter = 97;  //ascii a 
					for(var i=0; i<results.length; i++){ 
					var result = results[i]; 
					 
					for(var j=0; j<i; j++){ 
					var d = this.getDistance(result,results[j],Map.map.getZoom());	 
					if(d<32 && !results[j].moved){ 
					result.letter = results[j].letter; 
					result.moved = true; 
					} 
					} 
					 
					if(!result.letter){ 
					result.letter = String.fromCharCode(nextLetter++); 
					Map.add(result); 
					} 
					 
					ResultList.add(result); 
					 
					} 
					 
					 
				};	 
				this.setValue = function(id, value){ 
				 
				 
				 
					var select = document.getElementById(id); 
					select.setValue(value); 
					 
				}; 
			} 
		},  
		SearchSelect : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onchange = function(){ 
				 
				 
				 
					Search.doSearch(); 
				};	 
				this.setValue = function(value){ 
				 
				 
				 
					for(var i=0; i<this.options.length; i++){ 
						if(this.options[i].value==value) this.selectedIndex = i; 
					} 
				}; 
			} 
		},  
		ShowScenicImages : { 
			mixins: [], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onclick = function(){ 
				 
				 
				 
					console.log(this.checked); 
					if(this.checked){ 
					Map.map.addOverlay(new GLayer("com.panoramio.all")); 
					Map.map.addOverlay(new GLayer("org.wikipedia.en")); 
					} 
				}; 
			} 
		},  
		Slideshow : { 
			mixins: ["RemoteBoat"], 
			singleton: true, 
			domElement: true, 
			constructor: function(){ 
				 
				this.currentSlide = null; 
					 
				this.slides = []; 
				 	 
				this.handleResponse = function(response){ 
				 
				 
				 
					this.slides = response; 
					TimeoutManager.setTimeout(this,"nextSlide",8000,true); 
					this.nextSlide(); 
					 
				};	 
				this.init = function(){ 
				 
				 
				 
					this.sendRequest({ 
					url: "slideshow.php", 
					callbackObject: this, 
					callback: "handleResponse", 
					responseFormat: "json" 
					}); 
					 
				};	 
				this.nextSlide = function(){ 
				 
				 
				 
					this.currentSlide++; 
					if(this.currentSlide==this.slides.length) this.currentSlide=0; 
					 
					while(this.childNodes.length) this.removeChild(this.firstChild); 
					 
					var s = this.slides[this.currentSlide]; 
					 
					var moreInfo = function(){ 
					window.location = "real_estate_listing_"+s.id+".html";	 
					} 
					 
					var e = this; 
					e = this.appendChild(document.createElement("div")); 
					e.className = "SlideshowImage"; 
					e.onclick = moreInfo; 
					e.style.cursor = "pointer"; 
					e = this.appendChild(ObjectTools.createDomElementFromClass("div","SlideshowImageWrapper")); 
					e = e.appendChild(ObjectTools.createDomElementFromClass("img","SlideshowImageImg")); 
					e.onclick = moreInfo; 
					e.style.cursor = "pointer"; 
					e.src = "featured_small/"+s.id+"_"+s.image+".jpg"; 
					e = e.parentNode; 
					e = e.parentNode; 
					e = e.appendChild(document.createElement('table')); 
					e.onclick = moreInfo; 
					e.style.cursor = "pointer"; 
					e.style.width="304px"; 
					e = e.appendChild(document.createElement('tbody')); 
					e = e.appendChild(document.createElement('tr')); 
					e = e.appendChild(document.createElement('td')); 
					e.className = "Caption"; 
					e.appendChild(document.createTextNode(s.address)); 
					e.appendChild(document.createElement('br')); 
					e.appendChild(document.createTextNode(s.bedrooms+" bathrooms, "+s.bathrooms+" bedrooms")); 
					e.appendChild(document.createElement('br')); 
					e.appendChild(document.createTextNode(s.price)); 
					e = e.parentNode; 
					e = e.appendChild(document.createElement('td')); 
					e.align = 'right'; 
					e.valign = 'bottom'; 
					e = e.appendChild(ObjectTools.createDomElementFromClass("a","MoreInfoLink")); 
					e = e.appendChild(document.createElement('img')); 
					e.src = "resources/images/more_arrow.gif"; 
					e.style.borderWidth = "0px"; 
					 
					 
					 
				}; 
			} 
		},  
		SlideshowImageImg : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.onload = function(){ 
				 
				 
				 
					EaseManager.createEase({ 
						subject:this.parentNode, 
						getter:"getOpacity", 
						setter:"setOpacity", 
						beginning: 0, 
						end: 1, 
						seconds: 2, 
						allowFractions: true 
					}); 
				}; 
			} 
		},  
		TimeoutManager : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.delays = {}; 
					 
				this.timeouts = []; 
				 	 
				this.clearAllTimeouts = function(){ 
				 
				 
				 
					try{ 
						while(this.timeouts.length){ 
							clearInterval(this.timeouts[0].id); 
							this.timeouts.splice(0,1); 
						} 
					}catch(e){ 
						this.handleError("clearAllTimeouts",e,arguments); 
					}; 
				};	 
				this.clearTimeout = function(obj, functionName){ 
				 
				 
				 
					try{ 
						for(var i=0; i<this.timeouts.length; i++){ 
							if(this.timeouts[i].obj==obj && this.timeouts[i].functionName==functionName){ 
								clearInterval(this.timeouts[i].id); 
								this.timeouts.splice(i,1); 
								i--; 
							} 
						} 
					}catch(e){ 
						this.handleError("clearTimeout",e,arguments); 
					}; 
				};	 
				this.getTimeout = function(obj, functionName){ 
				 
				 
				 
					try{ 
						var timeout = false; 
						for(var i=0; i<this.timeouts.length; i++){ 
							if(this.timeouts[i].obj==obj && this.timeouts[i].functionName==functionName){ 
								timeout = this.timeouts[i]; 
							} 
						} 
						return timeout; 
					}catch(e){ 
						this.handleError("getTimeout",e,arguments); 
					}; 
				};	 
				this.setDelay = function(p){ 
				 
				 
				 
					if(this.delays[p.id]){ 
					clearInterval(this.delays[p.id].interval); 
					} 
					 
					this.delays[p.id] = p; 
					 
					p.interval = setInterval(function(){ 
					 
					if(!p.repeat) clearInterval(p.interval); 
					 
					TimeoutManager.delays[p.id] = null; 
					 
					p.fn.apply(p.scope,p.args || []); 
					 
					},p.seconds*1000); 
					 
				};	 
				this.setTimeout = function(obj, functionName, time){ 
				 
				 
				 
					try{ 
						var repeat = arguments[3]; 
						var exists = false; 
						for(var i=0; i<this.timeouts.length; i++){ 
							if(this.timeouts[i].obj==obj && this.timeouts[i].functionName==functionName){ 
								exists = true; 
							} 
						} 
						if(!exists){ 
							var doFunction = function(){ 
								if(!repeat) TimeoutManager.clearTimeout(obj,functionName); 
								obj[functionName](); 
							} 
							this.timeouts.push({ 
								obj:obj, 
								functionName:functionName, 
								id: setInterval(doFunction,time) 
							}); 
						} 
					}catch(e){ 
						this.handleError("setTimeout",e,arguments); 
					}; 
				}; 
			} 
		},  
		UsernameField : { 
			mixins: ["ValidatingInputField"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.init = function(){ 
				 
				 
				 
					 
					 
				};	 
				this.validate = function(){ 
				 
				 
				 
					try{ 
						if(this.getValue().length>0){ 
						 
						this.setValidationState("incomplete"); 
						RemoteBoat.sendRequest({url:"check_username.php",query:this.getValue(),callbackObject:this,callback:"validateCallback"}); 
						 
						}else{ 
						 
						this.setValidationState("invalid","The field '"+this.name+"' is required."); 
						 
						} 
						 
						 
					}catch(e){ 
						this.handleError("validate",e,arguments); 
					}; 
				};	 
				this.validateCallback = function(request){ 
				 
				 
				 
					try{ 
						this.setValidationState( 
						request.responseText, 
						request.responseText=="invalid"?"The username '"+this.getValue()+"' is already taken.":null 
						); 
						 
						 
					}catch(e){ 
						this.handleError("validateCallback",e,arguments); 
					}; 
				}; 
			} 
		},  
		ValidatingForm : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			 	 
				this.completeValidation = function(){ 
				 
				 
				 
					try{ 
						var inputs = this.getValidatingInputs(); 
						 
						var formIsValid = true; 
						 
						validationComplete = true; 
						 
						var message = ""; 
						for(var i=0; i<inputs.length; i++){ 
						 
						var input = inputs[i]; 
						 
						switch(input.validationState){ 
						 
						case "incomplete": 
						validationComplete = false; 
						break; 
						 
						case "invalid": 
						formIsValid = false; 
						message += input.validationError+" "; 
						break; 
						 
						} 
						 
						} 
						 
						if(!validationComplete){ 
						 
						TimeoutManager.setTimeout(this,"completeValidation",500); 
						 
						}else{ 
						 
						if(formIsValid){ 
						 
						this.validationComplete = true; 
						 
						this.submit(); 
						 
						}else{ 
						 
						alert("The information you have entered is not valid: "+message); 
						 
						}  
						 
						} 
						 
					}catch(e){ 
						this.handleError("completeValidation",e,arguments); 
					}; 
				};	 
				this.getValidatingInputs = function(){ 
				 
				 
				 
					try{ 
						return ObjectTools.arraySelect(this.elements,function(item){ 
						return item.validate; 
						}); 
					}catch(e){ 
						this.handleError("getValidatingInputs",e,arguments); 
					}; 
				};	 
				this.onsubmit = function(){ 
				 
				 
				 
					try{ 
						if(this.validationComplete) return true; 
						 
						var inputs = this.getValidatingInputs(); 
						 
						for(var i=0; i<inputs.length; i++) inputs[i].validate(); 
						 
						this.completeValidation(); 
						 
						return false; 
						 
					}catch(e){ 
						this.handleError("onsubmit",e,arguments); 
					}; 
				}; 
			} 
		},  
		ValidatingInputField : { 
			mixins: [], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
				 
				this.invalidStyle = {backgroundColor: "#ffdcf1", border: "2px solid #ff0000"}; 
					 
				this.validationState = "valid"; 
					 
				this.validStyle = {}; 
				 	 
				this.init = function(){ 
				 
				 
				 
					try{ 
						for(var name in this.invalidStyle){ 
						this.validStyle[name] = this.style[name]; 
						} 
					}catch(e){ 
						this.handleError("init",e,arguments); 
					}; 
				};	 
				this.setValidationState = function(validationState, validationError){ 
				 
				 
				 
					try{ 
						this.validationError = validationError; 
						 
						this.validationState = validationState; 
						 
						switch(validationState){ 
						case "valid": 
						if(isValid) ObjectTools.merge(this.validStyle,this.style); 
						break; 
						case "invalid": 
						ObjectTools.merge(this.invalidStyle,this.style); 
						break; 
						} 
						 
						 
						 
						 
					}catch(e){ 
						this.handleError("setValidationState",e,arguments); 
					}; 
				};	 
				this.validate = function(){ 
				 
				 
				 
					try{ 
						this.setValidationState("valid"); 
						 
					}catch(e){ 
						this.handleError("validate",e,arguments); 
					}; 
				}; 
			} 
		},  
		Viewport : { 
			mixins: [], 
			singleton: true, 
			domElement: false, 
			constructor: function(){ 
				 
				this.interval = false; 
					 
				this.listeners = []; 
				 	 
				this.addListener = function(l){ 
				 
				 
				 
					if(!this.interval){ 
					this.interval = setInterval(this.checkSize,200); 
					} 
					 
					if(!this.lastSize){ 
					this.lastSize = this.getSize(); 
					} 
					 
					this.listeners.push(l); 
					 
				};	 
				this.checkSize = function(){ 
				 
				 
				 
					var v = Viewport; 
					var o = v.lastSize; 
					var n = v.getSize(); 
					if(o.w!=n.w || o.h!=n.h){ 
					v.lastSize = n; 
					for(var i=0; i<v.listeners.length; i++){ 
					var l = v.listeners[i]; 
					l.fn.call(l.scope); 
					} 
					} 
					 
				};	 
				this.getSize = function(){ 
				 
				 
				 
					if (self.innerHeight) // all except Explorer 
					    { 
					        w = self.innerWidth; 
					        h = self.innerHeight; 
					    } 
					    else if (document.documentElement && document.documentElement.clientHeight) 
					        // Explorer 6 Strict Mode 
					    { 
					        w = document.documentElement.clientWidth; 
					        h = document.documentElement.clientHeight; 
					    } 
					    else if (document.body) // other Explorers 
					    { 
					        w = document.body.clientWidth; 
					        h = document.body.clientHeight; 
					    } 
					 
					return { 
					w: w, 
					h: h 
					} 
					 
				}; 
			} 
		},  
		MoreInfoLink : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			  
			} 
		},  
		NavButton : { 
			mixins: ["AlphaRollover"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			  
			} 
		},  
		FormTextInput : { 
			mixins: ["FormInput"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			  
			} 
		},  
		SlideshowImageWrapper : { 
			mixins: ["OpacityElement"], 
			singleton: false, 
			domElement: true, 
			constructor: function(){ 
			  
			} 
		} 
	};	 
}; 
 
function initJavascript(){ 
 
	//Set up the ObjectTools properly, and initialize. 
 
	var o = new ObjectTools.classes.ObjectTools.constructor(); 
 
	o.clazz = "ObjectTools"; 
 
	for(name in o){ 
		if(ObjectTools[name]==undefined) ObjectTools[name] = o[name]; 
	} 
 
	var o = new ObjectTools.classes.Logger.constructor(); 
 
	for(name in o){ 
		if(ObjectTools[name]==undefined) ObjectTools[name] = o[name]; 
	} 
 
	ObjectTools.init(); 
} 
