pageHeader() ->addExternalJavascript(WT_STATIC_URL.'js/autocomplete.js') ->addInlineJavascript(' var pastefield; function paste_id(value) { pastefield.value=value; } // For the "find indi" link var timer; var offSetNum = 20; // amount timeline moves with each mouse click var speed; // method for scrolling timeline around in portal. takes in a string for the direction the timeline is moving "Left" "Right" "Top" "Down" function startScroll(move) { speed = parseInt(document.buttons.speedMenu.options[document.buttons.speedMenu.selectedIndex].value) * 25; //Sets the speed of the scroll feature timer = 1; scroll(move); } function scroll(move) { if (timer==null) return; // If timer is not set timeline doesn\'t scroll timer = setTimeout("scroll(\'"+move+"\')",speed); // Keeps the timeline moving as long as the user holds down the mouse button on one of the direction arrows topInnerDiv = document.getElementById("topInner"); innerDiv = document.getElementById("inner"); myouterDiv = document.getElementById("outerDiv"); //compares the direction the timeline is moving and how far it can move in each direction. if (move == "left" && ((maxX+topInnerDiv.offsetLeft+350) > (myouterDiv.offsetLeft+myouterDiv.offsetWidth))) { left = (innerDiv.offsetLeft - offSetNum)+"px"; innerDiv.style.left = left; topInnerDiv.style.left = left; } else if (move == "right" && topInnerDiv.offsetLeft < (-10)) { right = (innerDiv.offsetLeft + offSetNum)+"px"; innerDiv.style.left = right; topInnerDiv.style.left = right; } else if (move == "up" && innerDiv.offsetTop > maxY) { up = (innerDiv.offsetTop - offSetNum)+"px"; innerDiv.style.top = up; } else if (move == "down" && innerDiv.offsetTop < -60) { down = (innerDiv.offsetTop + offSetNum)+"px"; innerDiv.style.top = down; } } //hopefully this will increase zoom at every press until five presses have been made //after 5, the control will stop and the minimize will reverse the effects var numOfIncrease = 0; var numOfDecrease = 0; var font = 12; var zoomfactor = '.$zoomfactor.'; function startZoom(move) { zoom(move); } function zoom(move) { if (move == "increase" && numOfIncrease < 5) { increase = zoomfactor + 10; numOfIncrease += 1; temp = document.getElementById("inner"); for (i=0; i 0) { decrease = zoomfactor - 10; numOfIncrease -= 1; for (i=0; i= 5) { temp = document.getElementById("inner"); for (i=0; i= 5) { temp = document.getElementById("inner"); for (i=0; i', WT_I18N::translate('Lifespans'), help_link('lifespan_chart'), '
'; //This is the box that adds one person at a time. Not sure if we want to keep this functionality. if (!isset($col)) $col = 0; echo '
', WT_I18N::translate('Add another person to the chart'), '
', print_findindi_link('newpid'), '
', WT_I18N::translate('Include the person\'s immediate family?'), '

'; if (count($controller->pids)<11) { echo '
', WT_I18N::translate('Show timeline'), '

'; } echo '
', WT_I18N::translate('Speed'), ' ', WT_I18N::translate('Begin Year'), ' ', WT_I18N::translate('End Year'), ' ', WT_Gedcom_Tag::getLabel('PLAC'), '
'; $people = count($controller->people); echo '
', WT_I18N::plural('%d Individual', '%d Individuals', $people, $people), '
'; $controller->PrintTimeline($controller->timelineMinYear,$controller->timelineMaxYear); echo '
'; $maxY = $controller->fillTL($controller->people,$controller->minYear,$controller->YrowLoc); echo '
   
'; // Sets the boundaries for how far the timeline can move in the up direction $controller->addInlineJavascript('var maxY = 80-' . $maxY . ';'); // Sets the boundaries for how far the timeline can move in the left direction $controller->addInlineJavascript('var maxX = ' . (isset($maxX)?$maxX:0) . ';');