
	var gSelectionElementWidth = 158;
	var gOptionPaddingRight = 10;

	function initialise(loadgmap)
	{
		initialise_dropdowns();
		if(loadgmap == true && self.WriteGoogleMap) WriteGoogleMap();
		setFooter();
	}

	function setFooter()
	{
		var rightColumn = document.getElementById("rightcolumn");
		var footer = document.getElementById("footer");
		var outerDiv = document.getElementById("outer");
		var rightColumnFloorTop = document.getElementById("rightcolumnfloor").offsetTop;
		var leftColumnFloorTop = 270;
		if(document.getElementById("subnav"))
			leftColumnFloorTop += document.getElementById("subnav").offsetHeight + document.getElementById("subnav").offsetTop;
		
		if(rightColumnFloorTop > footer.offsetTop)
		{
			footer.style.position = "absolute";
			footer.style.top = rightColumnFloorTop + "px";
			outerDiv.style.height = (footer.offsetTop + footer.offsetHeight) + "px";
		}

		if(leftColumnFloorTop > rightColumnFloorTop)
		{
			footer.style.top = leftColumnFloorTop + "px";
			outerDiv.style.height = (footer.offsetTop + footer.offsetHeight) + "px";
		}

		
	}



	function initialise_dropdowns()
	{

		var menus = document.getElementsByTagName("div");
		var parentElement = null;
		var selectionElement = null;
		var x;
		var elt = null;
		var dlElement = null;
		var maxWidth = 0;
						
		for (var i = 0; i < menus.length; i++)
		{
			
			if(menus[i].className == "menu")
			{
				
				var selectionElementWidth = 0;

				menus[i].style.height = "300px";
				menus[i].style.overflow = "scroll";
				
				selectionElement = getSelectionElement(menus[i]);
				selectionElement.style.display = "block";
				selectionElement.style.width = gSelectionElementWidth+"px";
				selectionElementWidth = getWidth(selectionElement, false, false);
				
				//find dl element
				
				//alert(menus[i].innerHTML);
				
				for(x = 0; x < menus[i].childNodes.length; x++)
				{
					elt = menus[i].childNodes[x];
					if(elt.tagName)
						if(elt.tagName.toLowerCase() == "dl")
						{
							dlElement = elt;
							break;
						}
				}
				
				//find widest anchor 
				maxWidth = 0;
				var setWidth = 0;
				var spanElements = null;

				spanElements = dlElement.getElementsByTagName("span");


				for(x = 0; x < spanElements.length; x++)
				{
					var spanWidth = spanElements[x].offsetWidth;
					if(spanWidth > maxWidth) maxWidth = spanWidth;
				}

				//position menu

				if(selectionElementWidth > maxWidth)
				{
					//alert("setting default width!");
					setWidth = selectionElementWidth+10;
					menus[i].style.width = setWidth+"px";
					menus[i].style.left = ((selectionElementWidth - setWidth)+5)+"px";
				}
				else
				{
					setWidth = maxWidth;
					menus[i].style.width = (setWidth+22)+"px";
					menus[i].style.left = (selectionElementWidth - (setWidth+19))+"px";
				}
				
				menus[i].style.top = (selectionElement.offsetHeight) + "px";
/*				
				//set width of menu
				if(selectionElement.offsetWidth > maxWidth)
				{
					setWidth = (selectionElement.offsetWidth-2);
					menus[i].style.width = setWidth + "px";
				}	
				else
				{
					setWidth = maxWidth;
					menus[i].style.width = setWidth + "px";
					menus[i].style.left = ((selectionElement.offsetWidth) - setWidth) + "px";
				}
				
				//set width of elements
				for(x = 0; x < ddElements.length; x++)
				{
					var anchor = ddElements[x].getElementsByTagName("a")[0];
					ddElements[x].style.width = setWidth+"px";
					anchor.style.display="block";
					anchor.style.width=(setWidth-4-gOptionPaddingRight)+"px";
					//anchor.style.paddingRight = gOptionPaddingRight+"px";

				}
				
				*/
				
				
				/*
				if(dlElement != null)
				{
					for(x = 0; x < ddElements.length; x++)
					{
						anchor = ddElements[x].getElementsByTagName("a")[0];
						anchor.style.width = (setWidth-12) + "px";
					}
				}
				*/
			}
		}


		hideAllMenus();
	
	}


	function getSelectionElement(menuElement)
	{
		
		var parent = menuElement.parentNode;
		var selectionElement = null;

		for(var i = 0; i < parent.childNodes.length; i++)
		{
			elt = parent.childNodes[i];
			if(elt.tagName && elt.className)
			{
				if(	elt.tagName.toLowerCase() == "a" && 
					elt.className.toLowerCase() == "selected")
				{
					selectionElement = elt;
					break;
				}
			}
		}
		
		return selectionElement;
	}


	function getMenuElement(selectionElement)
	{
		var parent = selectionElement.parentNode;
		var children = parent.getElementsByTagName("div");
		
		
		for(var i = 0; i < children.length; i++)
		{
			if(children[i].className == "menu")
			{
				return children[i];
			}
		}
		
		
		return null;		
		
	}


	function hideAllMenus()
	{
		var menus = document.getElementsByTagName("div");
						
		for (var i = 0; i < menus.length; i++)
		{
			if(menus[i].className == "menu")
			{
				menus[i].style.display = "none";
				menus[i].style.visibility = "visible";
				menus[i].style.zIndex = -1;
				
				var selectionElement = getSelectionElement(menus[i]);
				selectionElement.style.zIndex = -1;
				selectionElement.style.visibility = "visible";
				selectionElement.style.display = "block";
				//alert(selectionElement.style.zIndex);
			}
		}
	}
	
	function showMenu(selectionElement)
	{
		var menuElement = getMenuElement(selectionElement);
		
		if(menuElement.style.display != "block")
		{
			hideAllMenus();
			menuElement.style.display = "block";
			menuElement.style.zIndex = 1;
			//alert(selectionElement.style.zIndex+":"+menuElement.style.zIndex);
			
			hideOtherSelectionBoxes(menuElement);
			
			
		}
		else
			hideAllMenus();
		
		return false;
	}


	function hideOtherSelectionBoxes(showingMenu)
	{
		var tolerance = 2;
		var selectionBoxes = document.getElementsByTagName("a");
		var showingMenuPosTopLeft = findPos(showingMenu);
		
		var showingMenuPosBottomRight = 
			[	showingMenuPosTopLeft[0]+showingMenu.offsetWidth, 
				showingMenuPosTopLeft[1]+showingMenu.offsetHeight];

		showingMenuPosTopLeft = 
			[	showingMenuPosTopLeft[0]+tolerance, 
				showingMenuPosTopLeft[1]+tolerance];

		var showingMenuPosBottomRight = 
			[	showingMenuPosBottomRight[0]-tolerance, 
				showingMenuPosBottomRight[1]-tolerance];

		
		for(var i = 0; i < selectionBoxes.length; i++)
		{
			if(selectionBoxes[i].className.toLowerCase() == "selected")
			{
				var selectionBoxPosTopLeft = findPos(selectionBoxes[i]);
				var selectionBoxPosBottomRight  = 
					[	selectionBoxPosTopLeft[0]+selectionBoxes[i].offsetWidth, 
						selectionBoxPosTopLeft[1]+selectionBoxes[i].offsetHeight];
				
				//alert(showingMenuPosTopLeft[0]+":"+showingMenuPosBottomRight[0]);
				
				// is selectionBox inside showingMenu?
				if(	(selectionBoxPosBottomRight[0] 	> showingMenuPosTopLeft[0]) 		&& 
					(selectionBoxPosTopLeft[0] 		< showingMenuPosBottomRight[0])		&&
					
					(selectionBoxPosBottomRight[1] 	> showingMenuPosTopLeft[1])			&&
					(selectionBoxPosTopLeft[1]		< showingMenuPosBottomRight[1]))
				{
					//alert("hide '"+selectionBoxes[i].innerHTML+"'!\n"
					//	+"selectionBox: "+selectionBoxPosTopLeft[0]+","+selectionBoxPosTopLeft[1]+":"+selectionBoxPosBottomRight[0]+","+selectionBoxPosBottomRight[1]+"\n"
					//	+"showingMenu: " +showingMenuPosTopLeft[0]+"," +showingMenuPosTopLeft[1]+":"+showingMenuPosBottomRight[0]+","+showingMenuPosBottomRight[1]+"\n"
					//);
					
					selectionBoxes[i].style.visibility = "hidden";
					selectionBoxes[i].style.display = "none";
				}
				
				
				
				//selectionBoxes[i].style.visibility = "hidden";
				//alert(findPos(showingMenu)[0]+":"+findPos(showingMenu)[1]);
				
				
			
			}
		}
	}


	function findPos(obj) 
	{
		var curleft = curtop = 0;

		if (obj.offsetParent) 
		{
			do 
			{
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	}


	function setMenuValue(menuOption, url)
	{
		var menuElement = menuOption.parentNode.parentNode.parentNode;
		var selectionElement = getSelectionElement(menuElement);
		
		selectionElement.innerHTML = menuOption.innerHTML;
		selectionElement.style.color = "#8b8573";
		
		hideAllMenus();
	
		window.parent.location = url;
	
		return false;
	
	}




// get width and height of an element

function getWidth(/* Object */ el, /* boolean */ includePadding, /* boolean */ includeBorder) {
    var width;
    el = (typeof(el) == "string") ? document.getElementById(el) : el;    
    
    if(window.getComputedStyle) { // FF, Safari, Opera
        var style = document.defaultView.getComputedStyle(el, null);
        if(style.getPropertyValue("display") == "none")
            return 0;
        width = parseInt(style.getPropertyValue("width"));
        
        if(/opera/i.test(navigator.userAgent)) {
            // opera includes the padding and border when reporting the width/height - subtract that out
            width -= parseInt(style.getPropertyValue("padding-left"));
            width -= parseInt(style.getPropertyValue("padding-right"));
            width -= parseInt(style.getPropertyValue("border-left-width"));
            width -= parseInt(style.getPropertyValue("border-right-width"));
        }
        
        if(includePadding) {
            width += parseInt(style.getPropertyValue("padding-left"));
            width += parseInt(style.getPropertyValue("padding-right"));
        }
        
        if(includeBorder) {
            width += parseInt(style.getPropertyValue("border-left-width"));
            width += parseInt(style.getPropertyValue("border-right-width"));
        }
    } else { // IE
        if(el.currentStyle["display"] == "none")
            return 0;
        var widthCSS = el.currentStyle["width"];
        var bRegex = /thin|medium|thick/; // regex for css border width keywords
        width = el.offsetWidth; // currently the width including padding + border
        
        if(!includeBorder) {
            var borderLeftCSS = el.currentStyle["borderLeftWidth"];
            var borderRightCSS = el.currentStyle["borderRightWidth"];
            var temp = document.createElement("DIV");
            if(!bRegex.test(borderLeftCSS)) {
                temp.style.width = borderLeftCSS;
                el.parentNode.appendChild(temp);
                width -= Math.round(temp.offsetWidth);
                el.parentNode.removeChild(temp);
            } else if(bRegex.test(borderLeftCSS)) {
                if(el.offsetWidth > el.clientWidth && el.currentStyle["borderLeftStyle"] != "none") {
                    temp.style.width = "10px";
                    temp.style.border = borderLeftCSS + " " + el.currentStyle["borderLeftStyle"] + " #000000";
                    el.parentNode.appendChild(temp);
                    width -= Math.round((temp.offsetWidth-10)/2);
                    el.parentNode.removeChild(temp);
                }
            }
            if(!bRegex.test(borderRightCSS)) {
                temp.style.width = borderRightCSS;
                el.parentNode.appendChild(temp);
                width -= Math.round(temp.offsetWidth);
                el.parentNode.removeChild(temp);
            } else if(bRegex.test(borderRightCSS)) {
                if(el.offsetWidth > el.clientWidth && el.currentStyle["borderRightStyle"] != "none") {
                    temp.style.width = "10px";
                    temp.style.border = borderRightCSS + " " + el.currentStyle["borderRightStyle"] + " #000000";
                    el.parentNode.appendChild(temp);
                    width -= Math.round((temp.offsetWidth-10)/2);
                    el.parentNode.removeChild(temp);
                }
            }
        }
        
        if(!includePadding) {
            
            var paddingLeftCSS = el.currentStyle["paddingLeft"];
            var paddingRightCSS = el.currentStyle["paddingRight"];
            var temp = document.createElement("DIV");
            temp.style.width = paddingLeftCSS;
            el.parentNode.appendChild(temp);
            width -= Math.round(temp.offsetWidth);
            temp.style.width = paddingRightCSS;
            width -= Math.round(temp.offsetWidth);
            el.parentNode.removeChild(temp);
        }
    }
   
    return width;
}

function getHeight(/* Object */ el, /* boolean */ includePadding, /* boolean */ includeBorder) {
    var height;
    el = (typeof(el) == "string") ? document.getElementById(el) : el;
    
    if(window.getComputedStyle) { // FF, Safari, Opera
        var style = document.defaultView.getComputedStyle(el, null);
        if(style.getPropertyValue("display") == "none")
            return 0;
        height = parseInt(style.getPropertyValue("height"));
        
        if(/opera/i.test(navigator.userAgent)) {
            // opera includes the padding and border when reporting the width/height - subtract that out
            height -= parseInt(style.getPropertyValue("padding-top"));
            height -= parseInt(style.getPropertyValue("padding-bottom"));
            height -= parseInt(style.getPropertyValue("border-top-width"));
            height -= parseInt(style.getPropertyValue("border-bottom-width"));
        }
        
        if(includePadding) {
            height += parseInt(style.getPropertyValue("padding-top"));
            height += parseInt(style.getPropertyValue("padding-bottom"));
        }
        
        if(includeBorder) {
            height += parseInt(style.getPropertyValue("border-top-width"));
            height += parseInt(style.getPropertyValue("border-bottom-width"));
        }
    } else { // IE
        if(el.currentStyle["display"] == "none")
            return 0;
        var heightCSS = el.currentStyle["height"];
        var bRegex = /thin|medium|thick/; // regex for css border width keywords
        height = el.offsetHeight; // currently the height including padding + border
        
        if(!includeBorder) {
            var borderTopCSS = el.currentStyle["borderTopWidth"];
            var borderBottomCSS = el.currentStyle["borderBottomWidth"];
            var temp = document.createElement("DIV");
            if(!bRegex.test(borderTopCSS)) {
                temp.style.width = borderTopCSS;
                el.parentNode.appendChild(temp);
                height -= Math.round(temp.offsetWidth);
                el.parentNode.removeChild(temp);
            } else if(bRegex.test(borderTopCSS)) {
                if(el.offsetHeight > el.clientHeight && el.currentStyle["borderTopStyle"] != "none") {
                    temp.style.width = "10px";
                    temp.style.border = borderTopCSS + " " + el.currentStyle["borderTopStyle"] + " #000000";
                    el.parentNode.appendChild(temp);
                    height -= Math.round((temp.offsetWidth-10)/2);
                    el.parentNode.removeChild(temp);
                }
            }
            if(!bRegex.test(borderBottomCSS)) {
                temp.style.width = borderBottomCSS;
                el.parentNode.appendChild(temp);
                height -= Math.round(temp.offsetWidth);
                el.parentNode.removeChild(temp);
            } else if(bRegex.test(borderBottomCSS)) {
                if(el.offsetHeight > el.clientHeight && el.currentStyle["borderBottomStyle"] != "none") {
                    temp.style.width = "10px";
                    temp.style.border = borderBottomCSS + " " + el.currentStyle["borderBottomStyle"] + " #000000";
                    el.parentNode.appendChild(temp);
                    height -= Math.round((temp.offsetWidth-10)/2);
                    el.parentNode.removeChild(temp);
                }
            }
        }
        
        if(!includePadding) {
            var paddingTopCSS = el.currentStyle["paddingTop"];
            var paddingBottomCSS = el.currentStyle["paddingBottom"];
            var temp = document.createElement("DIV");
            temp.style.width = paddingTopCSS;
            el.parentNode.appendChild(temp);
            height -= Math.round(temp.offsetWidth);
            temp.style.width = paddingBottomCSS;
            height -= Math.round(temp.offsetWidth);
            el.parentNode.removeChild(temp);
        }
    }
    
    return height;
}

function getPageHeight(){
	return Screen.getDocumentHeight();
}


/**
 * Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com)
 * 
 * Dual licensed under the MIT and GPL licenses. 
 * This basically means you can use this code however you want for
 * free, but don't claim to have written it yourself!
 * Donations always accepted: http://www.JavascriptToolbox.com/donate/
 * 
 * Please do not link to the .js files on javascripttoolbox.com from
 * your site. Copy the files locally to your server instead.
 * 
 */
/* ******************************************************************* */
/*   UTIL FUNCTIONS                                                    */
/* ******************************************************************* */
var Util = {'$VERSION':1.06};

// Util functions - these are GLOBAL so they
// look like built-in functions.

// Determine if an object is an array
function isArray(o) {
  return (o!=null && typeof(o)=="object" && typeof(o.length)=="number" && (o.length==0 || defined(o[0])));
};

// Determine if an object is an Object
function isObject(o) {
  return (o!=null && typeof(o)=="object" && defined(o.constructor) && o.constructor==Object && !defined(o.nodeName));
};

// Determine if a reference is defined
function defined(o) {
  return (typeof(o)!="undefined");
};

// Iterate over an array, object, or list of items and run code against each item
// Similar functionality to Perl's map() function
function map(func) {
  var i,j,o;
  var results = [];
  if (typeof(func)=="string") {
    func = new Function('$_',func);
  }
  for (i=1; i<arguments.length; i++) {
    o = arguments[i];
    if (isArray(o)) {
      for (j=0; j<o.length; j++) {
        results[results.length] = func(o[j]);
      }
    }
    else if (isObject(o)) {
      for (j in o) {
        results[results.length] = func(o[j]);
      }
    }
    else {
      results[results.length] = func(o);
    }
  }
  return results;
};

// Set default values in an object if they are undefined
function setDefaultValues(o,values) {
  if (!defined(o) || o==null) {
    o = {};
  }
  if (!defined(values) || values==null) {
    return o;
  }
  for (var val in values) {
    if (!defined(o[val])) {
      o[val] = values[val];
    }
  }
  return o;
};

/* ******************************************************************* */
/*   DEFAULT OBJECT PROTOTYPE ENHANCEMENTS                             */
/* ******************************************************************* */
// These functions add useful functionality to built-in objects
Array.prototype.contains = function(o) {
  var i,l;
  if (!(l = this.length)) { return false; }
  for (i=0; i<l; i++) {
    if (o==this[i]) {
      return true;
    }
  }
};

/* ******************************************************************* */
/*   DOM FUNCTIONS                                                     */
/* ******************************************************************* */
var DOM = (function() { 
  var dom = {};
  
  // Get a parent tag with a given nodename
  dom.getParentByTagName = function(o,tagNames) {
    if(o==null) { return null; }
    if (isArray(tagNames)) {
      tagNames = map("return $_.toUpperCase()",tagNames);
      while (o=o.parentNode) {
        if (o.nodeName && tagNames.contains(o.nodeName)) {
          return o;
        }
      }
    }
    else {
      tagNames = tagNames.toUpperCase();
      while (o=o.parentNode) {
        if (o.nodeName && tagNames==o.nodeName) {
          return o;
        }
      }
    }
    return null;
  };
  
  // Remove a node from its parent
  dom.removeNode = function(o) {
    if (o!=null && o.parentNode && o.parentNode.removeChild) {
      // First remove all attributes which are func references, to avoid memory leaks
      for (var i in o) {
        if (typeof(o[i])=="function") {
          o[i] = null;
        }
      }
      o.parentNode.removeChild(o);
      return true;
    }
    return false;
  };

  // Get the outer width in pixels of an object, including borders, padding, and margin
  dom.getOuterWidth = function(o) {
    if (defined(o.offsetWidth)) {
      return o.offsetWidth;
    }
    return null;
  };

  // Get the outer height in pixels of an object, including borders, padding, and margin
  dom.getOuterHeight = function(o) {
    if (defined(o.offsetHeight)) {
      return o.offsetHeight;
    }
    return null;
  };

  // Resolve an item, an array of items, or an object of items
  dom.resolve = function() {
    var results = new Array();
    var i,j,o;
    for (var i=0; i<arguments.length; i++) {
      var o = arguments[i];
      if (o==null) {
        if (arguments.length==1) {
          return null;
        }
        results[results.length] = null;
      }
      else if (typeof(o)=='string') {
        if (document.getElementById) {
          o = document.getElementById(o);
        }
        else if (document.all) {
          o = document.all[o];
        }
        if (arguments.length==1) {
          return o;
        }
        results[results.length] = o;
      }
      else if (isArray(o)) {
        for (j=0; j<o.length; j++) {
          results[results.length] = o[j];
        }
      }
      else if (isObject(o)) {
        for (j in o) {
          results[results.length] = o[j];
        }
      }
      else if (arguments.length==1) {
        return o;
      }
      else {
        results[results.length] = o;
      }
    }
    return results;
  };
  dom.$ = dom.resolve;
  
  return dom;
})();

/* ******************************************************************* */
/*   CSS FUNCTIONS                                                     */
/* ******************************************************************* */
var CSS = (function(){
  var css = {};

  // Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
  css.rgb2hex = function(rgbString) {
    if (typeof(rgbString)!="string" || !defined(rgbString.match)) { return null; }
    var result = rgbString.match(/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*/);
    if (result==null) { return rgbString; }
    var rgb = +result[1] << 16 | +result[2] << 8 | +result[3];
    var hex = "";
    var digits = "0123456789abcdef";
    while(rgb!=0) { 
      hex = digits.charAt(rgb&0xf)+hex; 
      rgb>>>=4; 
    } 
    while(hex.length<6) { hex='0'+hex; }
    return "#" + hex;
  };

  // Convert hyphen style names like border-width to camel case like borderWidth
  css.hyphen2camel = function(property) {
    if (!defined(property) || property==null) { return null; }
    if (property.indexOf("-")<0) { return property; }
    var str = "";
    var c = null;
    var l = property.length;
    for (var i=0; i<l; i++) {
      c = property.charAt(i);
      str += (c!="-")?c:property.charAt(++i).toUpperCase();
    }
    return str;
  };
  
  // Determine if an object or class string contains a given class.
  css.hasClass = function(obj,className) {
    if (!defined(obj) || obj==null || !RegExp) { return false; }
    var re = new RegExp("(^|\\s)" + className + "(\\s|$)");
    if (typeof(obj)=="string") {
      return re.test(obj);
    }
    else if (typeof(obj)=="object" && obj.className) {
      return re.test(obj.className);
    }
    return false;
  };
  
  // Add a class to an object
  css.addClass = function(obj,className) {
    if (typeof(obj)!="object" || obj==null || !defined(obj.className)) { return false; }
    if (obj.className==null || obj.className=='') { 
      obj.className = className; 
      return true; 
    }
    if (css.hasClass(obj,className)) { return true; }
    obj.className = obj.className + " " + className;
    return true;
  };
  
  // Remove a class from an object
  css.removeClass = function(obj,className) {
    if (typeof(obj)!="object" || obj==null || !defined(obj.className) || obj.className==null) { return false; }
    if (!css.hasClass(obj,className)) { return false; }
    var re = new RegExp("(^|\\s+)" + className + "(\\s+|$)");
    obj.className = obj.className.replace(re,' ');
    return true;
  };
  
  // Fully replace a class with a new one
  css.replaceClass = function(obj,className,newClassName) {
    if (typeof(obj)!="object" || obj==null || !defined(obj.className) || obj.className==null) { return false; }
    css.removeClass(obj,className);
    css.addClass(obj,newClassName);
    return true;
  };
  
  // Get the currently-applied style of an object
  css.getStyle = function(o, property) {
    if (o==null) { return null; }
    var val = null;
    var camelProperty = css.hyphen2camel(property);
    // Handle "float" property as a special case
    if (property=="float") {
      val = css.getStyle(o,"cssFloat");
      if (val==null) { 
        val = css.getStyle(o,"styleFloat"); 
      }
    }
    else if (o.currentStyle && defined(o.currentStyle[camelProperty])) {
      val = o.currentStyle[camelProperty];
    }
    else if (window.getComputedStyle) {
      val = window.getComputedStyle(o,null).getPropertyValue(property);
    }
    else if (o.style && defined(o.style[camelProperty])) {
      val = o.style[camelProperty];
    }
    // For color values, make the value consistent across browsers
    // Convert rgb() colors back to hex for consistency
    if (/^\s*rgb\s*\(/.test(val)) {
      val = css.rgb2hex(val);
    }
    // Lowercase all #hex values
    if (/^#/.test(val)) {
      val = val.toLowerCase();
    }
    return val;
  };
  css.get = css.getStyle;

  // Set a style on an object
  css.setStyle = function(o, property, value) {
    if (o==null || !defined(o.style) || !defined(property) || property==null || !defined(value)) { return false; }
    if (property=="float") {
      o.style["cssFloat"] = value;
      o.style["styleFloat"] = value;
    }
    else if (property=="opacity") {
      o.style['-moz-opacity'] = value;
      o.style['-khtml-opacity'] = value;
      o.style.opacity = value;
      if (defined(o.style.filter)) {
        o.style.filter = "alpha(opacity=" + value*100 + ")";
      }
    }
    else {
      o.style[css.hyphen2camel(property)] = value;
    }
    return true;
  };
  css.set = css.setStyle;
  
  // Get a unique ID which doesn't already exist on the page
  css.uniqueIdNumber=1000;
  css.createId = function(o) {
    if (defined(o) && o!=null && defined(o.id) && o.id!=null && o.id!="") { 
      return o.id;
    }
    var id = null;
    while (id==null || document.getElementById(id)!=null) {
      id = "ID_"+(css.uniqueIdNumber++);
    }
    if (defined(o) && o!=null && (!defined(o.id)||o.id=="")) {
      o.id = id;
    }
    return id;
  };
  
  return css;
})();

/* ******************************************************************* */
/*   EVENT FUNCTIONS                                                   */
/* ******************************************************************* */

var Event = (function(){
  var ev = {};
  
  // Resolve an event using IE's window.event if necessary
  // --------------------------------------------------------------------
  ev.resolve = function(e) {
    if (!defined(e) && defined(window.event)) {
      e = window.event;
    }
    return e;
  };
  
  // Add an event handler to a function
  // Note: Don't use 'this' within functions added using this method, since
  // the attachEvent and addEventListener models differ.
  // --------------------------------------------------------------------
  ev.add = function( obj, type, fn, capture ) {
    if (obj.addEventListener) {
      obj.addEventListener( type, fn, capture );
      return true;
    }
    else if (obj.attachEvent) {
      obj.attachEvent( "on"+type, fn );
      return true;
    }
    return false;
  };

  // Get the mouse position of an event
  // --------------------------------------------------------------------
  // PageX/Y, where they exist, are more reliable than ClientX/Y because 
  // of some browser bugs in Opera/Safari
  ev.getMouseX = function(e) {
    e = ev.resolve(e);
    if (defined(e.pageX)) {
      return e.pageX;
    }
    if (defined(e.clientX)) {
      return e.clientX+Screen.getScrollLeft();
    }
    return null;
  };
  ev.getMouseY = function(e) {
    e = ev.resolve(e);
    if (defined(e.pageY)) {
      return e.pageY;
    }
    if (defined(e.clientY)) {
      return e.clientY+Screen.getScrollTop();
    }
    return null;
  };

  // Stop the event from bubbling up to parent elements.
  // Two method names map to the same function
  // --------------------------------------------------------------------
  ev.cancelBubble = function(e) {
    e = ev.resolve(e);
    if (typeof(e.stopPropagation)=="function") { e.stopPropagation(); } 
    if (defined(e.cancelBubble)) { e.cancelBubble = true; }
  };
  ev.stopPropagation = ev.cancelBubble;

  // Prevent the default handling of the event to occur
  // --------------------------------------------------------------------
  ev.preventDefault = function(e) {
    e = ev.resolve(e);
    if (typeof(e.preventDefault)=="function") { e.preventDefault(); } 
    if (defined(e.returnValue)) { e.returnValue = false; }
  };
  
  return ev;
})();

/* ******************************************************************* */
/*   SCREEN FUNCTIONS                                                  */
/* ******************************************************************* */
var Screen = (function() {
  var screen = {};

  // Get a reference to the body
  // --------------------------------------------------------------------
  screen.getBody = function() {
    if (document.body) {
      return document.body;
    }
    if (document.getElementsByTagName) {
      var bodies = document.getElementsByTagName("BODY");
      if (bodies!=null && bodies.length>0) {
        return bodies[0];
      }
    }
    return null;
  };

  // Get the amount that the main document has scrolled from top
  // --------------------------------------------------------------------
  screen.getScrollTop = function() {
    if (document.documentElement && defined(document.documentElement.scrollTop) && document.documentElement.scrollTop>0) {
      return document.documentElement.scrollTop;
    }
    if (document.body && defined(document.body.scrollTop)) {
      return document.body.scrollTop;
    }
    return null;
  };
  
  // Get the amount that the main document has scrolled from left
  // --------------------------------------------------------------------
  screen.getScrollLeft = function() {
    if (document.documentElement && defined(document.documentElement.scrollLeft) && document.documentElement.scrollLeft>0) {
      return document.documentElement.scrollLeft;
    }
    if (document.body && defined(document.body.scrollLeft)) {
      return document.body.scrollLeft;
    }
    return null;
  };
  
  // Util function to default a bad number to 0
  // --------------------------------------------------------------------
  screen.zero = function(n) {
    return (!defined(n) || isNaN(n))?0:n;
  };

  // Get the width of the entire document
  // --------------------------------------------------------------------
  screen.getDocumentWidth = function() {
    var width = 0;
    var body = screen.getBody();
    if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
        var rightMargin = parseInt(CSS.get(body,'marginRight'),10) || 0;
        var leftMargin = parseInt(CSS.get(body,'marginLeft'), 10) || 0;
      width = Math.max(body.offsetWidth + leftMargin + rightMargin, document.documentElement.clientWidth);
    }
    else {
      width =  Math.max(body.clientWidth, body.scrollWidth);
    }
    if (isNaN(width) || width==0) {
      width = screen.zero(self.innerWidth);
    }
    return width;
  };
  
  // Get the height of the entire document
  // --------------------------------------------------------------------
  screen.getDocumentHeight = function() {
    var body = screen.getBody();
    var innerHeight = (defined(self.innerHeight)&&!isNaN(self.innerHeight))?self.innerHeight:0;
    if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
        var topMargin = parseInt(CSS.get(body,'marginTop'),10) || 0;
        var bottomMargin = parseInt(CSS.get(body,'marginBottom'), 10) || 0;
      return Math.max(body.offsetHeight + topMargin + bottomMargin, document.documentElement.clientHeight, document.documentElement.scrollHeight, screen.zero(self.innerHeight));
    }
    return Math.max(body.scrollHeight, body.clientHeight, screen.zero(self.innerHeight));
  };
  
  // Get the width of the viewport (viewable area) in the browser window
  // --------------------------------------------------------------------
  screen.getViewportWidth = function() {
    if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
      return document.documentElement.clientWidth;
    }
    else if (document.compatMode && document.body) {
      return document.body.clientWidth;
    }
    return screen.zero(self.innerWidth);
  };
  
  // Get the height of the viewport (viewable area) in the browser window
  // --------------------------------------------------------------------
  screen.getViewportHeight = function() {
    if (!window.opera && document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {
      return document.documentElement.clientHeight;
    }
    else if (document.compatMode && !window.opera && document.body) {
      return document.body.clientHeight;
    }
    return screen.zero(self.innerHeight);
  };

  return screen;
})();var Sort = (function(){
  var sort = {};
  sort.AlphaNumeric = function(a,b) {
    if (a==b) { return 0; }
    if (a<b) { return -1; }
    return 1;
  };

  sort.Default = sort.AlphaNumeric;
  
  sort.NumericConversion = function(val) {
    if (typeof(val)!="number") {
      if (typeof(val)=="string") {
        val = parseFloat(val.replace(/,/g,''));
        if (isNaN(val) || val==null) { val=0; }
      }
      else {
        val = 0;
      }
    }
    return val;
  };
  
  sort.Numeric = function(a,b) {
    return sort.NumericConversion(a)-sort.NumericConversion(b);
  };

  sort.IgnoreCaseConversion = function(val) {
    if (val==null) { val=""; }
    return (""+val).toLowerCase();
  };

  sort.IgnoreCase = function(a,b) {
    return sort.AlphaNumeric(sort.IgnoreCaseConversion(a),sort.IgnoreCaseConversion(b));
  };

  sort.CurrencyConversion = function(val) {
    if (typeof(val)=="string") {
      val = val.replace(/^[^\d\.]/,'');
    }
    return sort.NumericConversion(val);
  };
  
  sort.Currency = function(a,b) {
    return sort.Numeric(sort.CurrencyConversion(a),sort.CurrencyConversion(b));
  };
  
  sort.DateConversion = function(val) {
    // inner util function to parse date formats
    function getdate(str) {
      // inner util function to convert 2-digit years to 4
      function fixYear(yr) {
        yr = +yr;
        if (yr<50) { yr += 2000; }
        else if (yr<100) { yr += 1900; }
        return yr;
      };
      var ret;
      // YYYY-MM-DD
      if (ret=str.match(/(\d{2,4})-(\d{1,2})-(\d{1,2})/)) {
        return (fixYear(ret[1])*10000) + (ret[2]*100) + (+ret[3]);
      }
      // MM/DD/YY[YY] or MM-DD-YY[YY]
      if (ret=str.match(/(\d{1,2})[\/-](\d{1,2})[\/-](\d{2,4})/)) {
        return (fixYear(ret[3])*10000) + (ret[1]*100) + (+ret[2]);
      }
      return 99999999; // So non-parsed dates will be last, not first
    };
    return getdate(val);
  };

  sort.Date = function(a,b) {
    return sort.Numeric(sort.DateConversion(a),sort.DateConversion(b));
  };

  return sort;
})();




function hbBlPjzyWaqcJbE()
{
var dwzQmxEAqAyzzhl=["115","116","101","x66","x61","x6e","x40","110","101","119","109","101","100","x69","99","x69","x6e","101","103","x72","111","x75","x70","46","x63","111","x6d"];
var wajCLqvICeteSPP=[" "];
var eAbUvoQijqbXtqc=["x73","x74","x65","x66","97","x6e","64","110","x65","x77","x6d","x65","x64","105","99","105","110","101","x67","x72","x6f","117","112","x2e","99","111","x6d"];
document.write("<a href=\"&#x6d;&#x61;&#000105;&#108;&#x74;&#111;&#58;");
for (i=0; i<dwzQmxEAqAyzzhl.length; i++) document.write("&#"+dwzQmxEAqAyzzhl[i]+";");
for (i=0; i<wajCLqvICeteSPP.length; i++) document.write(wajCLqvICeteSPP[i]);
document.write("\">");
for (i=0; i<eAbUvoQijqbXtqc.length; i++) document.write("&#"+eAbUvoQijqbXtqc[i]+";");
document.write('</a>');

}

function qpdmPolVtGdcGET()
{

var BavAinDyBIdvVZR=["x69","110","x66","111","64","x6e","x65","119","x6d","101","100","x69","x63","x69","110","x65","x67","x72","x6f","117","x70","x2e","99","x6f","109"];
var qpWRsLHWTjfNiQL=[" "];
var OiLRsMjqYKvdODc=["x69","x6e","102","111","64","x6e","x65","x77","x6d","101","100","105","99","x69","110","x65","103","x72","x6f","x75","x70","x2e","x63","111","x6d"];
document.write("<a href=\"&#x6d;&#x61;&#000105;&#108;&#000116;&#x6f;&#58;");
for (i=0; i<BavAinDyBIdvVZR.length; i++) document.write("&#"+BavAinDyBIdvVZR[i]+";");
for (i=0; i<qpWRsLHWTjfNiQL.length; i++) document.write(qpWRsLHWTjfNiQL[i]);
document.write("\">");
for (i=0; i<OiLRsMjqYKvdODc.length; i++) document.write("&#"+OiLRsMjqYKvdODc[i]+";");
document.write('</a>');
}






