//var myd=document,u=unescape;function IIl(s){return myd.write(u(s))};IIl('');
function dt_error() { alert("Your browser does not meet the necessary requirements for this application. Please upgrade.") }

/* ---- BROWSER DETECTION */
function Is () {
    // convert all characters to lowercase to simplify testing
	var agt=navigator.userAgent.toLowerCase();

	// *** BROWSER VERSION ***
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
				&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
				&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
	this.nav2 = (this.nav && (this.major == 2));
	this.nav3 = (this.nav && (this.major == 3));
	this.nav4 = (this.nav && (this.major == 4));
	this.nav4up = (this.nav && (this.major >= 4));
	this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) ||
						  (agt.indexOf("; nav") != -1)) );
	this.nav6 = (this.nav && (this.major == 5));
	this.nav6up = (this.nav && (this.major >= 5));
	this.gecko = (agt.indexOf('gecko') != -1);
	this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	this.ie3    = (this.ie && (this.major < 4));
	this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
	this.ie4up  = (this.ie  && (this.major >= 4));
	this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
	this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
	this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
	this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
	this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
	this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);

	this.opera = (agt.indexOf("opera") != -1);
	this.opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
	this.opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
	this.opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
	this.opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
	this.opera5up = (this.opera && !this.opera2 && !this.opera3 && !this.opera4);

	// *** PLATFORM ***
	this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
	this.win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
	this.win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
	this.winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
	this.win32 = (this.win95 || this.winnt || this.win98 || 
					((this.major >= 4) && (navigator.platform == "Win32")) ||
					(agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
	this.winme = ((agt.indexOf("win 9x 4.90")!=-1));
	this.win2k = ((agt.indexOf("windows nt 5.0")!=-1));
	this.mac    = (agt.indexOf("mac")!=-1);
	
	// *** PRESET JSA VARS ***
	this.get_ok		= this.nav6up || (this.ie && this.win) || this.opera5up;
	this.get_good	= this.win && this.ie5up;

}
var is;
is = new Is();

/* ---- */





//---------------- FLYOUTS V1.7
var current_flyout_o = null;
var flyout_over_bln = false;
var hide_flyout_interval = null;
function dt_flyouts() {
	var menu_o = document.getElementsByName("menu");
	try {
		for (var i=0;i<=(menu_o.length-1);i++) init_menu(menu_o[i]);
		dt.attachEvent(window, "onresize", emulateonresizeend);
	} catch(e) {}
}

var emulateonresizeendiid;
function emulateonresizeend() {
	if (parseInt(emulateonresizeendiid)) clearInterval(emulateonresizeendiid);
	emulateonresizeendiid = setInterval("dt_flyouts();clearInterval(emulateonresizeendiid)" ,100);
}

function init_menu(o) {
	var mpos, target_o, 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;
	
	// Allowing users to click anywhere to kill the flyouts
	try { dt.attachEvent(document.body, "onclick", fo_kill) } catch(e){}
	
	if (o.getAttribute("submenu") == null) {
		
		// Allowing other primary navigation buttons that do not have flyouts to kill the current flyout
		// To make this work add the 'menu' id and name to the element with NO 'submenu' attributes
		try { dt.attachEvent(o, "onmouseover", fo_kill) } catch(e){}
		
	} else if (o.getAttribute("submenu") && sticky_bln == false) {
		try {
			p = document.getElementsByName(o.getAttribute("submenu"))[0];
			dt_positions(o);
			mpos = o.getAttribute("submenuposition").split(",");
			if (!parseInt(mpos[0])) {
				if (mpos[0].indexOf("this") != -1) mpos[0] = mpos[0].replace("this", "o._x");
				mpos[0] = eval(mpos[0]);
			}
			if (!parseInt(mpos[1])) {
				if (mpos[1].indexOf("this") != -1) mpos[1] = mpos[1].replace("this", "o._y");
				mpos[1] = eval(mpos[1]);
			}
			p.style.left = mpos[0]+"px";
			p.style.top = mpos[1]+"px";
		}catch(e){}
		
		fo_over_fn = function() {
			var this_o, o;
			try { this_o = event.srcElement } catch(e) { this_o = this }
			while (this_o.getAttribute("submenu") == null && this_o.tagName != "BODY") this_o = this_o.parentNode;
			o = document.getElementById(this_o.getAttribute("submenu"));
			try { current_flyout_o.style.visibility = "hidden" } catch(e){}
			o.style.visibility = "visible";
			current_flyout_o = o;
			flyout_over_bln = true;
			if (parseInt(hide_flyout_interval)) clearInterval(hide_flyout_interval);
			hide_flyout_interval = setInterval("hide_flyout()", 1500);
			hide_show_selects("hidden");
		}

		fo_out_fn = function() {
			flyout_over_bln = false;
		}
		
		try {
			dt.attachEvent(o, "onmouseover", fo_over_fn);
			dt.attachEvent(o, "onmouseout", fo_out_fn);
		}catch(e){}
		
		try {
		
			target_o = document.getElementsByName(o.getAttribute("submenu"))[0];
	
			target_o.onmouseover = function() {
				flyout_over_bln = true;
			}
			
			target_o.onmouseout = function() {
				flyout_over_bln = false;
			}

		}catch(e){}
	}
}

function fo_kill() {
	flyout_over_bln = false;
	hide_flyout();
}

function hide_flyout() {
	var o = current_flyout_o;
	if (!flyout_over_bln) {
		if (hide_flyout_interval != null) clearInterval(hide_flyout_interval);
		hide_flyout_interval = null;
		try { o.style.visibility = "hidden" } catch(e){}
		hide_show_selects('visible');
	}
}

function hide_show_selects(type) {
	try {
		for (var i=0; (select_o=document.getElementsByTagName("SELECT")[i]); i++)
			select_o.style.visibility = type;
	} catch(e){}
}

function dt_positions(o) {
	var x, y;

	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;
	}
	
	if (is.win && is.ie) {
		x = (o.getBoundingClientRect().left - 2) + window.document.body.scrollLeft;
		y = (o.getBoundingClientRect().top - 2) + window.document.body.scrollTop;
	} else {
		x = notie_getx(o);
		y = notie_gety(o);
	}
	
	o._x = x;
	o._y = y;

}
/*---- */


var xmlhttp_timeout_iid;
dt_toolbox = function() {
	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.flyouts = function() {
		dt.attachEvent(window, "onload", dt_flyouts);
	}
	this.connect = function(url,my_form,func,dt_loading_anime) {
		var oargs = new Array(), xmlhttp, form_str="", field_type;
		
		(!dt_loading_anime) ? dt_loading_anime = "dt_loading_anime" : void(0);
		
		clearInterval(xmlhttp_timeout_iid);
		try { document.getElementsByName(dt_loading_anime)[0].style.visibility="visible" } catch(e) {}
	
		// Collate and format form data if it exists
		if (my_form) {
			name_fn = function(f) {
				if (f.getAttribute("id")!="" && f.getAttribute("id") != null) {
					return f.getAttribute("id");
				} else if (f.getAttribute("name") != "") {
					return f.getAttribute("name");
				} else {
					return f.name;
				}
			}
			ampersand_fn = function(i) { if (i<(my_form.length-1)) return "&"; else return "" }
			for (var i=0; i<my_form.length; i++) {
				try { field_type = my_form[i].type } catch(e){field_type="none"}
				switch (field_type.toLowerCase()) {
					case "checkbox":
						if (my_form[i].checked)
							form_str += name_fn(my_form[i]) + "=" + escape(my_form[i].value) + ampersand_fn(i);
					break;
					
					case "radio":
						if (my_form[i].checked)
							form_str += name_fn(my_form[i]) + "=" + escape(my_form[i].value) + ampersand_fn(i);
					break;
					
					default:
						form_str += name_fn(my_form[i]) + "=" + escape(my_form[i].value) + ampersand_fn(i);
					break;
				}
			}
		}

		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(f) {
				try {
					xmlhttp = new XMLHttpRequest();
				} catch (g) {}
			}
		}

		done_fn = function() {
//alert(xmlhttp.responseText);
			var write_error_bln;
			hide_anime_fn = function() {try { document.getElementsByName(dt_loading_anime)[0].style.visibility="hidden" } catch(e) {}}
			if (xmlhttp.readyState==4) {
				clearInterval(xmlhttp_timeout_iid);
				if (	xmlhttp.responseText.match(/Microsoft VBScript runtime error/)!=null ||
						xmlhttp.responseText.match(/runtime error/)!=null ||
						xmlhttp.responseText.match(/line \d/)!=null ||
						xmlhttp.responseText.match(/Variable is undefined/)!=null ||
						xmlhttp.responseText.match(/The page cannot be found/)!=null ||
						xmlhttp.responseText.match(/HTTP Error/)!=null ||
						xmlhttp.responseText.match(/ADODB.Recordset error/)!=null ||
						xmlhttp.responseText.match(/Microsoft JET Database Engine error/)!=null
						) write_error_bln = true;
				if (xmlhttp.status==200&&write_error_bln!=true) {
					hide_anime_fn();
					try { func(xmlhttp.responseText) } catch(e) {}
				} else {
						
					var shadow = dt.shadow.show(80);
					shadow.innerHTML = "<p align=\"center\"><span style=\"border:1px solid #000;margin-top:30px;padding:10px;width:500px;background-color:#FFFFFF\"><p style=\"font-size:20px;font-weight:bold\">server error</p>"+xmlhttp.responseText+"<p style=\"color:#FF0000;cursor:hand\" onclick=\"dt.shadow.hide()\">close</p></span></p>";
					
					hide_anime_fn();

				}
			}
		}

		try {
			window.attachEvent();
			xmlhttp.onreadystatechange = done_fn;
		} catch (e) {
			xmlhttp.onreadystatechange = function() { done_fn() }
		}
		if (my_form) {
			xmlhttp.open("POST",url,true);
			xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			xmlhttp.send(form_str);
		} else {
			xmlhttp.open("GET",url,true);
			xmlhttp.send(null);		
		}
		
		timeout_fn = function() {
			clearInterval(xmlhttp_timeout_iid);
			window.status = "There was a problem connecting to the server";
		}
 		xmlhttp_timeout_iid = setInterval(timeout_fn, 45000);
	}
	this.shadow = function(){}
	this.shadow.show = function(opacity_num) {
		/*
		[WRITTEN]	JSA DIGITAL (David Tsuji) | www.jsa.com.au
		[VERSION]	1.0.0 CREATE SHADOW
		*/
		
		var o, opacity_arr = new Array("00","11","22","33","44","55","66","77","88","99","A1","A9","B1","B9","C1","C9","D1","D9","E1","FF");
		
		try { dt.shadow.hide() } catch(e) {}
		
		try {
			for (var i=0; i<document.getElementsByTagName("SELECT").length; i++) {
				s = document.getElementsByTagName("SELECT")[i];
				s.style.display = "none";
			}
		} catch(e) {}
		
		try {
			document.body.insertAdjacentHTML("afterBegin", ""+
			"<span id=\"shadow\" name=\"shadow\" onclick=\"null\" style=\"position:absolute;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#"+opacity_arr[Math.round(opacity_num/5)]+"000000', EndColorStr='#"+opacity_arr[Math.round(opacity_num/5)]+"000000');opacity:"+(opacity_num/100)+";-moz-opacity:"+(opacity_num/100)+";\">"+
			"</span>");

			o = document.getElementsByName("shadow")[0];
			if (!is.get_good) {
				with (o.style) {
					backgroundColor="#000000";
					filter="alpha(opacity="+(opacity_num)+")";
				}
			}
			
			reset_shadow_pos = function() {
				var db = document.body, o = document.getElementsByName("shadow");
				if (o.length>0) {
					o=o[0];
					o.style.width	= db.clientWidth;
					o.style.height	= db.clientHeight;
					o.style.left	= db.scrollLeft;
					o.style.top		= db.scrollTop;
				}
			}

			// OnMove Events
			o.style.backgroundImage = "url(images/filler.gif)";
			dt.attachEvent(window, "onresize", reset_shadow_pos);
			dt.attachEvent(window, "onscroll", reset_shadow_pos);
			reset_shadow_pos();
			o.style.height = document.body.clientHeight;
			o.style.width = document.body.clientWidth;
			return o;
		} catch(e) {}
	}
	this.shadow.hide = function() {
		var s;
		try {
			dt.detachEvent(window, "onresize", reset_shadow_pos);
			dt.detachEvent(window, "onscroll", reset_shadow_pos);
		}catch(e){}
		try {
			document.getElementsByName("shadow")[0].removeNode(true);
		} catch(e) {}
		try {
			for (var i=0; i<document.getElementsByTagName("SELECT").length; i++) {
				s = document.getElementsByTagName("SELECT")[i];
				s.style.display = "inline";
			}
		} catch(e) {}
	}
	this.upload = function(){}
	this.upload.show = function(src, func, valid_arr, args, extra_form_data, _target) {
		var db = document.body, valid_bln = false, valid_files_arr;
		var o_dte = new Date(), o_txt = "div_uploader";
		var hidden_fields="";
		try { valid_files_arr = valid_arr.split(",") } catch(e){}
		try {
			for (var i=0; i<extra_form_data.split("&").length; i++) {
				hidden_fields +=	"<input type=\"hidden\" name=\""+extra_form_data.split("&")[i].split("=")[0]+"\""+
									" id=\""+extra_form_data.split("&")[i].split("=")[0]+"\""+
									" value=\"" + extra_form_data.split("&")[i].split("=")[1]+"\">";
			}
		} catch(e) {}
		(!_target)?_target="iframe_img_upload":void(0);
		var o = "<div id=\""+o_txt+"\" name=\""+o_txt+"\" style=\"display:block;width:393px;height:140px;position:absolute;top:"+(db.scrollHeight-db.scrollTop)+";left:"+((db.scrollWidth/2)-(196))+"\"><form action=\""+src+"\" method=\"post\" enctype=\"multipart/form-data\" name=\"img_upload\" target=\""+_target+"\" id=\"img_upload\" onSubmit=\"return init_progress_bar(this)\" style=\"margin-bottom:0px;width:391px\"><table width=\"100%\" border=\"0\" cellpadding=\"10\" cellspacing=\"3\" bgcolor=\"#FFFFFF\" style=\"border:1px solid #C0C0C0\"><tr><td nowrap style=\"filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#22000000', EndColorStr='#00000000')\"><h1>upload file</h1><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"35\"><tr><td><span id=\"progress_field\" name=\"progress_field\" style=\"display:none;\"></span><span id=\"file_field\" name=\"file_field\"><input type=\"file\" id=\"myfile\" name=\"myfile\" style=\"width:100%\"></span></td></tr></table><p align=\"right\"><input type=\"button\" name=\"Button\" value=\"Cancel\" onClick=\"dt.upload.hide()\"><input name=\"submit_btn\" type=\"submit\" id=\"submit_btn\" value=\"start uploading\"></p></td></tr></table><iframe id=\"iframe_img_upload\" name=\"iframe_img_upload\" style=\"position:absolute;display:none\"></iframe><input type=\"hidden\" name=\"file_name_change\" id=\"file_name_change\" value=\"empty\">"+hidden_fields+"</form></div>";
		dt.shadow.show(90);
		try {
			document.body.insertAdjacentHTML("beforeEnd",o);
			o = document.getElementsByName(o_txt)[0];
			reset_upload_pos = function() {
				var db = document.body, o = document.getElementsByName("div_uploader")[0];
				var body_width	= db.clientWidth;
				var body_height	= db.clientHeight;
				try {
					o.style.left	= db.scrollLeft + ((body_width/2)-(o.offsetWidth/2));
					o.style.top		= db.scrollTop + ((body_height/2)-(o.offsetHeight/2));
				}catch(e){}
			}

			dt.attachEvent(window, "onresize", reset_upload_pos);
			dt.attachEvent(window, "onscroll", reset_upload_pos);
			reset_upload_pos();
		} catch(e) {}
		
		init_progress_bar = function(f) {
			
			var Session = new String();
			
			show_progress_fn = function() {
				var o = document.getElementsByName("progress_field")[0];
				var src, iid, ok_to_query_bln = true;
				server_response_fn = function() {
					write_response_fn = function(bln) {
						o.innerHTML = bln.split("//uploaded//").join("");;
						ok_to_query_bln = true;
		
						if (bln.match("//uploaded//")) {
							clearInterval(iid);
							ok_to_query_bln = false;
							wait_for_changes_fn = function() {
								alert("Your file was uploaded successfully");
								src = (f.file_name_change.value=="empty")?f.myfile.value:f.file_name_change.value;
								try {func(src.split("\\")[src.split("\\").length-1],args)}catch(e){}
								dt.upload.hide();
							}
							setTimeout(wait_for_changes_fn,2000);
						}
		
					}
					if (ok_to_query_bln==true) {
						ok_to_query_bln = false;
						dt.connect("../_dt_connect/dtc_uploadfile_status.asp?Session="+Session, "", write_response_fn);
					}
				}
				iid = setInterval(server_response_fn, 500);
			}
			
			if (valid_files_arr) {
				
				for (var i=0; i<valid_files_arr.length; i++)
					if (f.myfile.value.toLowerCase().match(valid_files_arr[i].toLowerCase())) valid_bln = true;
					
			} else valid_bln = true;
		
			if (valid_bln == false) {
				alert("only the following file types are permitted to this field.\n\n"+valid_files_arr+"\n\nChoose another file and try again");
				return false;
			} else {
		
				show_progress_fn();
				
				f.submit_btn.disabled = true;
				
				document.getElementsByName("file_field")[0].style.display = "none";
				document.getElementsByName("progress_field")[0].style.display = "block";
			
				Session = Math.floor(Math.random() * 0xFFFFFF).toString(16);
				f.action += "?Session=" + Session;
				
				return true;

			}
		
		}
		
		return o;
	}
	this.upload.hide = function(id) {
		try {
			dt.detachEvent(window, "onresize", reset_upload_pos);
			dt.detachEvent(window, "onscroll", reset_upload_pos);
		}catch(e){}
		try { document.getElementsByName("iframe_img_upload")[0].src = "" } catch(e) {}
		try { dt.shadow.hide(); } catch(e) {}
		try { document.getElementsByName("div_uploader")[0].removeNode(true) } catch(e) {}
	}
	this.rollovers = function() {
		for (var i=0;(img=document.images[i]);i++) {
			if (location.href.match(img.getAttribute("stickonurl"))) {
				img.getAttribute("stickimg")?img.src=img.getAttribute("stickimg"):img.src=img.getAttribute("rollover");
			}
			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() {
		var maxVersion = 9;
		var actualVersion = 0;
	
		if (is.ie && is.win) {
			document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
			document.write('on error resume next \n');
			document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
			document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
			document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
			document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
			document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
			document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
			document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
			document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
			document.write('</SCR' + 'IPT\> \n');
		}
		
		if (navigator.plugins) {
			if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
				var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
				var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
				var flashVersion = parseInt(flashDescription.substring(16));
				flash2Installed = flashVersion == 2;
				flash3Installed = flashVersion == 3;
				flash4Installed = flashVersion == 4;
				flash5Installed = flashVersion == 5;
				flash6Installed = flashVersion == 6;
				flash7Installed = flashVersion == 7;
				flash8Installed = flashVersion == 8;
				flash9Installed = flashVersion >= 9;
			}
		}

		for (var i = 2; i <= maxVersion; i++) try { (eval("flash" + i + "Installed")==true)?actualVersion = i:void(0)}catch(e){};
	
		this.flash.version		= (actualVersion);
		this.flash.installed	= (actualVersion>0);
	}
	this.flash.on = function(version,html) {
		html	= (!parseFloat(version))?version:html;
		version	= (parseFloat(version))?parseFloat(version):-1;
		if (dt.flash.installed) (version > dt.flash.version) ? html="" : void(0);
		else html = "";
		return html;
	}
	this.flash.on.write = function(version,html) {
		document.write( dt.flash.on(version,html) );
	}
	this.flash.off = function(version,html) {
		html	= (!parseFloat(version))?version:html;
		version	= (parseFloat(version))?parseFloat(version):-1;
		html = (!dt.flash.installed || version > dt.flash.version) ? html : "";
		return html
	}
	this.flash.off.write = function(version,html) {
		document.write( dt.flash.off(version,html) );
	}
	this.flash.embed = function(attr,src) {
		var output, w="", h="", n="", t=null, extra_ax, extra_ed;
		attr = attr.split(" ").join("");
		attr = attr.split(",");
		try { w=attr[0] }catch(e){}
		try { h=attr[1] }catch(e){}
		try { n=attr[2] }catch(e){}
		try { t=attr[3] }catch(e){}
		extra_ax = (t)?"<param name=wmode value=transparent>":"";
		extra_ed = (t)?"wmode=transparent":"";
		output = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" name=\""+n+"\" id=\""+n+"\" width=\""+w+"\" height=\""+h+"\"><param name=\"movie\" value=\""+src+"\"><param name=quality value=high>"+extra_ax+"<embed src=\""+src+"\" id=\""+n+"\" name=\""+n+"\" width=\""+w+"\" height=\""+h+"\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" "+extra_ed+"></embed></object>";
		return output;
	}
	this.validate = function(f, arr) {
		var ei=-1, field, msg = "Please correct the following fields:\n\n", bln = true;
		var email_re  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		error_fn = function(i) {
			var fld = eval("f."+arr[i].split(",")[0]);
			bln=false; ei++;
			msg += "- "+arr[i].split(",")[2]+"\n";
			try {
				(ei==0)?fld.focus():void(0);
				(ei==0)?fld.select():void(0);
				fld.style.borderColor="#FF0000";
				fld.has_error = true;
				fld.oktoclear_bln = false;
			}catch(e){}
		}
		try {
			
			for (var i=0; (i<arr.length); i++) try { eval("f."+arr[i].split(",")[0]+".oktoclear_bln=true") }catch(e){}
			for (var i=0; (i<arr.length); i++) {
			
				field = eval("f."+arr[i].split(",")[0]);
				try { (field.has_error==true&&field.oktoclear_bln==true)?field.style.borderColor="":void(0) }catch(e){}
			
				switch (arr[i].split(",")[1]) {
				
					case "req":	(field.value=="")?error_fn(i):void(0);				break;
					case "eml":	(!field.value.match(email_re))?error_fn(i):void(0);	break;
					case "num":	(!parseFloat(field.value))?error_fn(i):void(0);		break;
					default:	(eval(arr[i].split(",")[1]))?error_fn(i):void(0);	break;

				}
			
			}
			(bln==false)?alert(msg):void(0);
			return bln;
				
		} catch(e) {}

	}
}
var dt = new dt_toolbox();
dt.flash();
dt.attachEvent(window, "onload", dt.rollovers);

/*---- GLOBALISING object.insertAdjacent */
// Written by: David Tsuji, webfx.eae.net
// Date: Wed 27 April 2005 : 1600
function dt_insertAdjacent() {
	try {
		document.body.insertAdjacentHTML("beforeEnd","");
	} catch(e) {
		try {
			Object.prototype.insertAdjacentHTML = function(sWhere,sHTML) {
				var df;   // : DocumentFragment
				var r = this.ownerDocument.createRange();
				
				switch (String(sWhere).toLowerCase()) {  // convert to string and unify case
					case "beforebegin":
						r.setStartBefore(this);
						df = r.createContextualFragment(sHTML);
						this.parentNode.insertBefore(df, this);
					break;
					
					case "afterbegin":
						r.selectNodeContents(this);
						r.collapse(true);
						df = r.createContextualFragment(sHTML);
						this.insertBefore(df, this.firstChild);
					break;
					
					case "beforeend":
						r.selectNodeContents(this);
						r.collapse(false);
						df = r.createContextualFragment(sHTML);
						this.appendChild(df);
					break;
					
					case "afterend":
						r.setStartAfter(this);
						df = r.createContextualFragment(sHTML);
						this.parentNode.insertBefore(df, this.nextSibling);
					break;
				}
			}
			Object.prototype.insertAdjacentElement = function(sWhere, element) {
				switch (sWhere.toLowerCase()) {
					case "beforebegin":
						this.parentNode.insertBefore(element, this);
					break;
					case "afterbegin":
						this.insertBefore(element, this.firstChild);
					break;
					case "beforeend":
						this.appendChild(element);
					break;
					case "afterend":
						this.parentNode.insertBefore(element, this.nextSibling);
					break;
				}
			}
		} catch(e) {  }
	}
}
dt.attachEvent(window,"onload", dt_insertAdjacent);
/*---- GLOBALISING object.insertAdjacent */



/*---- GLOBALISING other generic calls */
// Written by: David Tsuji, webfx.eae.net
// Date: Wed 27 April 2005 : 1600
try {

	//-- document.all
	documentAll_fn = function() {
		var a = this.getElementsByTagName("*");
		var node = this;
		a.tags = function (sTagName) { return node.getElementsByTagName(sTagName) }
		return a;
	}
	Object.prototype.__defineGetter__("all", documentAll_fn);
	HTMLElement.prototype.__defineGetter__("all", documentAll_fn);
	
	//-- event.srcElement
	srcElement_fn = function() {
		var node = this.target;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	}
	Event.prototype.__defineGetter__("srcElement", srcElement_fn);
	
	//-- node.removeChild()
	Object.prototype.removeNode = function() {
		this.parentNode.removeChild(this);
	}

}catch(e){}
/*---- GLOBALISING other generic calls */
