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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
|
<?php
// Controller for the hourglass chart
//
// webtrees: Web based Family History software
// Copyright (C) 2011 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// $Id$
if (!defined('WT_WEBTREES')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
require_once WT_ROOT.'includes/functions/functions_charts.php';
// -- array of GEDCOM elements that will be found but should not be displayed
$nonfacts[] = "FAMS";
$nonfacts[] = "FAMC";
$nonfacts[] = "MAY";
$nonfacts[] = "BLOB";
$nonfacts[] = "CHIL";
$nonfacts[] = "HUSB";
$nonfacts[] = "WIFE";
$nonfacts[] = "RFN";
$nonfacts[] = "";
$nonfamfacts[] = "UID";
$nonfamfacts[] = "";
class WT_Controller_Hourglass extends WT_Controller_Chart {
var $pid = "";
var $canedit = false;
var $name_count = 0;
var $total_names = 0;
var $SEX_COUNT = 0;
var $show_full = 0;
var $show_spouse = 0;
var $generations;
var $dgenerations;
var $box_width;
var $name;
// the following are ajax variables //
var $ARID;
var $arrwidth;
var $arrheight;
function __construct($rootid='', $show_full=1, $generations=3) {
global $USE_RIN, $MAX_ALIVE_AGE, $GEDCOM, $bheight, $bwidth, $bhalfheight, $PEDIGREE_FULL_DETAILS, $MAX_DESCENDANCY_GENERATIONS;
global $WT_IMAGES, $TEXT_DIRECTION, $show_full;
parent::__construct();
// Extract parameters from from
$this->pid =safe_GET_xref('rootid');
$this->show_full =safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS);
$this->show_spouse=safe_GET('show_spouse', array('0', '1'), '0');
$this->generations=safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, 3);
$this->box_width =safe_GET_integer('box_width', 50, 300, 100);
$box_width =safe_GET_integer('box_width', 50, 300, 100);
// This is passed as a global. A parameter would be better...
$show_full=$this->show_full;
if (!empty($rootid)) $this->pid = $rootid;
//-- flip the arrows for RTL languages
if ($TEXT_DIRECTION=="rtl") {
$temp = $WT_IMAGES['larrow'];
$WT_IMAGES['larrow'] = $WT_IMAGES['rarrow'];
$WT_IMAGES['rarrow'] = $temp;
}
//-- get the width and height of the arrow images for adjusting spacing
if (file_exists($WT_IMAGES['larrow'])) {
$temp = getimagesize($WT_IMAGES['larrow']);
$this->arrwidth = $temp[0];
$this->arrheight= $temp[1];
}
// -- size of the detailed boxes based upon optional width parameter
$Dbwidth=($box_width*$bwidth)/100;
$Dbheight=($box_width*$bheight)/100;
$bwidth=$Dbwidth;
$bheight=$Dbheight;
// -- adjust size of the non-detailed boxes
if (!$this->show_full) {
$bwidth = $bwidth - 25;
$bheight = $bheight - 32;
}
$bhalfheight = (int)($bheight / 2);
// Validate parameters
$this->hourPerson = WT_Person::getInstance($this->pid);
if (!$this->hourPerson) {
$this->hourPerson=$this->getSignificantIndividual();
$this->pid=$this->hourPerson->getXref();
}
$this->name=$this->hourPerson->getFullName();
//Checks how many generations of descendency is for the person for formatting purposes
$this->dgenerations = $this->max_descendency_generations($this->pid, 0);
if ($this->dgenerations<1) $this->dgenerations=1;
$this->setPageTitle(/* I18N: %s is a person's name */ WT_I18N::translate('Hourglass chart of %s', $this->name));
}
/**
* Prints pedigree of the person passed in. Which is the descendancy
*
* @param mixed $pid ID of person to print the pedigree for
* @param mixed $count generation count, so it recursively calls itself
* @access public
* @return void
*/
function print_person_pedigree($person, $count) {
global $SHOW_EMPTY_BOXES, $WT_IMAGES, $bhalfheight;
if ($count>=$this->generations) return;
if (!$person) return;
//-- calculate how tall the lines should be
$lh = ($bhalfheight+3) * pow(2, ($this->generations-$count-1));
foreach ($person->getChildFamilies() as $family) {
echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"empty-cells: show;\">";
$height="100%";
echo "<tr>";
echo "<td valign=\"bottom\"><img class=\"line3\" name=\"pvline\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"$lh\" alt=\"\"></td>";
echo "<td><img class=\"line4\" src=\"".$WT_IMAGES["hline"]."\" width=\"7\" height=\"3\" alt=\"\"></td>";
echo "<td>";
//-- print the father box
print_pedigree_person($family->getHusband());
echo "</td>";
if ($family->getHusband()) {
$ARID = $family->getHusband()->getXref();
echo "<td id=\"td_".$ARID."\">";
//-- print an Ajax arrow on the last generation of the adult male
if ($count==$this->generations-1 && $family->getHusband()->getChildFamilies()) {
echo "<a href=\"#\" onclick=\"return ChangeDiv('td_".$ARID."','".$ARID."','".$this->show_full."','".$this->show_spouse."','".$this->box_width."')\"><img src=\"".$WT_IMAGES["rarrow"]."\" alt=\"\"></a> ";
}
//-- recursively get the father's family
$this->print_person_pedigree($family->getHusband(), $count+1);
echo "</td>";
}
echo "</tr><tr>";
echo "<td valign=\"top\"><img name=\"pvline\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"$lh\" alt=\"\"></td>";
echo "<td><img src=\"".$WT_IMAGES["hline"]."\" width=\"7\" height=\"3\" alt=\"\"></td>";
echo "<td>";
//-- print the mother box
print_pedigree_person($family->getWife());
echo "</td>";
if ($family->getWife()) {
$ARID = $family->getWife()->getXref();
echo "<td id=\"td_".$ARID."\">";
//-- print an ajax arrow on the last generation of the adult female
if ($count==$this->generations-1 && $family->getWife()->getChildFamilies()) {
echo "<a href=\"#\" onclick=\"ChangeDiv('td_".$ARID."','".$ARID."','".$this->show_full."','".$this->show_spouse."','".$this->box_width."'); return false;\"><img src=\"".$WT_IMAGES["rarrow"]."\" alt=\"\"></a> ";
}
//-- recursively print the mother's family
$this->print_person_pedigree($family->getWife(), $count+1);
echo "</td>";
}
echo "</tr>";
echo "</table>";
break;
}
}
/**
* Prints descendency of passed in person
*
* @param mixed $pid ID of person to print descendency for
* @param mixed $count count of generations to print
* @access public
* @return void
*/
function print_descendency($person, $count, $showNav=true) {
global $TEXT_DIRECTION, $WT_IMAGES, $bheight, $bwidth, $bhalfheight, $lastGenSecondFam;
if ($count>$this->dgenerations) return 0;
if (!$person) return;
$pid=$person->getXref();
$tablealign = "right";
$otablealign = "left";
if ($TEXT_DIRECTION=="rtl") {
$tablealign = "left";
$otablealign = "right";
}
//-- put a space between families on the last generation
if ($count==$this->dgenerations-1) {
if (isset($lastGenSecondFam)) echo "<br>";
$lastGenSecondFam = true;
}
echo "<table id=\"table_$pid\" align=\"".$tablealign."\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
echo "<tr>";
echo "<td align=\"$tablealign\" width=\"100%\">";
$numkids = 0;
$families = $person->getSpouseFamilies();
$famcount = count($families);
$famNum = 0;
$kidNum = 0;
$children = array();
if ($count < $this->dgenerations) {
//-- put all of the children in a common array
foreach ($families as $family) {
$famNum ++;
$chs = $family->getChildren();
foreach ($chs as $c=>$child) $children[] = $child;
}
$ct = count($children);
if ($ct>0) {
echo "<table style=\"position: relative; top: auto; text-align: $tablealign;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
for ($i=0; $i<$ct; $i++) {
if (($i>0)&&($i<$ct-1)) $rowspan=1;
/* @var $person2 Person */
$person2 = $children[$i];
$chil = $person2->getXref();
echo "<tr>";
echo "<td id=\"td_$chil\" class=\"$TEXT_DIRECTION\" align=\"$otablealign\">";
$kids = $this->print_descendency($person2, $count+1);
$numkids += $kids;
echo "</td>";
//-- print the lines
$twidth = 7;
if ($ct==1) $twidth+=3;
if ($ct>1) {
if ($i==0) {
//-- adjust for the number of kids
$h = ($bhalfheight+3)*$numkids;
echo "<td valign=\"bottom\"><img class=\"line1\" name=\"tvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"$h\" alt=\"\"></td>";
} else if ($i==$ct-1) {
$h = ($bhalfheight+3)*$kids;
if ($count<$this->dgenerations-1) {
if ($this->show_spouse) $h-=15;
else $h += 15;
}
echo "<td valign=\"top\"><img name=\"bvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"".$h."\" alt=\"\"></td>";
} else {
echo "<td style=\"background: url('".$WT_IMAGES["vline"]."');\"><img src=\"".$WT_IMAGES["spacer"]."\" width=\"3\" alt=\"\"></td>";
}
}
echo "</tr>";
}
echo "</table>";
}
echo "</td>";
echo "<td width=\"$bwidth\">";
}
// Print the descendency expansion arrow
if ($count==$this->dgenerations) {
$numkids = 1;
$tbwidth = $bwidth+16;
for ($j=$count; $j<$this->dgenerations; $j++) {
echo "<div style=\"width: ".($tbwidth)."px;\"><br></div></td><td width=\"$bwidth\">";
}
$kcount = 0;
foreach ($families as $family) {
$kcount+=$family->getNumberOfChildren();
}
if ($kcount==0) {
echo "<div style=\"width: ".($this->arrwidth)."px;\"><br></div></td><td width=\"$bwidth\">";
} else {
echo "<div style=\"width: ".($this->arrwidth)."px;\"><a href=\"$pid\" onclick=\"return ChangeDis('td_".$pid."','".$pid."','".$this->show_full."','".$this->show_spouse."','".$this->box_width."')\"><img src=\"".$WT_IMAGES["larrow"]."\" alt=\"\"></a></div>";
//-- move the arrow up to line up with the correct box
if ($this->show_spouse) {
foreach ($families as $family) {
/* @var $family Family */
if (!is_null($family)) {
$spouse = $family->getSpouse($person);
if ($spouse!=null) {
echo "<br><br><br>";
}
}
}
}
echo "</td><td width=\"$bwidth\">";
}
}
echo "<table id=\"table2_$pid\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td>";
print_pedigree_person($person);
echo "</td><td><img class=\"line2\" src=\"".$WT_IMAGES["hline"]."\" width=\"7\" height=\"3\" alt=\"\">";
//----- Print the spouse
if ($this->show_spouse) {
foreach ($families as $family) {
/* @var $family Family */
if (!is_null($family)) {
$spouse = $family->getSpouse($person);
if ($spouse!=null) {
echo "</td></tr><tr><td align=\"$otablealign\">";
//-- shrink the box for the spouses
$tempw = $bwidth;
$temph = $bheight;
$bwidth -= 10;
$bheight -= 10;
print_pedigree_person($spouse);
$bwidth = $tempw;
$bheight = $temph;
$numkids += 0.95;
echo "</td><td></td>";
}
}
}
//-- add offset divs to make things line up better
if ($count==$this->dgenerations) echo "<tr><td colspan\"2\"><div style=\"height: ".($bhalfheight/2)."px; width: ".$bwidth."px;\"><br></div>";
}
echo "</td></tr></table>";
// For the root person, print a down arrow that allows changing the root of tree
if ($showNav && $count==1) {
// NOTE: If statement OK
if ($person->canDisplayName()) {
// -- print left arrow for decendants so that we can move down the tree
$famids = $person->getSpouseFamilies();
//-- make sure there is more than 1 child in the family with parents
$cfamids = $person->getChildFamilies();
$num=0;
foreach ($cfamids as $family) {
$num += $family->getNumberOfChildren();
}
// NOTE: If statement OK
if ($num>0) {
echo "<div class=\"center\" id=\"childarrow\" dir=\"".$TEXT_DIRECTION."\"";
echo " style=\"position:absolute; width:".$bwidth."px;\">";
echo "<a href=\"#\" onclick=\"togglechildrenbox(); return false;\" onmouseover=\"swap_image('larrow',3);\" onmouseout=\"swap_image('larrow',3);\">";
echo "<img id=\"larrow\" src=\"".$WT_IMAGES["darrow"]."\" alt=\"\">";
echo "</a><br>";
echo "<div id=\"childbox\" dir=\"".$TEXT_DIRECTION."\" style=\"width:".$bwidth."px; height:".$bheight."px; visibility: hidden;\">";
echo "<table class=\"person_box\"><tr><td>";
foreach ($famids as $family) {
$spouse = $family->getSpouse($person);
if (!empty($spouse)) {
$spid = $spouse->getXref();
echo "<a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span ";
$name = $spouse->getFullName();
if (hasRTLText($name)) echo 'class="name2">';
else echo 'class="name1">';
echo $name;
echo "<br></span></a>";
}
$children = $family->getChildren();
foreach ($children as $id=>$child) {
$cid = $child->getXref();
echo " <a href=\"hourglass.php?rootid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span ";
$name = $child->getFullName();
if (hasRTLText($name)) echo 'class="name2">';
else echo 'class="name1">';
echo '<img src="'.$WT_IMAGES["larrow"].'" height="10" alt=""> ', $name;
echo "<br></span></a>";
}
}
//-- do we need to print this arrow?
echo "<img src=\"".$WT_IMAGES["rarrow"]."\" alt=\"\"> ";
//-- print the siblings
foreach ($cfamids as $family) {
if (!is_null($family->getHusband()) || !is_null($family->getWife())) {
echo "<span class=\"name1\"><br>".WT_I18N::translate('Parents')."<br></span>";
$husb = $family->getHusband();
if (!empty($husb)) {
$spid = $husb->getXref();
echo " <a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span ";
$name = $husb->getFullName();
$name = rtrim($name);
if (hasRTLText($name)) echo 'class="name2">';
else echo 'class="name1">';
echo $name;
echo "<br></span></a>";
}
$husb = $family->getWife();
if (!empty($husb)) {
$spid = $husb->getXref();
echo " <a href=\"hourglass.php?rootid={$spid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span ";
$name = $husb->getFullName();
$name = rtrim($name);
if (hasRTLText($name)) echo 'class="name2">';
else echo 'class="name1">';
echo $name;
echo "<br></span></a>";
}
}
$children = $family->getChildren();
$num = $family->getNumberOfChildren();
if ($num>2) echo "<span class=\"name1\"><br>".WT_I18N::translate('Siblings')."<br></span>";
if ($num==2) echo "<span class=\"name1\"><br>".WT_I18N::translate('Sibling')."<br></span>";
foreach ($children as $id=>$child) {
$cid = $child->getXref();
if ($cid!=$pid) {
echo " <a href=\"hourglass.php?rootid={$cid}&show_spouse={$this->show_spouse}&show_full={$this->show_full}&generations={$this->generations}&box_width={$this->box_width}\"><span ";
$name = $child->getFullName();
$name = rtrim($name);
if (hasRTLText($name)) echo 'class="name2">';
else echo 'class="name1">';
echo $name;
echo "<br></span></a>";
}
}
}
echo "</td></tr></table>";
echo "</div>";
echo "</div>";
}
}
}
echo "</td></tr>";
echo "</table>";
return $numkids;
}
/**
* Calculates number of generations a person has
*
* @param mixed $pid ID of person to see how far down the descendency goes
* @param mixed $depth Pass in 0 and it calculates how far down descendency goes
* @access public
* @return maxdc Amount of generations the descendency actually goes
*/
function max_descendency_generations($pid, $depth) {
if ($depth > $this->generations) return $depth;
$person = WT_Person::getInstance($pid);
if (is_null($person)) return $depth;
$maxdc = $depth;
foreach ($person->getSpouseFamilies() as $family) {
foreach ($family->getChildren() as $child) {
$dc = $this->max_descendency_generations($child->getXref(), $depth+1);
if ($dc >= $this->generations) return $dc;
if ($dc > $maxdc) $maxdc = $dc;
}
}
$maxdc++;
if ($maxdc==1) $maxdc++;
return $maxdc;
}
/**
* setup all of the javascript that is needed for the hourglass chart
*
*/
function setupJavascript() {
global $bhalfheight;
?>
<script type="text/javascript">
// code to fix chart lines in block
var vlines;
vlines = document.getElementsByName("tvertline");
for (i=0; i < vlines.length; i++) {
var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1);
var hline = document.getElementById("table_"+pid);
var hline2 = document.getElementById("table2_"+pid);
var newHeight = Math.abs(hline.offsetHeight - (hline2.offsetTop + <?php echo $bhalfheight+9; ?>));
vlines[i].style.height=newHeight+'px';
}
vlines = document.getElementsByName("bvertline");
for (i=0; i < vlines.length; i++) {
var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1);
var hline = document.getElementById("table_"+pid);
var hline2 = document.getElementById("table2_"+pid);
vlines[i].style.height=(hline.offsetTop+hline2.offsetTop + <?php echo $bhalfheight+9; ?>)+'px';
}
vlines = document.getElementsByName("pvline");
for (i=0; i < vlines.length; i++) {
vlines[i].style.height=(vlines[i].parentNode.offsetHeight/2)+'px';
}
var pastefield;
function paste_id(value) {
pastefield.value=value;
}
// Hourglass control..... Ajax arrows at the end of chart
function ChangeDiv(div_id, ARID, full, spouse, width) {
var divelement = document.getElementById(div_id);
var oXmlHttp = createXMLHttp();
oXmlHttp.open("get", "hourglass_ajax.php?show_full="+full+"&rootid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true);
oXmlHttp.onreadystatechange=function()
{
if (oXmlHttp.readyState==4)
{
divelement.innerHTML = oXmlHttp.responseText;
sizeLines();
}
};
oXmlHttp.send(null);
return false;
}
// Hourglass control..... Ajax arrows at the end of descendants chart
function ChangeDis(div_id, ARID, full, spouse, width) {
var divelement = document.getElementById(div_id);
var oXmlHttp = createXMLHttp();
oXmlHttp.open("get", "hourglass_ajax.php?type=desc&show_full="+full+"&rootid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true);
oXmlHttp.onreadystatechange=function()
{
if (oXmlHttp.readyState==4)
{
divelement.innerHTML = oXmlHttp.responseText;
sizeLines();
}
};
oXmlHttp.send(null);
return false;
}
function sizeLines() {
var vlines;
vlines = document.getElementsByName("tvertline");
for (i=0; i < vlines.length; i++) {
var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1);
var hline = document.getElementById("table_"+pid);
var hline2 = document.getElementById("table2_"+pid);
var newHeight = Math.abs(hline.offsetHeight - (hline2.offsetTop + <?php echo $bhalfheight+9; ?>));
vlines[i].style.height=newHeight+'px';
}
vlines = document.getElementsByName("bvertline");
for (i=0; i < vlines.length; i++) {
var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1);
var hline = document.getElementById("table_"+pid);
var hline2 = document.getElementById("table2_"+pid);
vlines[i].style.height=(hline.offsetTop+hline2.offsetTop + <?php echo $bhalfheight+9; ?>)+'px';
}
vlines = document.getElementsByName("pvline");
//alert(vlines[0].parentNode.parentNode.parentNode);
for (i=0; i < vlines.length; i++) {
//vlines[i].parentNode.style.height="50%";
vlines[i].style.height=(vlines[i].parentNode.offsetHeight/2)+'px';
}
}
//-->
</script>
<?php
}
}
|