<!--
/*
--------------------------------
	Developement Tools

Author: BenWhite@columbus.rr.com

Description: This code is very usefull for troubleshooting dynamic html.
  note: It has only been tested on ie5 and above

Usage:
  Simply place the following code in side your web page
	<SCRIPT Language=JavaScript src=devtools.js></script>

  While viewing the web page, press CTRL + ALT + D
  Dev Tools will pop up

--------------------------------
*/

function clsDevTools() {

	// Set User Variables

	var Drag_Image='x.gif';	//Image to use for the drag functions
	var Window_Width=400;	//Popup window's width
	var Window_Height=300;	//Popup window's height
	var Highlight_Color='#ffffcc';	//(for drag operations)
	var Highlight_Attributes = new Array('tagName','id','name','className','type');	//The attributes to show during drag operations

	// Internal Variables

	var DragObject=-1;
	var DragEnabled = false;
	var DisplayWindow=-1;
	var IFRAME_State=false;
	var TABLE_State=false;
	var objMove;
	var MouseX;
	var MouseY;
	var OffsetX = -1;
	var OffsetY = -1;
	var z = 1000;

	var Version='1.08';

	// Property Code

	function ShowProperties(obj) {
		DragEnabled = false;
		if (!event.ctrlKey && obj != window){return;}
		var result='';
		strObj=DevTools.GetHandle(obj);
		window.status = strObj;
		result += '<table border=0 cellpadding=0 cellspacing=0 style="font-family:verdana;font-size:8pt;padding:0px 5px;color:#003187;">\n';
		result += '<tr bgcolor=#cccccc style=font-weight:bold;font-size:10pt;><td nowrap>'+strObj+'</td><td>-</td><td width=100% nowrap>' + obj.tagName + '</td></tr>\n';
		result += '<tr><td colspan=3>' + DevTools.GetProperties(strObj) + '</td></tr>';
		result += '<tr><td colspan=3><br>* Object information cannot not displayed.</td></tr></table>';
		OpenWindow();
		DevTools.DisplayWindow.document.body.innerHTML=result;
		DevTools.DisplayWindow.document.title='Dev Tools v' +Version+ ' - (Property Poke)';
	}

	function GetProperties(strObject, full) {
		d=new Date();
		x=d.valueOf();
		try {
			obj=eval(strObject);
		}catch (e){
			obj=document.getElementById(strObject)
		}
		if (typeof obj != 'undefined') {
			var result='<table border=0 cellpadding=0 cellspacing=0 style="font-family:verdana;font-size:8pt;padding:0px 5px;color:#003187;" width=100%>\n';
			for (var attrib in obj) {
				value=GetObject(obj, attrib);
				window.status=attrib;
				if (typeof value == 'object') {
					if (!isNaN(attrib)) {attrib='['+attrib+']'} else {attrib='.'+attrib}
					result += '<tr bgcolor=#'+BGColor(x)+' valign=top ';
					if (value) {
						result += 'style="cursor:hand;" onmouseover=this.style.backgroundColor="#6699cc";this.style.color="#ffffff";; onmouseout=this.style.backgroundColor="";this.style.color="";; ';
						result += 'onclick="if (tr'+x+'a.style.display==\'none\') {tr'+x+'a.style.display=\'inline\';td'+x+'a.innerHTML=window.opener.DevTools.GetProperties(\''+strObject+attrib+'\', true);} else {tr'+x+'a.style.display=\'none\';}" ';
					}
					result += '>';
					result += '<td nowrap>'+strObject+attrib+'</td>';
					result += '<td>=</td><td nowrap width=100%>'+value+'</td></tr>\n';
					result += '<tr id=tr'+x+'a bgcolor=#'+BGColor(x)+' style="display:none;"><td  id=td'+x+'a colspan=3 style=padding-left:20;></td></tr>';
					x++;
				} else {
					strValue=FixHTML(value);
					result += '<tr bgcolor=#'+BGColor(x)+' valign=top><td nowrap>'+strObject+'.'+ attrib + '</td><td>=</td><td nowrap width=100%>' + strValue + '</td></tr>\n';
					x++;
				}
			}
			result += '</table>';
			window.status='';
		} else {
			result = '<div style="font-family:verdana;font-size:8pt;color:#003187;">Error: This object cannot be displayed due to other obectes with the same ID.</div>'
		}
		return result;
	}

	function GetObject(Obj, Prop) {
		switch (typeof Obj[Prop]) {
			case 'object' :
				switch(Prop) {
					case 'external' : return '[object]*';
					case 'mimeTypes' : return '[object]*';
					case 'opsProfile' : return '[object]*';
					case 'plugins' : return '[object]*';
					case 'userProfile' : return '[object]*';
					default : return  Obj[Prop];
				}
			case 'unknown' : return '[unknown]*';
			default : return Obj[Prop];
		}
	}

	function GetHandle(obj) {
		if (obj.id) {
			if (obj.id.search(/\W|^\d/g) == -1) {
				if (eval(obj.id+'.length')==1){return obj.id;}
			}
		}
		switch (obj) {
			case window: return 'window';
			case document: return 'document';
			default:
				a=document.all;
				for (var o in a) {if (a[o] == obj) {if (!isNaN(o)) {return 'document.all['+o+']'} else {return 'document.all.'+o}}}
		}
	}

	function SetDrag() {
		divDevTools.style.display='none';
		obj=document.all;
		for (x=0; x<obj.length; x++) {obj[x].ondragenter=DevTools.ShowDragItem;}
		document.body.ondragover=DevTools.PositionInfo;
		DragEnabled = true
	}

	function PositionInfo() {
		x = event.clientX+document.body.scrollLeft+25
		y = event.clientY+document.body.scrollTop+13
		if ((x+divMouseInfo.offsetWidth) > (document.body.clientWidth + document.body.scrollLeft)) {x -= divMouseInfo.offsetWidth + 30}
		if ((y+divMouseInfo.offsetHeight) > (document.body.clientHeight + document.body.scrollTop)) {y = document.body.clientHeight + document.body.scrollTop - divMouseInfo.offsetHeight }
		if (y<0){y=0}
		if (x<0){x=0}
		divMouseInfo.style.top=y;
		divMouseInfo.style.left=x;
		event.returnValue=false;
	}

	function ShowDragItem(){
		var strObj='';
		if (!DragEnabled) {return}
		if (DevTools.DragObject != event.srcElement) {
			if (event.srcElement == divMouseInfo) {return;}
			DevTools.DragCleanup();
			DevTools.DragObject=event.srcElement;
			if (event.ctrlKey) {strObj = '<b>Complete Object Info</b> (on release)<br>'}
			if (event.shiftKey) {
				for (var attrib in event.srcElement) {
					value=GetObject(event.srcElement, attrib);
					if (typeof value != 'object') {
						strValue=FixHTML(value);
						if (strValue) {
							if (strValue.length > 40) {strValue = strValue.slice(0,40) + '...'}
							strObj+=attrib+' = '+strValue+'<br>'
						}
					}
				}
			} else {
				for (x=0;x<Highlight_Attributes.length;x++) {
					y = DevTools.DragObject[Highlight_Attributes[x]];
					strObj+=Highlight_Attributes[x]+' = '+((y)?y:'')+'<br>';
				}
				strObj+='size = '+ DevTools.DragObject.offsetWidth + 'x' + DevTools.DragObject.offsetHeight;
			}
			ShowMouseInfo('Property Poke',strObj)
			DevTools.DragObject.bgcOld=DevTools.DragObject.style.backgroundColor;
			DevTools.DragObject.style.backgroundColor=Highlight_Color;
		}
	}

	function DragCleanup(state) {
		if (typeof DevTools.DragObject.bgcOld != 'undefined') {DevTools.DragObject.style.backgroundColor=DevTools.DragObject.bgcOld;}
		if (state) {document.body.ondragover=null}
	}

	function ShowMouseInfo(strTitle, strText) {
		var result='<table id=DTInfo_NB border=0 cellpadding=0 cellspacing=0 style="color:#000000;padding:0 5;font-size:8pt">';
		result+='<tr style=background-color:#ffcc66;cursor:default;><td onmousedown=DevTools.Enable(divMouseInfo); onmouseup=DevTools.Disable(); style="border-bottom:1 solid #000000;" nowrap><b>'+strTitle+'</b></td>';
		result+='<td align=right style="border-bottom:1 solid #000000;"><span style=font-family:webdings;cursor:hand; onclick=divMouseInfo.style.display="none";>r</span></td></tr>';
		result+='<tr style="padding:2 5"><td colspan=2 nowrap>'+strText+'</td></tr>';
		result+='</table>';
		divMouseInfo.innerHTML = result;
		divMouseInfo.style.display='inline';
		divMouseInfo.style.zIndex = z;
		PositionInfo();
		divMouseInfo.focus();
		z++;
	}

	// Show Source

	function ShowSourceBasic() {
		result='';
		OpenWindow();
		result += '<table style=font-size:10pt;color:#003399;><tr><td id=TD nowrap>';
		result += FixCR(FixHTML(document.documentElement.outerHTML));
		result += '</td></tr></table>';
		DevTools.DisplayWindow.document.body.innerHTML=result;
		DevTools.DisplayWindow.document.title='Dev Tools v' +Version+ ' - (Page Source)';
	}

	function ShowSource() {
		var result='';
		var inset=0;
		var intScript=0;
		var z=0;

		var CODE = new Array('SCRIPT','STYLE');
		var INSET = new Array('BLOCKQUOTE','TABLE','TR','TD','TH','BODY','HEAD','CENTER','SELECT','UL','FORM','MARQUEE','DIV','APPLET','OL');
		var WRAP = new Array('/HTML','/SELECT','/OPTION','/BODY','HEAD','/HEAD','TITLE','/TABLE','/TBODY','/TR','/BLOCKQUOTE','/FORM','/MARQUEE','BR','PARAM','AREA','BASE','BASEFONT','SCRIPT','CODE','/UL','/OL');
		var SCRIPT_I = new Array('{','<!--');
		var SCRIPT_O = new Array('}','-->');

		var Lines = document.documentElement.outerHTML.split('\n');
		var Line = '';

		OpenWindow();
		DevTools.DisplayWindow.document.body.innerHTML='Formatting...';

		for (i=0;i<Lines.length;i++) {
			Line = Lines[i];
			y = intScript;
			//Look for Code Open/Closed
			for (x=0;x<CODE.length;x++) {
				A = new RegExp('<'+CODE[x]+'\\s|<'+CODE[x]+'>','gi');
				B = new RegExp('</'+CODE[x]+'>','gi');
				intScript+=String(' '+Line+' ').split(A).length;
				intScript-=String(' '+Line+' ').split(B).length;
			}
			if (y > intScript) {inset--}
			if (intScript > 0) {//Inside Code Tags
				for (x=0;x<SCRIPT_O.length;x++) {inset-=(Line.search(SCRIPT_O[x])>=0)?Line.match(SCRIPT_O[x]).length:0;}
				result += '<tr><td style=padding-left:'+20*inset+';background-color:#'+BGColor(z)+' nowrap>'+FixHTML(Line)+'&nbsp;</td></tr>';
				for (x=0;x<SCRIPT_I.length;x++) {inset+=(Line.search(SCRIPT_I[x])>=0)?Line.match(SCRIPT_I[x]).length:0;}
				z++;
			} else {
				for (x=0;x<WRAP.length;x++) {
					A = new RegExp('<'+WRAP[x]+'>','gi');
					Line = Line.replace(A,'\n<'+WRAP[x]+'>');
					A = new RegExp('<'+WRAP[x]+'\\s','gi');
					Line = Line.replace(A,'\n<'+WRAP[x]+' ');
				}
				var Line2 = Line.split('\n');
				for (n=0;n<Line2.length;n++) {
					Line = Line2[n];
					if (Line.search(/\S/g)>=0) {
						result += '<tr><td style=padding-left:'+20*inset+';background-color:#'+BGColor(z)+' nowrap>'+FixHTML(Line)+'&nbsp;</td></tr>';
						for (x=0;x<INSET.length;x++) {
							A = new RegExp('<'+INSET[x]+'\\s|<'+INSET[x]+'>','gi');
							B = new RegExp('<\/'+INSET[x]+'>','gi');
							inset+=(Line.search(A)>=0)?Line.match(A).length:0;
							inset-=(Line.search(B)>=0)?Line.match(B).length:0;
						}
						z++;
					}
				}
			}
			if (y < intScript) {inset++}
			if (inset < 0) {inset=0}
		}
		result = '<table cellpadding=0 cellspacing=0 style=font-size:9pt;color:#003399;>'+result+'</table>';
		DevTools.DisplayWindow.document.body.innerHTML=result;
		DevTools.DisplayWindow.document.title='Dev Tools v' +Version+ ' - (Page Source)';
	}

	function BGColor(x) {
		return (x % 2 == 0)?'ffffff':'e9e9e9';
	}

	// Scan For Invalid IDs

	function ShowInvalid() {
		var result='';
		var obj=document.all;
		var A = new Array();
		var B = new Array();
		for (x=0; x<obj.length; x++) {
			if (obj[x].id) {
				if (obj[x].id.search(/\W|^\d/g) != -1) {
					A[A.length] = obj[x].id;
					B[B.length] = 'Invalid ID ('+ obj[x].id.match(/\W|^\d/g)+')';

				} else if (eval(obj[x].id+'.length') > 1) {
					if (eval('typeof '+obj[x].id+'.attributes')!='object') {
						for (i=0;i<A.length;i++) {if (A[i] == obj[x].id) {break;}}
						if (i==A.length){
							A[A.length] = obj[x].id;
							B[B.length] = eval(obj[x].id+'.length') + ' Duplicates';
						}
					}
				}
			}
		}
		if (A.length > 0) {
			result = '<table id=DTInvalid_NB cellpadding=0 cellspacing=0 border=0 style="font-size:8pt;color:#000000;">';
			for (i=0;i<A.length;i++) {result += '<tr><td>'+(i+1)+') '+A[i]+'</td><td style="padding:0 5;">-</td><td>'+B[i]+'</td></tr>'}
			result += '</table>';
		} else {
			result = 'none';
		}
		ShowMouseInfo('Invalid IDs',result);
	}

	// Scan For Unmatched Tags

	function TagCheck() {
		var i = 0;
		var tag = '';
		var result = '';
		var intScript = 0;
		var intComment = 0;
		var A = new Array();
		var B = new Array();
		var tags = 	document.documentElement.outerHTML.split('<');
		var IGNORE = new Array('IMG','BR','LI','OPTION','INPUT','AREA','BASEFONT','BGSOUND','BASE','DD','DT','EMBED','FRAME','HR','LINK','MARQUEE','META','NOBR','P','PARAM','PLAINTEXT','WBR','nul');
		var CODE = new Array('SCRIPT','STYLE');

		for (x=0;x<tags.length;x++) {
			if (tags[x].length>0) {
				//Look for Code Open/Closed
				for (y=0;y<CODE.length;y++) {
					R = new RegExp('^\/'+CODE[y]+'>','gi');
					intScript+=(tags[x].search(R)>=0)?-1:0;
				}
				if (intScript == 0) {
					intComment += (tags[x].search(/^\!\-\-/gi)==0)?1:0;
					if (intComment > 0) {
						if (tags[x].search(/\-\->/gi)>=0){
							intComment--;
							tags[x] = tags[x].slice(tags[x].search(/\-\->/gi));
						}
					}
					if (intComment == 0) {
						if (tags[x].slice(0,1) == '\/') {
							tag = tags[x].match(/^\/\w*>/i);
							tag = tag[0].slice(1,-1);
							i=-1;
						} else {
							tag = tags[x].match(/^\w*>|^\w*\s/i);
							tag = String(tag).slice(0,-1);
							i=1;
						}
						for (y=0;y<IGNORE.length;y++) {if (tag == IGNORE[y]) {break}}
						if (y == IGNORE.length) {
							for (y=0;y<A.length;y++) {
								if (tag == A[y]) {break}
							}
							A[y] = tag;
							B[y] = (typeof B[y] != 'undefined')?B[y]+i:i;
							if (tag == 'param') {alert(tags[x])}
						}
					}
				}
				//Look for Code Open/Closed
				for (y=0;y<CODE.length;y++) {
					R = new RegExp('^'+CODE[y]+'\\s|^'+CODE[y]+'>','gi');
					intScript+=(tags[x].search(R)>=0)?1:0;
				}
			}
		}
		y=0
		result = '<table id=DTInvalid_NB cellpadding=0 cellspacing=0 border=0 style="font-size:8pt;color:#000000;">';
		for (x=0;x<A.length;x++) {
			if (B[x] != 0) {
				result += '<tr><td>'+(y+1)+') '+A[x]+'</td><td style="padding:0 5;">=</td><td>'+B[x]+'</td></tr>'
				y++;
			}
		}
		if (y==0) {result += '<tr><td>none</td></tr>'}
		result += '</table>';
		ShowMouseInfo('Unmached Tags',result);
	}

	// Show Cookies

	function ShowCookies() {
		var strCR = '<br>';
		var result='';
		A = document.cookie.split('\; ');
		if (A.length > 0) {
			result = '<table id=DTInvalid_NB cellpadding=0 cellspacing=0 border=0 style="font-size:8pt;color:#000000;">';
			for (i=0;i<A.length;i++) {
				B = A[i].split('\=');
				result += '<tr><td>'+(i+1)+') '+unescape(B[0])+'</td><td style="padding:0 5;">=</td><td>'+unescape(B[1])+'</td></tr>'
			}
			result += '</table>';
		} else {
			result = 'none';
		}
		ShowMouseInfo('Cookies',result);
	}

	// Show URL Information

	function ShowURL() {
		var strCR = '<br>';
		var result = '<b>Host Server:</b>'+strCR+document.location.protocol+'//'+document.location.host+strCR+strCR;
		result += '<b>Pathname:</b>'+strCR+document.location.pathname+strCR+strCR;
		result += '<b>Querystring Variables:</b>'+strCR;
		var A = new Array();
		var B = new Array();
		var strQuery = document.location.search
		if (strQuery.length >1) {
			strQuery = strQuery.slice(1).split('\&');
			for (i=0; i<strQuery.length; i++) {
				strVar = strQuery[i].split('=')
				if (strVar.length > 1) {
					for (x=2;x<255;x++) {
						if(typeof strVar[x] == 'undefined') {break}
						strVar[1] += '='+strVar[x];
					}
					for (x=0; x<A.length; x++) {
						if (A[x] == strVar[0]) {break}
					}
					if (typeof B[x] == 'undefined') {B[x] = ''}
					A[x] = strVar[0]
					B[x] += unescape(strVar[1])+', ';
				}
			}
			result += '<table id=DTInvalid_NB cellpadding=0 cellspacing=0 border=0 style="font-size:8pt;color:#000000;">';
			for (i=0;i<A.length;i++) {result += '<tr><td>'+(i+1)+') '+A[i]+'</td><td style="padding:0 5;">=</td><td>'+B[i].slice(0,-2)+'</td></tr>';}
			result += '</table>';
		} else {
			result += 'none';
		}
		ShowMouseInfo('URL Information',result);
	}

	// Show Tables

	function ShowBorders() {
		obj=document.all.tags("TABLE");
		if (TABLE_State) {
			for (x=0; x<obj.length; x++) {
				if (obj[x].id.slice(-3) != '_NB') {
					if (typeof obj[x].borderOld != 'undefined') {
						obj[x].border=obj[x].borderOld;
						obj[x].borderColor=obj[x].borderColorOld;
					}
				}
			}
			TABLE_State=false;
		} else {
			for (x=0; x<obj.length; x++) {
				if (obj[x].id.slice(-3) != '_NB') {
					obj[x].borderOld=(obj[x].border)?obj[x].border:0;
					obj[x].border=1;
					obj[x].borderColorOld=obj[x].borderColor;
					obj[x].borderColor='#999999';
					TABLE_State=true;
				}
			}
		}
	}

	// Show Iframes

	function ShowIframes() {
		objIframes=document.all.tags("IFRAME");
		if (IFRAME_State) {
			for (x=0; x<objIframes.length; x++) {
				if (objIframes[x].dt_sd) {objIframes[x].style.display='none';objIframes[x].sd=false;}
				if (objIframes[x].dt_sv) {objIframes[x].style.visibility='hidden';objIframes[x].sv=false;}
				if (objIframes[x].dt_sy) {objIframes[x].style.height=0;objIframes[x].sy=false;}
				if (objIframes[x].dt_sx) {objIframes[x].style.width=0;objIframes[x].sx=false;}
			}
			IFRAME_State=false;
		} else {
			for (x=0; x<objIframes.length; x++) {
				if (objIframes[x].style.display=='none') {
					objIframes[x].style.display='inline';
					objIframes[x].dt_sd=true;
					IFRAME_State=true;
				}
				if (objIframes[x].style.visibility=='hidden') {
					objIframes[x].style.visibility='visible';
					objIframes[x].dt_sv=true;
					IFRAME_State=true;
				}
				if (objIframes[x].offsetHeight==0) {
					objIframes[x].style.height='150';
					objIframes[x].dt_sy=true;
					IFRAME_State=true;
				}
				if (objIframes[x].offsetWidth==0) {
					objIframes[x].style.width='300';
					objIframes[x].dt_sx=true;
					IFRAME_State=true;
				}
			}
			if (!IFRAME_State){ShowMouseInfo('Hidden IFrames','none')}
		}
	}

	// Manual Execution

	function ExecuteRawJS() {
		if (event.keyCode == 13) {
			eval(event.srcElement.value);
			inDTJS.style.display="none";
			DevTools.DevTools_Redraw();
		}
	}

	// Support Code

	function OpenWindow() {
		if (typeof DevTools.DisplayWindow == 'object') {
			if (!DevTools.DisplayWindow.closed) {DevTools.DisplayWindow.focus();return;}
		}
		DevTools.DisplayWindow=window.open('','','scrollbars=yes, resizable, width='+Window_Width+', height='+Window_Height+' top=0 left=0');
		while (DevTools.DisplayWindow.document.childNodes.length < 1) {
			window.staus='Opening Window';
		}
		DevTools.DisplayWindow.focus();
	}

	function FixCR(strText) {
		return String(strText).replace(/\n/gi,'<br>\n');
	}

	function FixHTML(strText) {
		return String(strText).replace(/&/gi,'&#38;').replace(/</gi,'&#60;');
	}

	function DevTools_Redraw() {
		divDevTools.style.display='none';
		divDevTools.style.display='inline';
	}

	// MoveCode

	function Position() {
		MouseX=document.body.scrollLeft+event.clientX;
		MouseY=document.body.scrollTop+event.clientY;
		if (OffsetX >= 0) {
			if (event.button == 1) {
				objMove.style.filter='alpha(opacity=50)';
				objMove.style.left = MouseX - OffsetX;
				objMove.style.top = MouseY - OffsetY;
				document.selection.empty();
			} else {
				Disable();
			}
		}
	}

	function Enable(obj) {
		OffsetX = event.offsetX+3;
		OffsetY = event.offsetY+3;
		if (typeof obj == 'undefined') {
			objMove = event.srcElement;
		} else {
			objMove = obj;
		}
		objMove.style.position = 'absolute';
		objMove.style.zIndex = z;
		objMove.focus();
		z++;
	}

	function Disable() {
		objMove.style.filter='';
		OffsetX = -1;
	}

	// Toolbar Code

	function DevTools_Init() {
		if (document.readyState != 'complete') {setTimeout('DevTools.DevTools_Init()',100);return;}
		var result='';
		result += '<div align=center id=divDevTools style="Z-INDEX:1000;top:10;left:10;position:absolute;border:1 solid #003366;background-color:#6699cc;cursor:default;">';
		result += '<table id=DTMain_NB border=0 cellpadding=0 cellspacing=0 style="font-family:arial;font-size:8pt;color:#000000;" width=110>';
		result += '	<tr style=background-color:#cccccc;padding-right:3;>';
		result += '		<td align=left style=font-size:10pt;padding-left:5; width=100% onmousedown=DevTools.Enable(divDevTools); onmouseup=DevTools.Disable();><b>Dev Tools</b></td>';
		result += '		<td onclick=DevTools.DevTools_State(2) id=tdMinimize style=font-family:webdings;cursor:hand;>0</td>';
		result += '		<td onclick=DevTools.DevTools_State(1) id=tdRestore style=display:none;font-family:webdings;cursor:hand;>2</td>';
		result += '		<td onclick=DevTools.DevTools_State(0) style=font-family:webdings;cursor:hand;>r</td>';
		result += '	</tr><tr id=trOpen><td colspan=4 style="border-top:1 solid #000000;">';
		result += '	<table id=DTList_NB cellpadding=0 cellspacing=0 style="padding:0 5;font-family:arial;font-size:8pt;color:#ffffff;"width=100% >';
		result += '	<tr><td align=center><img alt="Drag Me Over An Object" width=8 height=7 src='+Drag_Image+' onclick=DevTools.ShowProperties(window); ondragstart=DevTools.DevTools_Highlight(parentElement,0);DevTools.SetDrag(); ondragend=DevTools.DevTools_State(1);DevTools.ShowProperties(DevTools.DragObject); onmouseover=DevTools.DevTools_Highlight(parentElement,1); onmouseout=DevTools.DevTools_Highlight(parentElement,0);></td><td>Property Poke</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowSource() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:webdings;color:#000000;>&#157;</td><td>Page Source</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowCookies() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:webdings;color:#000000;>&#157;</td><td>Cookies</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowURL() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:webdings;color:#000000;>&#157;</td><td>URL Information</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowInvalid() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:wingdings;color:#000000;>&#252;</td><td>Invalid IDs</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.TagCheck() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:wingdings;color:#000000;>&#252;</td><td>Unmatched Tags</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowBorders() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:webdings;color:#000000;>2</td><td>Table Borders</td></tr>';
		result += '	<tr style=cursor:hand; onclick=DevTools.ShowIframes() onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);><td align=center style=font-family:webdings;color:#000000;>2</td><td>Hidden Iframes</td></tr>';
		result += '	<tr style=cursor:hand; onclick=inDTJS.style.display="inline";inDTJS.focus(); onmouseover=DevTools.DevTools_Highlight(this,1); onmouseout=DevTools.DevTools_Highlight(this,0);>';
		result += '		<td align=center style=font-family:webdings;color:#000000; valign=top>`</td><td>Execute JS<br>';
		result += '			<input id=inDTJS style="display:none;width:200;border:1 solid #000000;font-family:terminal;font-size:6pt;height:13px;line-height:10px;vertical-align:middle;"';
		result += '			onkeydown=DevTools.ExecuteRawJS() onblur=this.style.display="none";DevTools.DevTools_Redraw();></td></tr>';
		result += '	<tr><td align=center style="border-top:1 solid #000000;" colspan=2><a href="mailto:benwhite@columbus.rr.com?subject=Dev Tools v'+Version+'" style="color:#ffffff;text-decoration:none;"> version '+Version+'</a></td></tr>';
		result += '</table></td></tr></table></div>';
		result += '<div id=divMouseInfo style="Z-INDEX:1001;position:absolute;border:1 solid #666666;padding:0 0;background-color:#ffffcc;color:#000000;font-family:arial;font-size:8pt;display:none;" noWrap></div>';
		document.body.innerHTML+=result;
		document.onkeydown=this.DevTools_Show;	//used to pop open tools
		document.onmousemove=this.Position;	//used to drag tools around
		this.DevTools_State(0);
	}

	function DevTools_State(state) {
		switch (state) {
			case 0: divDevTools.style.display='none';break;
			case 1: divDevTools.style.display='inline';trOpen.style.display='inline';tdMinimize.style.display='inline';tdRestore.style.display='none';DevTools.DragCleanup(true);break;
			case 2: divDevTools.style.display='inline';trOpen.style.display='none';tdMinimize.style.display='none';tdRestore.style.display='inline';break;
		}
	}

	function DevTools_Highlight(obj,state) {
		switch (state) {
			case 0: obj.style.backgroundColor='';break;
			case 1: obj.style.backgroundColor='#336699';break;
		}
	}

	function DevTools_Show() {
		if (event.ctrlKey && event.altKey && event.keyCode == 68) {
			divDevTools.style.top = document.body.scrollTop + 10;
			divDevTools.style.left = document.body.scrollLeft + 10;
			DevTools.DevTools_State(1);
		}
	}

//Functions
	this.DevTools_Init = DevTools_Init;
	this.DevTools_Show = DevTools_Show;
	this.DevTools_State = DevTools_State;
	this.DevTools_Highlight = DevTools_Highlight;
	this.DevTools_Redraw = DevTools_Redraw;
	//Mouse
	this.Position = Position;
	this.Enable = Enable;
	this.Disable = Disable;
	//Poke
	this.ShowProperties = ShowProperties;
	this.GetProperties = GetProperties;
	this.GetHandle = GetHandle;
	this.SetDrag = SetDrag;
	this.ShowDragItem = ShowDragItem;
	this.PositionInfo = PositionInfo;
	this.DragCleanup = DragCleanup;
	//Other
	this.ShowSource = ShowSource;
	this.TagCheck = TagCheck;
	this.ShowInvalid = ShowInvalid;
	this.ShowCookies = ShowCookies;
	this.ShowURL = ShowURL;
	this.ShowBorders = ShowBorders;
	this.ShowIframes = ShowIframes;
	this.ExecuteRawJS = ExecuteRawJS;

// Variables
	this.DisplayWindow = DisplayWindow;
	this.Version = Version;
	this.Drag_Image = Drag_Image;
	this.DragObject = DragObject;
	this.MouseX = MouseX;
	this.MouseY = MouseY;

	DevTools_Init();
}

if (typeof DevTools == 'undefined') {DevTools = new clsDevTools()}
//-->