<!doctype html>
<html>
<head>
<title>Moving Google Chart Linear Trendline Findings Noter or Poll</title>
<script type='text/javascript'>
var num=1;

function next(newrow) {
var sdata="";
for (var ii=1; ii<=num; ii++) {
sdata+=",%20[" + document.getElementById('leftv' + ii).value + "," + document.getElementById('rightv' + ii).value + "]%20";
}
document.getElementById('data').value=sdata;
num++;
var wasn=document.getElementById('tdnumber').innerHTML;
//document.getElementById('myform').action += "&data=" + sdata;
//alert(document.getElementById('myform').action + " ... " + sdata);
document.getElementById('myform').submit();
if (newrow != 0) {
document.getElementById('tdnumber').innerHTML=num + "  ";
document.getElementById('ldiv' + num).innerHTML="<br><div id='ldiv" + eval(1 + num) + "'></div><input id='leftv" + num + "' value='0.0000' type='number' step='0.0001'></input>";
document.getElementById('rdiv' + num).innerHTML="<br><div id='rdiv" + eval(1 + num) + "'></div><input id='rightv" + num + "' value='0.0000' type='number' step='0.0001'></input>";
eval("document.getElementById('leftv" + num + "').focus();");
}
}

function fixget() {
var predotphp=document.getElementById('myform').action.split(".php");
document.getElementById('myform').action=predotphp[0] + ".php?title=" + encodeURIComponent(document.getElementById('title').value) + '&options=' + encodeURIComponent(document.getElementById('options').value) + '&onclick=y&task=' + encodeURIComponent(document.getElementById('left').value) + '&desc=' + encodeURIComponent(document.getElementById('right').value);
document.getElementById('myform').submit();
//alert(document.getElementById('myform').action);
}
</script>
</head>
<body style='background-color: yellow;' onload=" setTimeout(fixget,3400); document.getElementById('leftv1').focus();">
<h1 style='color:yellow; background-color: violet;' align='center'><input id='title' style='width: 350px;' type='text' value='Age of sugar maples vs. trunk diameter, in inches'></input><br></h1>
<h4 style='color:yellow; background-color: violet;' align='center'>RJM Programming, November, 2015<br></h1>
<div align='center'>
<table>
<tr><th>Point # of<br><select onchange='fixget();' name='options' id='options'><option value=''>Line</option><option value="type:'exponential',">Exponential</option><option value="type:'polynomial',degree:2,">Polynomial (degree 2)</option><option value="type:'polynomial',degree:3,">Polynomial (degree 3)</option><option value="type:'polynomial',degree:4,">Polynomial (degree 4)</option><option value="type:'polynomial',degree:5,">Polynomial (degree 5)</option></select></th><th><input id='left' type='text' value='Diameter'></input><br><br><input onfocus='fixget();' id='bfinish' type='button' onclick='next(0);' value='Finish' style='border:3px solid black;'></input></th><th><input id='right' type='text' value='Age'></input><br><br><input onfocus='fixget();' id='bnext' type='button' onclick='next(1);' value='Next Value Pair' style='border:3px solid violet;'></input></th><th>Trendline</th></tr>
<tr><td id='tdnumber' align='right' style='align:top;background-color: violet;'>1  </td><td id='tdleft' style='align:top;background-color: violet;'>
<div id='ldiv2'></div><input onblur='fixget();' style='align:top;' id='leftv1' value='0.0000' type='number' step='0.0001'></input>
</td><td id='tdright' style='align:top;background-color: violet;'>
<div id='rdiv2'></div><input onblur='fixget();' style='align:top;' id='rightv1' value='0.0000' type='number' step='0.0001'></input>
</td>
<td>
<iframe name='myiframe' id='myiframe' style='width:950px;height:800px;' src='http://www.rjmprogramming.com.au/PHP/LinearTrendline/linear_trendline.php?title=Age%20of%20sugar%20maples%20vs.%20trunk%20diameter,%20in%20inches&onclick=y&task=Diameter&desc=Age&data=,%20[0,0]'></iframe>
<form target='myiframe' id='myform' action='../PHP/LinearTrendline/linear_trendline.php' method='POST' style='display:none;'>
<input type='hidden' name='data' id='data' value=',%20[0.0000,0.0000]%20'></input>
<input type='submit' id='fsubmit' value='Submit'></input>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>