// Javascript for printing OpenSprinkler option page // Firmware v1.8 // All content is published under: // Creative Commons Attribution ShareAlike 3.0 License // Sep 2012, Rayshobby.net function w(s) {document.writeln(s);} function imgstr(s) {return " ";} function submit_form(f) { // process time zone value var th=parseInt(f.elements["th"].value,10); var tq=parseInt(f.elements["tq"].value,10); tq=(tq/15>>0)/4.0; th=th+(th>=0?tq:-tq); // huge hack, needs to find a more elegant way f.elements["otz"].value=((th+12)*4)>>0; f.elements["ohtp"].value=(f.elements["htp"].value)&0xff; f.elements["ohtp2"].value=(f.elements["htp"].value>>8)&0xff; //f.elements["omas"].value=f.elements["mas"].value; f.submit(); } function fcancel() {window.location="/";} function ftoggle() { var oid,tip; var state=document.getElementById("tip0").style.display=="none"; for(oid=0;oid"); w("Set Options:
(Hover on each option to see tooltip)"); w("

"); w(""); // print html form w("
"); var oid,label,isbool,value,name,ipasvalue=0; for(oid=0;oid"+label+": 0?"checked":"")+" name=o"+name+">"); } else if (datatype == "string") { w("

"+label+": "); } else { switch (name) { case "tz": w(""); tz=value-48; w("

"+label+": GMT>0)+" name=th>"); w(":"); break; case "mas": //w(""); w("

"+label+": "); break; case "htp": w(""); var port=value+(opts[(oid+1)][2]<<8); w("

"+label+": "); break; case "nbrd": w("

"+label+": "); break; default: w("

"+label+": "); } } //w("

"); w(" "+tooltip+"

"); } w("

Password:

"); w(""); w(""); w("

Change password:  Confirm: 

"); w("");