1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../js/jquery-latest.js"></script>
<script src="../../js/json2.js"></script>
<script src="../../js/jquery-ui-personalized-1.6rc2.min.js"></script>
<script type="text/javascript">

$(document).ready(function()
{
	selConvo();
//  the following is test 1 - ignore ...   
	$("convos").bind
		("click", function(e)
			{
				alert("Click happened! " + $(this).id);
			}
		);
//  end test 1.
});

function addText()
{}

var searchID = <? echo $_GET['SearchID']; ?>;

arr={};
arr1={};
function selConvo( obj )
{	
	var arg =
	{
		"isud"	: "select" ,
		"what"	: "convo",
		"SearchID"	: searchID
	};
	
	$.get( "sql_marcus.php" , arg , function(data)
	{
		arr = evalme(data);
		
		for (id in arr)
		{
			//$(".convos").append("<div class=\"convo\" alt=\""+id+"\">"+arr[id].lbl+"</div>");
			$(".convos").append("<div class=\"convo\" alt=\""+id+"\">"+arr[id].lbl+"</div>");
			selChildConvo(id);
			
		}
	});
}

function selChildConvo( id )
{
	var arg =
	{
		"isud"	: "select" ,
		"what"	: "ConvoChild",
		"ConvoID"	: id
	};
	
	$.get( "sql_marcus.php" , arg , function(data)
	{
		arr = evalme(data);
		
		for (id1 in arr)
		{
			$(".convo[alt='"+id+"']").append("<div class=\"convo\" alt=\""+id1+"\">"+arr[id1].lbl+"</div>");
			selChildConvo(id1);
			// begin mod...
			/*$(".convo[alt='"+id1+"']").click(function()
			//$(".convo").click(function()
			{
				var arg1 =
				{ 
					"isud"	  : "select" ,
					"what"	  : "convo",
					"ConvoID" : id1 //$(this).attr("alt")
				};	$.get( "sql_marcus.php" , arg1 , function(data1)
					{arr1 = evalme(data1);})
			});
			*/
			// end mod...
		}		
	});
	return $(this);
}

function evalme(data) { if (data) return eval('(' + data + ')'); }

</script>
<style type="text/css"><!--

.convos
{ float: left;  }

.convo
{ padding: 2px 0px 2px 6px; margin: 0px 0px 0px 8px; border-left:1px solid #cccccc; }

.convos{  }


.bodyText{ background-color: #CC99CC; border: solid 1px #000; }

.highlight
{  
	background-color: yellow; 
	border:solid 1px red;
   /* opacity: 0.4 ;*/
}

p{width:100px; }

--></style>
</head>
<body>

<div class="convos"></div>
<div class="bodyText"></div>

<div class="addConvo"></div>


</body>
</html>