/*---- dt tools v3.5.0 *//*
Written by: David Tsuji
Help: dt.flodge.com
Last Updated: Wednesday 17 July 2007 : 1537
*/

function dt_error() { try{window.status="Old browser software. Please upgrade."}catch(e){} }

/*---- dt.tools */
dt_toolbox = function() {
	browserDetection = function() {
		var agt = navigator.userAgent.toLowerCase();
		
		this._ie		=	agt.match(/msie(.*)?windows/)?true:false;
		this._safari	=	agt.match(/mac(.*)?safari/)?true:false;
		this._firefox	=	agt.match(/mozilla(.*)?firefox/)?true:false;
		this._mozilla	=	agt.match(/mozilla(.*)?gecko/)&&!this._firefox?true:false;
		this._os		=	agt.match(/windows/)?"win":agt.match(/macintosh/)?"mac":"other";
		this._version	=	this._ie?parseFloat(agt.match(/msie .../).toString().split(" ")[1]):
							this._firefox||this._safari?parseFloat(agt.match(/(firefox|safari)\/.../).toString().split("/")[1]):0;
		
	}
	this.browser = new browserDetection();
	this.attachEvent = function(obj, evt, func) {
		try {
			obj.attachEvent(evt,func);
		} catch(e) {
			try { obj.addEventListener(evt.split("on").join(""),func,false) }catch(e){dt_error()}
		}
	}
	this.detachEvent = function(obj, evt, func) {
		try {
			obj.detachEvent(evt, func);
		} catch(e) {
			try { obj.removeEventListener(evt.split("on").join(""),func) }catch(e){dt_error()}
		}
	}
	this.getPosition = function(o) {
		var x, y;
		
		try {
			x = (o.getBoundingClientRect().left -2) + document.body.scrollLeft;
			y = (o.getBoundingClientRect().top -2) + document.body.scrollTop;
		} catch(e) {
			try {
				x = document.getBoxObjectFor(o).x;
				y = document.getBoxObjectFor(o).y;
			}catch(e) {
				
				try {
					notie_getx = function(p_el) {
						while (p_el.tagName.toLowerCase() == "a") p_el = p_el.firstChild;
						var _xPos = p_el.offsetLeft, _tempEl = p_el.offsetParent;
				
						while ( _tempEl != null ) {
							_xPos += _tempEl.offsetLeft;
							_tempEl = _tempEl.offsetParent;
						}
						return _xPos;
					}
					
					notie_gety = function(p_el) {
						while (p_el.tagName.toLowerCase() == "a") p_el = p_el.firstChild;
						var _yPos = p_el.offsetTop, _tempEl = p_el.offsetParent;
				
						while ( _tempEl != null ) {
							_yPos += _tempEl.offsetTop;
							_tempEl = _tempEl.offsetParent;
						}
						return _yPos;
					}
					x = notie_getx(o);
					y = notie_gety(o);

				} catch(e) {
					x = 0;
					y = 0;
				}
			}
		}
		
		o._x = x;
		o._y = y;
	
	}
	this.flyouts = function() {
		dt.flyouts.fo_arr = new Array();
		dt.attachEvent(window, "onload", dt.flyouts.onload);
	}
	this.flyouts.onload = function() {
		var menu_o;

		try {
			menu_o = document.getElementsByName("fomenu");
			for (var i=0;i<menu_o.length;i++) dt.flyouts.init(menu_o[i]);
		} catch(e) {}

		if (dt.flyouts.hasRun != true) {
			try {	dt.attachEvent(document.body, "onclick", dt.flyouts.kill)					}catch(e){}
			try {	dt.attachEvent(window, "onresize", dt.flyouts.fixPositionsAfterEvent)		}catch(e){}
			try {	dt.attachEvent(window, "onscroll", dt.flyouts.fixPositionsAfterEvent)		}catch(e){}
		}
		
		//-- So the events do not keep attaching
		dt.flyouts.hasRun = true;
	}
	this.flyouts.fixPositionsAfterEvent = function() {
		try { clearInterval(dt.flyouts.fixpos_iid) }catch(e){}
		dt.flyouts.fixpos_iid = setInterval(dt.flyouts.fixPositions, 100);
	}
	this.flyouts.fixPositions = function() {
		var menu_o, flyout_o;
		
		try { clearInterval(dt.flyouts.fixpos_iid) }catch(e){}
		
		menu_o = document.getElementsByName("fomenu");
		for (var i=0;i<menu_o.length;i++) {
			try {
				var foba = navigator.userAgent.toLowerCase();
				var pos_definition_arr = new Array();
				flyout_o = menu_o[i];
				dt.getPosition(flyout_o);
				mpos = flyout_o.getAttribute("foposition").split(",");
				switch(mpos.length) {
					case 2:
						pos_definition_arr.push(0);
						pos_definition_arr.push(1);
					break;
					case 4:
						if ((foba.indexOf("msie") != -1) && (foba.indexOf("opera") == -1)) {
							pos_definition_arr.push(0);
							pos_definition_arr.push(1);
						} else {
							pos_definition_arr.push(2);
							pos_definition_arr.push(3);
						}
					break;
					default:
						if ((foba.indexOf("msie") != -1) && (foba.indexOf("opera") == -1)) {
							pos_definition_arr.push(0);
							pos_definition_arr.push(1);
						} else if (	(foba.indexOf('mozilla')!=-1) && (foba.indexOf('spoofer')==-1)
									&& (foba.indexOf('compatible') == -1) && (foba.indexOf('opera')==-1)
									&& (foba.indexOf('webtv')==-1) && (foba.indexOf('hotjava')==-1)
									&& (foba.indexOf('safari')==-1) ) {
							pos_definition_arr.push(2);
							pos_definition_arr.push(3);
						} else {
							pos_definition_arr.push(4);
							pos_definition_arr.push(5);
						}
					break;
				}

				if (isNaN(mpos[pos_definition_arr[0]])) {
					if (mpos[pos_definition_arr[0]].indexOf("this") != -1) mpos[pos_definition_arr[0]] = mpos[pos_definition_arr[0]].replace("this", "flyout_o._x");
					
					if (mpos[pos_definition_arr[0]].indexOf("element") != -1) {
						mpos[pos_definition_arr[0]] = mpos[pos_definition_arr[0]].split("element").join("flyout_o");
					}
					
					mpos[pos_definition_arr[0]] = eval(mpos[pos_definition_arr[0]]);
				}
				if (isNaN(mpos[pos_definition_arr[1]])) {
					if (mpos[pos_definition_arr[1]].indexOf("this") != -1) mpos[pos_definition_arr[1]] = mpos[pos_definition_arr[1]].replace("this", "flyout_o._y");
					
					if (mpos[pos_definition_arr[1]].indexOf("element") != -1) {
						mpos[pos_definition_arr[1]] = mpos[pos_definition_arr[1]].split("element").join("flyout_o");
					}
					
					mpos[pos_definition_arr[1]] = eval(mpos[pos_definition_arr[1]]);
				}

				document.getElementsByName(flyout_o.getAttribute("fomenu"))[0].style.left = mpos[pos_definition_arr[0]]+"px";
				document.getElementsByName(flyout_o.getAttribute("fomenu"))[0].style.top = mpos[pos_definition_arr[1]]+"px";
			}catch(e){}
		}
	}
	this.flyouts.show = function() {
		var o = dt.flyouts.fo_arr[0];
		try {
			
			while(o.getAttribute("fochildof")!=null) {
				o = document.getElementsByName(o.getAttribute("fochildof"))[0];
				dt.flyouts.fo_arr.push(o);
			}
			
		}catch(e){}
		
		for (var i=0; i<dt.flyouts.fo_arr.length; i++) {
			dt.flyouts.fo_arr[i].style.visibility = "visible";
		}

		dt.flyouts.showHideSelects("hidden");
		try { clearInterval(dt.flyouts.check_iid) }catch(e){}
		dt.flyouts.check_iid = setInterval(dt.flyouts.hide, 1500);
	}
	this.flyouts.init = function(flyout_o) {
		var sticky_bln = false;

		// Used in the vertical navs where the flyouts double as sticky static navs
		//if (o.getAttribute("stickonurl")) if (location.href.match(o.getAttribute("stickonurl"))) sticky_bln = true;
		if (flyout_o.getAttribute("fomenu") == null) {

			try {
				if (dt.flyouts.hasRun != true) dt.attachEvent(flyout_o, "onmouseover", dt.flyouts.kill);
			} catch(e){}
			
		} else if (flyout_o.getAttribute("fomenu") && sticky_bln == false) {

			/*---- Fix Positions */
			dt.flyouts.fixPositions();
			/*---- Fix Positions */

			/*---- Mouse Events */
				//-- Flyout elements
				fo_over_fn = function() {
					var this_o, exist_bln = false;
					try { this_o = event.srcElement } catch(e) { this_o = this }
					try { while (!this_o.getAttribute("fomenu")&&this_o.parentNode) this_o = this_o.parentNode } catch(e){}
					if (dt.flyouts.fo_arr[0] != document.getElementsByName(this_o.getAttribute("fomenu"))[0])
						dt.flyouts.kill();
					dt.flyouts.over_bln = true;
					dt.flyouts.fo_arr.push(document.getElementsByName(this_o.getAttribute("fomenu"))[0]);
					dt.flyouts.show();
				}
		
				fo_out_fn = function() {
					dt.flyouts.over_bln = false;
				}
				
				//-- Flyout elements
				fo_el_over_fn = function() {
					dt.flyouts.over_bln = true;
				}
				
				fo_el_out_fn = function() {
					dt.flyouts.over_bln = false;
				}
				
				//-- Apply mouse events
				if (dt.flyouts.hasRun != true) {
					dt.attachEvent(flyout_o, "onmouseover", fo_over_fn);
					dt.attachEvent(flyout_o, "onmouseout", fo_out_fn);
					try {
						dt.attachEvent(document.getElementsByName(flyout_o.getAttribute("fomenu"))[0], "onmouseover", fo_el_over_fn);
						dt.attachEvent(document.getElementsByName(flyout_o.getAttribute("fomenu"))[0], "onmouseout", fo_el_out_fn);
					} catch(e){}
				}
			/*---- Mouse Events */

		}
	}
	this.flyouts.kill = function(fn) {
		for (var i=0; i<dt.flyouts.fo_arr.length; i++) {
			
			dt.flyouts.fo_arr[i].style.visibility = "hidden";
			
		}
		dt.flyouts.fo_arr = new Array();
		dt.flyouts.over_bln = false;
		try { clearInterval(dt.flyouts.check_iid) } catch(e){}
		dt.flyouts.check_iid = null;
		dt.flyouts.showHideSelects("visible");
	}
	this.flyouts.hide = function() {
		if (dt.flyouts.over_bln != true) dt.flyouts.kill();
	}
	this.flyouts.showHideSelects = function() {
		try {
			for (var i=0; (select_o=document.getElementsByTagName("SELECT")[i]); i++)
				select_o.style.visibility = type;
		} catch(e){}
	}
	this.xmlhttp = function(file_txt, form_el) { /*---- 200701081405 */
		
		/*---- declaration */
		window.xmlhttp_id = !window.xmlhttp_id?1:window.xmlhttp_id+=1;
		this._conn = {	xmlhttp:null,
						id:window.xmlhttp_id,
						timeout:20000,
						timeoutID:null,
						check:50,
						intervalID:null,
						types:new Array('MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'),
						method:"GET",
						header:"application/x-www-form-urlencoded",
						postdata:null,
						state:null }

		this._file = (file_txt==undefined)?null:file_txt;
		this._form = (form_el==undefined)?"null":form_el;

		/*---- declaration */
		
		
		/*---- INIT */
		try {
			this._conn.xmlhttp = new XMLHttpRequest();
		} catch(e) {
			for(var i=0; i<this._conn.types.length; i++){
				try {
					this._conn.xmlhttp = new ActiveXObject(this._conn.types[i]);
					break;
				} catch(e){}
			}
		}
		/*---- INIT */
		
		
		/*---- callbacks */
		this.onComplete	= function(){}			
		this.onAbort	= function(){}
		this.onError	= function(){}
		/*---- callbacks */
		
		
		/*---- functions */
		this.abort = function(noEvent_bln) {
			
			//-- Check if the object is currently running, then abort it
			try {

				try { this._conn.xmlhttp.abort() }catch(e){}
				try {window.clearInterval(this._conn.intervalID) }catch(e){}
				delete this._conn.intervalID;
				delete this._conn.timeoutID;
				if (noEvent_bln!=true) this.onAbort();
					
			}catch(e){this.onError(this.getError(40))}

		}
		
		/*
		this.getForm is from Yahoo's "Connection Manager" setForm:function(formId, isUpload, secureUri)
		
		Copyright (c) 2006, Yahoo! Inc. All rights reserved.
		Code licensed under the BSD License:
		http://developer.yahoo.net/yui/license.txt
		Version: 0.11.3

		*/
		this.getForm = function(oForm) {
	
			var oElement, oName, oValue, oDisabled;
			var hasSubmit = false;
			var _sFormData = "";
	
			// Iterate over the form elements collection to construct the
			// label-value pairs.
			for (var i=0; i<oForm.elements.length; i++){
				oElement = oForm.elements[i];
				oDisabled = oForm.elements[i].disabled;
				oName = oForm.elements[i].name;
				oValue = oForm.elements[i].value;
	
				// Do not submit fields that are disabled or
				// do not have a name attribute value.
				if(!oDisabled && oName)
				{
					switch (oElement.type)
					{
						case 'select-one':
						case 'select-multiple':
							for(var j=0; j<oElement.options.length; j++){
								if(oElement.options[j].selected){
									if(window.ActiveXObject){
										_sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oElement.options[j].attributes['value'].specified?oElement.options[j].value:oElement.options[j].text) + '&';
									}
									else{
										_sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oElement.options[j].hasAttribute('value')?oElement.options[j].value:oElement.options[j].text) + '&';
									}
	
								}
							}
							break;
						case 'radio':
						case 'checkbox':
							if(oElement.checked){
								_sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
							}
							break;
						case 'file':
							// stub case as XMLHttpRequest will only send the file path as a string.
						case undefined:
							// stub case for fieldset element which returns undefined.
						case 'reset':
							// stub case for input type reset button.
						case 'button':
							// stub case for input type button elements.
							break;
						case 'submit':
							if(hasSubmit == false){
								_sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
								hasSubmit = true;
							}
							break;
						default:
							_sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
							break;
					}
				}
			}

			_sFormData = _sFormData.substr(0, _sFormData.length - 1);
			
			return _sFormData;

		}
		this.handleResponse = function() {
			this.onComplete(this._conn.xmlhttp.responseText);
		}
		this.startListener = function() {

			var o = this;

			this._conn.timeoutID = window.setTimeout(function(){

				if (o._conn.timeoutID != undefined) {
					o.abort(true);
					o.onError(o.getError(12));
				}
				
			}, this._conn.timeout);
			
			this._conn.intervalID = window.setInterval(function(){
				
				try {

					if (o._conn.xmlhttp.readyState == 4 && o._conn.intervalID != undefined) {
						window.clearInterval(o._conn.intervalID);
						delete o._conn.intervalID;
						delete o._conn.timeoutID;
						o.handleResponse();
					}
					//} else o.onError(o.getError(13));
					
				}catch(e){o.onError(o.getError(30))}
														 
			}, this._conn.check);

		}
		this.getError = function(code_num) {
			var output_obj;
			switch (code_num.toString()) {
				case "10":
					output_obj = {code:code_num, description:"Error creating XMLHTTP object"};
				break;
				case "11":
					output_obj = {code:code_num, description:"Unknown error while trying to connect"};
				break;
				case "12":
					output_obj = {code:code_num, description:"A timeout occured"};
				break;
				case "13":
					output_obj = {code:code_num, description:"Connection error. Possibly a network error or a data transfer error."};
				break;
				case "20":
					output_obj = {code:code_num, description:"Error collating form data"};
				break;
				case "30":
					output_obj = {code:code_num, description:"Error checking the status of the connection"};
				break;
				case "40":
					output_obj = {code:code_num, description:"Error aborting the connection"};
				break;
				default:
					output_obj = {code:12222, description:"An unknown error occured"};
				break;
			}
			return output_obj;
		}
		/*---- functions */

		
		
		/*---- start connection */
		this.connect = function() {
			try {
				
				//-- If this object is already running, kill the running process
				try {
					this.abort(true);
				}catch(e){}
				
				//-- Append form data to the file
				try {
					
					this._form = (this._form!="null")?this._form:"null";
					
					if (this._form != "null") {
						if (this._form.nodeName.toLowerCase() == "form") {

							this._conn.postdata = this.getForm(this._form);
							this._conn.method = "POST";

						}
					}
					
				}catch(e){this.onError(this.getError(20))}
				
				try {
					
					//-- Fix cache
					var cache_id = new Date();
					cache_id = cache_id.getTime();
					this._file += (this._file.match("\\?")) ? "&cache_id=" + cache_id : "?cache_id=" + cache_id;
					//-- Fix cache

					this._conn.xmlhttp.open(this._conn.method, this._file, true);
					if (this._conn.method=="POST") this._conn.xmlhttp.setRequestHeader("Content-Type", this._conn.header);
					this.startListener();
					this._conn.xmlhttp.send(this._conn.postdata);
				
				}catch(e){this.onError(this.getError(10))}

			}catch(e){this.onError(this.getError(11))}

		}
		/*---- start connection */
		
	}
	this.shadow = function(opacity_num, color_txt) { /*---- 200707171339 */
		
		/*---- declaration */
		this._opacity = (opacity_num==undefined)?70:opacity_num;
		this._color = (color_txt==undefined)?"#000000":color_txt;
		this._el = "";
		/*---- declaration */
		
		
		/*---- callbacks */
		this.onComplete	= function(){}			
		/*---- callbacks */
		
		
		/*---- functions */
		this.show = function() {
			try {
				this.hide();
			}catch(e){}
			try {
				
				var css_txt;
				var uid_txt = "uid" + Math.floor(Math.random() * (9999-100+1) )+100;

				css_txt =	" style=\"" +
							"position:fixed;" +
							"width:100%;" +
							"height:100%;" +
							"left:0;" +
							"top:0;" +
							"background-color:"+this._color+";" +
							"opacity:."+this._opacity+";" +
							"filter:alpha(opacity="+this._opacity+");" +
							"-moz-opacity:." + this._opacity +
							"\""
					
				// Fix IE 6 CSS
				if (dt.browser._ie && dt.browser._version < 7) {
					document.body.style.margin = 0;
					document.body.style.padding = 0;
					document.body.style.height = "100%";
					document.body.style.overflow = "hidden";
					css_txt = css_txt.split("left:0").join("left:"+document.body.scrollLeft);
					css_txt = css_txt.split("top:0").join("top:"+document.body.scrollTop);
					css_txt = css_txt.split("position:fixed").join("position:absolute");
				}

				// Hide select fields
				try {
					for (var i=0; i<document.getElementsByTagName("SELECT").length; i++) {
						s = document.getElementsByTagName("SELECT")[i];
						s.style.display = "none";
					}
				} catch(e) {}
				// Hide select fields

				dt.insertAdjacentHTML(document.body, "beforeEnd", "<div id=\""+uid_txt+"\" "+css_txt+"></div>");
				this._el = document.getElementById(uid_txt);
				
				this.onComplete();
				
				return this._el;
				
			}catch(e){}
		}
		
		this.hide = function() {

			try {
				this._el.removeNode(true);
			} catch(e) {
				try {
					this._el.parentNode.removeChild(this._el);	
				}catch(e){}
			}
			
			// Show select fields
			try {
				for (var i=0; i<document.getElementsByTagName("SELECT").length; i++) {
					s = document.getElementsByTagName("SELECT")[i];
					s.style.display = "inline";
				}
			} catch(e) {}
			// Show select fields
			
		}
		
	}
	this.rollovers = function() { /*---- 200707031106 */
		for (var i=0;(img=document.images[i]);i++) {
			try {
				if (location.href.match(img.getAttribute("stickonurl")) && img.getAttribute("stickonurl") != null) {
					img.src = img.getAttribute("stickimg")?img.getAttribute("stickimg"):img.getAttribute("rollover");
				}
			}catch(e){}
			if (img.getAttribute("rollover")&&img.done_bln!=true) {
				img.o=new Image();
				img.n=new Image();
				img.o.src = img.getAttribute("rollover");
				img.n.src = img.src;
				img.done_bln = true;
				over_fn = function() {
					var o;
					try { o=event.srcElement } catch(e) { o=this };
					o.src = o.o.src;
				}
				out_fn = function() {
					var o;
					try { o=event.srcElement } catch(e) { o=this };
					o.src = o.n.src;
				}
				dt.attachEvent(img, "onmouseover", over_fn);
				dt.attachEvent(img, "onmouseout", out_fn);
			}
		}
	}
	this.flash = function(_file, _id, _width, _height, _bgcolor, _requiredversion) {
		
		this._version		= deconcept.SWFObjectUtil.getPlayerVersion().major;
		this._installed		= (this._version>0);

		this._file				= _file;
		this._width				= _width;
		this._height			= _height;
		this._requiredversion	= _requiredversion==undefined&&!parseFloat(_requiredversion)?this._version:parseFloat(_requiredversion);
		this._id				= (_id==undefined||_id=="")?"el"+new Date().getTime():_id;
		this._bgcolor			= _bgcolor;
		this._noflash			= "";
		this._values			= new Array();
		this._settings			= new Array();
		
		this.add = function(_var, _val) {
			this._values.push([_var, _val]);
		}
		
		this.set = function(_var, _val) {
			this._settings.push([_var, _val]);
		}

		this.attach = function(_el) {
			this._el = _el;
			
			if (this._file && this._id && this._el && this._width && this._height) {
				
				if (this._bgcolor == "transparent") this.set("wmode", "transparent");
				
				try { // Trying to write the flash content
					var so = new SWFObject(this._file, this._id, this._width, this._height, this._requiredversion, this._bgcolor);
					try { for (var i=0; i<this._values.length; i++) so.addVariable(this._values[i][0], this._values[i][1]) }catch(e){}
					try { for (var i=0; i<this._settings.length; i++) so.addParam(this._settings[i][0], this._settings[i][1]) }catch(e){}
					so.write(_el);
				}catch(e){}
				try { // Trying to write the non-flash content
					if (this._version < this._requiredversion) document.getElementById(this._el).innerHTML=this._noflash;
				}catch(e){}

			} else alert("An error occured constructing the flash object (possibly missing a required parameter or a parameter was the wrong type)");
		}

	}
	this.validate = function(_form) { /*---- 200707061237 */
		
		var text_re		= /^(?!^\s+$).+$/;
		var email_re	= /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
		var number_re	= /^[0-9\.\-]+$/;
		var date_re		= /^(3{1}[0-1]{1}|[0-2]{1}[1-9]{1})\/(1{1}[0-2]{1}|0{1}[1-9]{1})\/[0-9]{4}$/;
		var url_re		= /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
		var visa_re		= /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/;
		var mc_re		= /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/;
		var amex_re		= /^3[4,7]\d{13}$/;
		var diners_re	= /^3[0,6,8]\d{12}$/;
		var postcode_re	= /^[0-9]{4}$/;
		var ip_re		= /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
		var password_re	= /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$/;
		var phone_re	= /^0[0-9]{9}$/;
		
		this._alert = true;
		this._style = true;
		this._errorstyle = "border-color:#FF0000;color:#FF0000";
		this._originalstyle = "border-color:inherit;color:inherit";
		this._title = "Please correct the following fields:";
		this._form = _form;
		this.el_arr = [];
		
		this.add = function(add_arr){
			try {
			
				for (var i=0; i<add_arr.length; i++) {
					switch(typeof add_arr[i]) {
						case "string":
							if (add_arr[i].split(",").length != 3) throw "error";
							if (eval("this._form."+add_arr[i].split(",")[0]+".value==undefined")) throw "error";
							this.el_arr.push({	field:eval("this._form."+add_arr[i].split(",")[0]),
												validate:add_arr[i].split(",")[1],
												message:add_arr[i].split(",")[2],
												cssclass:{original:"",error:""}	});
						break;
						
						case "object":
							if (add_arr[i].field == undefined || add_arr[i].validate == undefined || add_arr[i].message == undefined) throw "error";
							if (eval("this._form."+add_arr[i].field+".value==undefined")) throw "error";
							if (!add_arr[i].cssclass) add_arr[i].cssclass = {original:"",error:""};
							add_arr[i].field = eval("this._form."+add_arr[i].field);
							this.el_arr.push(add_arr[i]);
							
						break;
						
						default:
							throw "error";
						break;
					}
					switch(this.el_arr[this.el_arr.length-1].validate) {
						case "date":
							var tempdate_txt = this.el_arr[this.el_arr.length-1].field.value;
							if (tempdate_txt.split("/").length==3) {
								if (tempdate_txt.split("/")[0].length==1 && parseFloat(tempdate_txt.split("/")[0]))
									tempdate_txt = "0"+tempdate_txt;
									
								if (tempdate_txt.split("/")[1].length==1 && parseFloat(tempdate_txt.split("/")[1]))
									tempdate_txt = tempdate_txt.split("/")[0]+"/0"+tempdate_txt.split("/")[1]+"/"+tempdate_txt.split("/")[2];
								
								this.el_arr[this.el_arr.length-1].field.value = tempdate_txt;

							}
						break;
					}
				}
				
			}catch(e){alert('An error occurred adding fields to the validate object')}
		};
		
		this.remove = function(_txt) {
			try {
				var found_num;
				for (var i=0; i<this.el_arr.length; i++) {
					if (this.el_arr[i].field.getAttribute("id") == _txt) {
						found_num = i;
						break;
					}
				}
				this.el_arr.splice(found_num, 1);
			}catch(e){alert('An error occured removing a field from the validate object')}
		}
		
		this.addstyle = function(_el) {
			if (this._style && this._errorstyle) {
				_el.field.setAttribute("dtvalidateerror", "true");
				_el.cssclass.error = _el.cssclass.error==""?this._errorstyle:_el.cssclass.error;
				if (_el.cssclass.error.match(/:/)) {
					_el.field.style.cssText = _el.cssclass.error;
				} else {
					_el.field.className = _el.cssclass.error;
				}
			}
		}
		
		this.removestyle = function(_el) {
			if (this._style && this._originalstyle && _el.field.getAttribute("dtvalidateerror") == "true") {
				_el.field.setAttribute("dtvalidateerror", "");
				_el.cssclass.original = _el.cssclass.original==""?this._originalstyle:_el.cssclass.original;
				if (_el.cssclass.original.match(/:/)) {
					_el.field.style.cssText = _el.cssclass.original;
				} else {
					_el.field.className = _el.cssclass.original;
				}
			}
		}
	
		this.validate = function() {
			var fields_arr = [];
			var _date, _re, error_txt = "";
			
			try {
				for (var i=0; i<this.el_arr.length; i++) {
				
					this.removestyle(this.el_arr[i]);
					
					switch(typeof this.el_arr[i].validate) {
						case "string":
							
							try { _re = eval(this.el_arr[i].validate+"_re") }catch(e){ _re = this.el_arr[i].validate }

							_re = new RegExp(_re);
						
							if (!this.el_arr[i].field.value.toString().match(_re)) {
								error_txt += "- "+this.el_arr[i].message+"\n";
								this.addstyle(this.el_arr[i]);
								
							} else {
								switch(this.el_arr[i].validate) {
									case "date":
										_date = this.el_arr[i].field.value;
										_date = new Date(_date.split("/")[2], parseFloat(_date.split("/")[1])-1, _date.split("/")[0]);

										_date =	(_date.getDate()<10?"0":"")+_date.getDate()+"/"+
												((_date.getMonth()+1)<10?"0":"")+(_date.getMonth()+1)+"/"+
												_date.getFullYear();
										
										if (this.el_arr[i].field.value != _date) {
											error_txt += "- "+this.el_arr[i].message+"\n";
											this.addstyle(this.el_arr[i]);
										}

									break;
									
								}
							}
						break;
						
						case "function":
							if (!this.el_arr[i].validate(this._form)) {
								error_txt += "- "+this.el_arr[i].message+"\n";
								this.addstyle(this.el_arr[i]);
							}
						break;
						
						default:
							throw "error";
						break;
					}
				}
				
				if (error_txt != "") {
					error_txt = this._title+":\n\n"+error_txt;
					if (this._alert == true) alert(error_txt);
					try{ this.onInvalid() }catch(e){};
				} else {
					try {
						this.onValid();
					}catch(e){
						if (confirm("Do you want to submit the form")) this._form.submit();
					}
				}
				
			}catch(e) {
				switch(e) {
					case "error":
						alert('An error occurred trying to validate the form');
					break;
					default:
						alert('An error occurred trying to validate the form.');
					break;
				}
			}
			
		}
	}
	this.alert = function(message_txt, timeout_num, color_txt) { /*---- 200707191405*/
		
		/*---- declaration */
		this._message = (message_txt==undefined)?"":message_txt;
		this._timeout = (timeout_num==undefined)?"7200000":parseFloat(timeout_num);
		this._color = (color_txt==undefined)?"#FFD16C":color_txt;
		this._el = "";
		/*---- declaration */
		
		
		/*---- callbacks */
		this.onComplete	= function(){}
		this.onTimeout	= function(){}
		/*---- callbacks */
		
		
		/*---- functions */
		this.show = function() {
			try {
				this.hide();
			}catch(e){}
			try {
				
				var css_txt;
				var uid_txt = "uid" + Math.floor(Math.random() * (9999-100+1) )+100;

				css_txt =	" style=\"" +
							"position:fixed;" +
							"width:100%;" +
							"height:40px;" +
							"left:0;" +
							"top:0;" +
							"background-color:"+this._color+";" +
							"\""

				dt.insertAdjacentHTML(document.body, "beforeEnd", "<div id=\""+uid_txt+"\" "+css_txt+"></div>");
				this._el = document.getElementById(uid_txt);
				
				this.onComplete();
				
				return this._el;
				
			}catch(e){}
		}
		
		this.hide = function() {

			try {
				this._el.removeNode(true);
			} catch(e) {
				try {
					this._el.parentNode.removeChild(this._el);	
				}catch(e){}
			}
			
		}
		
	}
	this.aalert = function() { /*---- 200701090800 */
		this.alert.autohide_iid = null;
	}
	this.aalert.hide = function() {
		try { var o = document.getElementsByName("dt_alert_holder")[0] } catch(e){}
		try {
			dt.detachEvent(window, "onscroll", fix_dtAlert_pos_fn);
			dt.detachEvent(window, "onresize", fix_dtAlert_pos_fn);
			o.innerHTML = "";
		}catch(e){}
		try { clearInterval(dt.alert.autohide_iid) }catch(e){}
		try {
			o.removeNode(true);
		} catch(e) {
			try {o.parentNode.removeChild(o) }catch(e){}
		}
	}
	this.aalert.show = function(msg, time) {
		
		try {
			
			time = (!time)?9999:time;
			
			try { clearInterval(dt.alert.autohide_iid); }catch(e){}
			
			try {
				dt.alert.autohide_iid = setInterval("dt.alert.hide()", parseFloat(time)*1000);
			}catch(e){}
			
			var o_holder, o_content_tbl, o_content;			
			
			if (document.getElementsByName("dt_alert_holder").length == 0) {
				document.body.insertAdjacentHTML("afterBegin", "<div id=\"dt_alert_holder\" name=\"dt_alert_holder\" style=\"position:absolute;z-index:99999\"><table id=\"dt_alert_bar\" name=\"dt_alert_bar\"><tr><td name=\"dt_alert_content\" id=\"dt_alert_content\"></td><td width=1%><input type=button value=close onclick=dt.alert.hide()></td></tr></table><table style=\"width:100%;height:20px;filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=#99000000, endColorstr=#00000000)\"><tr><td>&nbsp;</td></tr></table></div>");
			}
	
			try {
				o_holder		= document.getElementsByName("dt_alert_holder")[0];
				o_content_tbl	= document.getElementsByName("dt_alert_bar")[0];
				o_content		= document.getElementsByName("dt_alert_content")[0];
		
				o_holder.style.left = "0px";
				o_holder.style.top = "0px";
		
				o_content_tbl.style.borderBottom = "1px solid #EFB539";
				o_content_tbl.style.width = "100%";
				o_content_tbl.style.backgroundColor = "#FFF993";
				o_content_tbl.style.filter = "progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=#FFFFFFAA, endColorstr=#FFFFD16C)";
		
				o_content.style.color = "#000000";
				o_content.style.padding = "10px";
						
				o_content.innerHTML = msg;
				
				o_holder.style.top		= document.body.scrollTop - o_holder.offsetHeight;
			}catch(e){}
			
			fix_dtAlert_pos_fn = function(top_bln) {
				try {
					var o = document.getElementsByName("dt_alert_holder")[0];
					o.style.left	= document.body.scrollLeft;
					o.style.width	= "100%";
					if (top_bln==true)	dt.tween(o_holder, "style.top", "", "this.offsetTop", "document.body.scrollTop", .3);
					else				o.style.top		= document.body.scrollTop;
				}catch(e){}
			}
			fix_dtAlert_pos_fn(true);
			
			try {
				dt.attachEvent(window, "onscroll", fix_dtAlert_pos_fn);
				dt.attachEvent(window, "onresize", fix_dtAlert_pos_fn);
			}catch(e){}
			
		} catch(e){alert(msg)}
	}
	this.tween = function(o, property, easingType, start, end, seconds) {
		try {clearInterval(o.tween.iid) }catch(e){ o.tween = new Object() }
		fn = function() {
			moveto = function(t, b, c, d) {
				if ((t/=d/2) < 1) return c/2*t*t + b;
				return -c/2 * ((--t)*(t-2) - 1) + b;
			}
			try {
				eval("o."+property+" = moveto(o.tween.t, o.tween.b, o.tween.c, o.tween.d)");
				o.tween.t += 10;
				if (o.tween.t > o.tween.d) clearInterval(o.tween.iid);
			}catch(e){ try{clearInterval(o.tween.iid)}catch(e){} }
		}
		o.tween.t = 0;
		o.tween.b = parseFloat(eval(start.toString().split("this").join("o")));
		o.tween.c = parseFloat(eval(end.toString().split("this").join("o")))-parseFloat(eval(start.split("this").join("o")));
		o.tween.d = seconds*1000;
		o.tween.iid = setInterval(fn, 10);
	}
	this.calendar = function(obj_txt, dte_txt) { /*---- 200708071025 */

		/*
		5 - txt field variable to 'throw' the selected date to when a date is selected (optional)
		
		cal1_dtcal.styles.title = "font-color:";
		cal1_dtcal.styles.daynames = "";
		cal1_dtcal.styles.item = "";
		cal1_dtcal.styles.itemrollover = "";
		cal1_dtcal.styles.claendar = "";
		cal1_dtcal.styles.next = "";
		cal1_dtcal.styles.back = "";
		*/
		
		/*---- declaration */
		//this._closeOnSelect = true:false;
		this._width = 170;
		this._height = 178;
		this._today = new Date();
		this._date = dte_txt;
		this._el = "";
		this._obj = obj_txt;
		this._months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
		this._styles =	"div.__obj___cl {" +
						"	display:inline-table;" +
						"	width:__width__;" +
						"	height:__height__;" +
						"	background-color:#FFFFFF;" +
						"	border:1px solid #0099FF;" +
						"	overflow:hidden;" +
						"}" +
						"div.__obj___cl div ul {" +
						"	margin:0;" +
						"	padding:0;" +
						"	width:100%;" +
						"	list-style:none;" +
						"	display:table;" +
						"}" +
						"div.__obj___row {" +
						"	margin:0;" +
						"	padding:0;" +
						"	width:100%;" +
						"	display:table;" +
						"}" +
						"li.__obj___day {" +
						"	margin:0;" +
						"	padding:0;" +
						"	float:left;" +
						"	width:14%;" +
						"}" +
						"li.__obj___weekday {" +
						"	margin:0;" +
						"	padding:2px 2px 2px 2px;" +
						"	float:left;" +
						"	width:20px;" +
						"	display:table-cell;" +
						"	text-align:center;" +
						"}" +
						"a.__obj___day:link, a.__obj___day:active, a.__obj___day:visited, " +
						"a.__obj___today:link, a.__obj___today:active, a.__obj___today:visited, " +
						"a.__obj___selected:link, a.__obj___selected:active, a.__obj___selected:visited, " +
						"a.__obj___prevnextmonth:link, a.__obj___prevnextmonth:active, a.__obj___prevnextmonth:visited { " +
						"	padding:2px 2px 2px 2px; " +
						"	margin:2px;" +
						"	display:block; " +
						"	text-align:center; " +
						"	text-decoration:none; " +
						"	color:#666666; " +
						"	border-top:1px solid #FFFFFF;" +
						"	border-right:1px solid #CDCBD0;" +
						"	border-bottom:1px solid #CDCBD0;" +
						"	border-left:1px solid #FFFFFF;" +
						"}" +
						"a.__obj___selected:link, a.__obj___selected:active, a.__obj___selected:visited { " +
						"	color:#000000;" +
						"	border-color:#000000;" +
						"}" +
						"a.__obj___today:link, a.__obj___today:active, a.__obj___today:visited { " +
						"	color:#FFFFFF;" +
						"	background-color:#0099FF;" +
						"}" +
						"a.__obj___prevnextmonth:link, a.__obj___prevnextmonth:active, a.__obj___prevnextmonth:visited { " +
						"	border:none;" +
						"	color:#CCCCCC;" +
						"	background-color:#EDEFF1;" +
						"}" +
						"a.__obj___day:hover, a.__obj___today:hover, a.__obj___prevnextmonth:hover, a.__obj___selected:hover {" +
						"	color:#000000;" +
						"	background-color:#C2D2E5;" +
						"}" +
						"li#__obj___previous a:link, li#__obj___previous a:active, li#__obj___previous a:visited, " +
						"li#__obj___next a:link, li#__obj___next a:active, li#__obj___next a:visited{ " +
						"	padding:3px;" +
						"	margin:0;" +
						"	border:1px solid #FFFFFF;" +
						"	color:#666666;" +
						"	text-decoration:none;" +
						"	font-weight:bold;" +
						"}" +
						"li#__obj___previous a:hover, " +
						"li#__obj___next a:hover { " +
						"	background-color:#C2D2E5;" +
						"	color:#000000;" +
						"}" +
						"li#__obj___monthyearlabel a:link, li#__obj___monthyearlabel a:active, li#__obj___monthyearlabel a:visited{ " +
						"	padding:3px;" +
						"	margin:0;" +
						"	border:1px solid #FFFFFF;" +
						"	color:#666666;" +
						"	text-decoration:none;" +
						"	font-weight:bold;" +
						"}" +
						"li#__obj___monthyearlabel a:hover { " +
						"	color:#000000;" +
						"	text-decoration:underline;" +
						"}" +
						"li#__obj___close a:link, li#__obj___close a:active, li#__obj___close a:visited{ " +
						"	padding:0px 3px 0px 3px;" +
						"	margin:-1px 0px 0px 0px;" +
						"	border-top:1px solid #F2F2F2;" +
						"	border-right:1px solid #CCCCCC;" +
						"	border-bottom:1px solid #CCCCCC;" +
						"	border-left:1px solid #F2F2F2;" +
						"	color:#666666;" +
						"	text-decoration:none;" +
						"	font-weight:bold;" +
						"	display:block;" +
						"	overflow:hidden;" +
						"	height:14px;" +
						"}" +
						"li#__obj___close a:hover { " +
						"	color:#FFFFFF;" +
						"	background-color:#E90202;" +
						"}";
		/*---- declaration */
		
		
		/*---- callbacks */
		this.onComplete	= function(){}	
		this.onError = function(){}
		this.onSelect = function(){}
		/*---- callbacks */
		
		
		/*---- functions */
		this.validateDate = function(_dte) {
			try {
				switch(typeof _dte) {
					case "string":
						_dte = _dte==undefined?"":_dte.split("-").join("/").split(" ").join("");
		
						if (_dte.match(/^(3{1}[0-1]{1}|[0-2]{1}[1-9]{1})\/(1{1}[0-2]{1}|0{1}[1-9]{1})\/[0-9]{4}$/)) {
							
							_dte = new Date(	parseFloat(_dte.match(/\/([0-9]+)$/)[1]),
												parseFloat(_dte.match(/\/([0-9]+)\/([0-9]+)$/)[1])-1,
												parseFloat(_dte.match(/([0-9]+)\/([0-9]+)\/([0-9]+)$/)[1])	);
							
						} else throw("The date passed in as a string was not formatted dd/mm/yyyy")
						
					break;
					
					case "object":
						try {
							_dte.getTime();
						}catch(e){throw("The date object passed in was not a date object")}
					break;
					
					default:
						_dte = new Date();
					break;
				}
				
				return new Date(_dte.getTime());
				
			}catch(e){alert(e)}	
		}
		this.addStyles = function(styles) {

			var newSS;

			styles = styles.split("__obj__").join(this._obj);
			styles = styles.split("__width__").join(  this._width.toString().match(/^[0-9]+$/)?this._width+"px":this._width  );
			styles = styles.split("__height__").join(  this._width.toString().match(/^[0-9]+$/)?this._height+"px":this._height  );

			if (document.createStyleSheet) {
				document.createStyleSheet().cssText = styles;
			} else {
				newSS=document.createElement('link');
				newSS.rel='stylesheet';
				newSS.href='data:text/css,'+escape(styles);
				document.getElementsByTagName("head")[0].appendChild(newSS);
			}
		}
		this.getCalendar = function() {
			var _dte = new Date(this._date.getFullYear(), this._date.getMonth(), 1);

			var _html =	"<div class='__obj___cl'>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li style='float:left' id='__obj___previous'><a href='javascript:;' onclick='__obj__.setDate(new Date(__obj__._date.getFullYear(), __obj__._date.getMonth()-1), false)'>&lt;</a></li>" +
						"			<li style='float:left' id='__obj___next'><a href='javascript:;' onclick='__obj__.setDate(new Date(__obj__._date.getFullYear(), __obj__._date.getMonth()+1), false)'>&gt;</a></li>" +
						"			<li style='float:right;' id='__obj___close'><a href='javascript:;' onclick='__obj__.hide()'>x</a></li>" +
						"			<li style='float:right;' id='__obj___monthyearlabel'><a href='javascript:;' onclick='__obj__.setMonth()'>__month__ __year__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div style='display:table;margin:0;padding:0;height:5px;'></div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___weekday'>MO</li>" +
						"			<li class='__obj___weekday'>TU</li>" +
						"			<li class='__obj___weekday'>WE</li>" +
						"			<li class='__obj___weekday'>TH</li>" +
						"			<li class='__obj___weekday'>FR</li>" +
						"			<li class='__obj___weekday'>SA</li>" +
						"			<li class='__obj___weekday'>SU</li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__1__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__2__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__3__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__4__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__5__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__6__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__7__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__8__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__9__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__10__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__11__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__12__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__13__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__14__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__15__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__16__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__17__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__18__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__19__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__20__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__21__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__22__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__23__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__24__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__25__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__26__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__27__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__28__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__29__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__30__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__31__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__32__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__33__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__34__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__35__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__36__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__37__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__38__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__39__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__40__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__41__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__42__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"</div>"

			var styles = this._styles;

			this.addStyles(styles);

			while (_dte.getDay() > 1 || _dte.getMonth() == this._date.getMonth())
				_dte = new Date(_dte.getTime()-(1000*60*60*24));

			_html = _html.split("__obj__").join(this._obj);
			_html = _html.split("__month__").join(this._months[this._date.getMonth()]);
			_html = _html.split("__year__").join(this._date.getFullYear());

			for (var i=1; i<=42; i++) {
				
				//-- Add the dates, highlight the selected date, add 'onclick'
				_html = _html.split("day'>__"+i+"__").join((this._today.getMonth()==_dte.getMonth()&&this._today.getDate()==_dte.getDate()&&this._today.getFullYear()==_dte.getFullYear()?"today":(this._date.getMonth()==_dte.getMonth()?"day":"prevnextmonth"))+"' title='"+_dte.getDate()+" "+this._months[_dte.getMonth()]+" "+_dte.getFullYear()+"' onclick='"+this._obj+".onSelect(new Date("+_dte.getTime()+"))'>"+_dte.getDate());
				
				_dte = new Date(_dte.getTime()+(1000*60*60*24));
			}
			
			return _html;
		}
		this.getMonthCalendar = function(month_num) {
			var _dte = new Date(this._date.getFullYear(), 0, 1);

			var _html =	"<div class='__obj___cl'>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li style='float:left' id='__obj___previous'><a href='javascript:;' onclick='__obj__.setMonth(new Date(__obj__._date.getFullYear()-1, __obj__._date.getMonth()))'>&lt;</a></li>" +
						"			<li style='float:left' id='__obj___next'><a href='javascript:;' onclick='__obj__.setMonth	(new Date(__obj__._date.getFullYear()+1, __obj__._date.getMonth()))'>&gt;</a></li>" +
						"			<li style='float:right;' id='__obj___close'><a href='javascript:;' onclick='__obj__.hide()'>x</a></li>" +
						"			<li style='float:right;' id='__obj___monthyearlabel'><a href='javascript:;' onclick='__obj__.setYear()'>__month__ __year__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div style='display:table;margin:0;padding:0;height:5px;'></div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__1__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__2__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__3__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__4__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__5__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__6__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__7__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__8__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__9__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__10__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__11__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__12__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"</div>"


			var styles = this._styles;

			styles +=	"li.__obj___day {" +
						"	width:24.5%;" +
						"}" +
						"a.__obj___day:link, a.__obj___day:active, a.__obj___day:visited, " +
						"a.__obj___today:link, a.__obj___today:active, a.__obj___today:visited, " +
						"a.__obj___selected:link, a.__obj___selected:active, a.__obj___selected:visited, " +
						"a.__obj___prevnextmonth:link, a.__obj___prevnextmonth:active, a.__obj___prevnextmonth:visited { " +
						"	padding:16px 2px 16px 2px; " +
						"}";
			
			this.addStyles(styles);

			_html = _html.split("__obj__").join(this._obj);
			_html = _html.split("__month__").join(this._months[this._date.getMonth()]);
			_html = _html.split("__year__").join(this._date.getFullYear());

			for (var i=1; i<=12; i++) {
				
				//-- Add the dates, highlight the selected date, add 'onclick'
				_html = _html.split("day'>__"+i+"__").join((this._today.getMonth()==_dte.getMonth()&&this._today.getFullYear()==_dte.getFullYear()?"today":"day")+"' title='"+_dte.getDate()+" "+this._months[_dte.getMonth()]+" "+_dte.getFullYear()+"' onclick='"+this._obj+".setDate(new Date("+_dte.getTime()+"), false)'>"+this._months[_dte.getMonth()].substr(0, 3));
				
				_dte = new Date(_dte.getFullYear(), _dte.getMonth()+1, 1);
			}
			
			return _html;
		}
		this.getYearCalendar = function(month_num) {
			var _dte = new Date(this._date.getFullYear()-6, 0, 1);

			var _html =	"<div class='__obj___cl'>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li style='float:left' id='__obj___previous'><a href='javascript:;' onclick='__obj__.setYear(new Date(__obj__._date.getFullYear()-6, __obj__._date.getMonth()))'>&lt;</a></li>" +
						"			<li style='float:left' id='__obj___next'><a href='javascript:;' onclick='__obj__.setYear(new Date(__obj__._date.getFullYear()+6, __obj__._date.getMonth()))'>&gt;</a></li>" +
						"			<li style='float:right;' id='__obj___close'><a href='javascript:;' onclick='__obj__.hide()'>x</a></li>" +
						"			<li style='float:right;' id='__obj___monthyearlabel'>__month__ __year__</li>" +
						"		</ul>" +
						"	</div>" +
						"	<div style='display:table;margin:0;padding:0;height:5px;'></div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__1__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__2__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__3__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__4__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__5__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__6__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__7__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__8__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"	<div class='__obj___row'>" +
						"		<ul>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__9__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__10__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__11__</a></li>" +
						"			<li class='__obj___day'><a href='javascript:;' class='__obj___day'>__12__</a></li>" +
						"		</ul>" +
						"	</div>" +
						"</div>"


			var styles = this._styles;

			styles +=	"li.__obj___day {" +
						"	width:24.5%;" +
						"}" +
						"a.__obj___day:link, a.__obj___day:active, a.__obj___day:visited, " +
						"a.__obj___today:link, a.__obj___today:active, a.__obj___today:visited, " +
						"a.__obj___selected:link, a.__obj___selected:active, a.__obj___selected:visited, " +
						"a.__obj___prevnextmonth:link, a.__obj___prevnextmonth:active, a.__obj___prevnextmonth:visited { " +
						"	padding:16px 2px 16px 2px; " +
						"}";
			
			this.addStyles(styles);

			_html = _html.split("__obj__").join(this._obj);
			_html = _html.split("__month__").join(this._months[this._date.getMonth()]);
			_html = _html.split("__year__").join(this._date.getFullYear());

			for (var i=1; i<=12; i++) {
				
				//-- Add the dates, highlight the selected date, add 'onclick'
				_html = _html.split("day'>__"+i+"__").join((this._today.getFullYear()==_dte.getFullYear()?"today":"day")+"' title='"+_dte.getFullYear()+"' onclick='"+this._obj+".setMonth(new Date("+_dte.getTime()+"), false)'>"+_dte.getFullYear());
				
				_dte = new Date(_dte.getFullYear()+1, _dte.getMonth(), 1);
			}
			
			return _html;
		}
		this.setYear = function(_dte) {
			if (typeof _dte == "object") this._date = new Date(_dte.getTime());
			this._el.innerHTML = this.getYearCalendar();
		}
		this.setMonth = function(_dte) {
			if (typeof _dte == "object") this._date = new Date(_dte.getTime());
			this._el.innerHTML = this.getMonthCalendar();
		}
		this.setDate = function(_dte, _bln) {
			this._date = this.validateDate(_dte);
			this._today = _bln==false?new Date(this._today.getTime()):new Date(this._date.getTime());
			this._el.innerHTML = this.getCalendar();
		}
		this.hide = function() {
			this._el.style.display = "none";
		}
		this.getError = function(code_num) {
			var output_obj;
			switch (code_num.toString()) {
				case "10":
					output_obj = {code:code_num, description:"The calendar container specified does not exist"};
				break;
				case "20":
					output_obj = {code:code_num, description:"The reference to the public calendar object was not specified correctly, or it does not exist"};
				break;
				default:
					output_obj = {code:12222, description:"An unknown error occured"};
				break;
			}
			return output_obj;
		}
		this.attach = function(el_txt) {
			try {

				this._el = document.getElementById(el_txt);
				if (this._el == null) throw(10);
				
				try {eval(this._obj+"._date")}catch(e){throw(20)}
				
				this.setDate(this._date);
				
			}catch(e){this.onError(this.getError(e))}
		}
		/*---- functions */
		
	}
	this.insertAdjacentHTML = function(_el, where, htmlStr) {
		var r, parsedNode;
		
		try {
			
			_el.insertAdjacentHTML(where, htmlStr);
			
		} catch(e) {

			r = _el.ownerDocument.createRange();
			r.setStartBefore(_el);
			parsedNode = r.createContextualFragment(htmlStr);

			switch (where){
				case 'beforeBegin':
					_el.parentNode.insertBefore(parsedNode,_el)
				break;
				case 'afterBegin':
					_el.insertBefore(parsedNode,_el.firstChild);
				break;
				case 'beforeEnd':
					_el.appendChild(parsedNode);
				break;
				case 'afterEnd':
					if (_el.nextSibling) _el.parentNode.insertBefore(parsedNode,_el.nextSibling);
					else _el.parentNode.appendChild(parsedNode);
				break;
			}
			
		}
		
	}
}
var dt = new dt_toolbox();
/*---- dt.tools */



/*---- INIT IMAGE ROLLOVERS */
// Written by: David Tsuji
// Date: Thu 25 August 2005 : 1743
dt.attachEvent(window,"onload", dt.rollovers);
/*---- INIT IMAGE ROLLOVERS */


/*---- THIRD-PARTY */
/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
/* ---- */
