-var asta_xarr = new Array(0,66,132);
-
-/* TODO: impostare gli onclick */
-function dispose_asta(idx, pnt, nopoint)
-{
- var i, btn, pass;
- var btn;
-
- for (i = 0 ; i < 10 ; i++) {
- btn = $("asta"+i);
- if (i < idx) {
- btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
- btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
- pass = -1;
- }
- else {
- btn.src = "img/asta"+i+(pnt >= 0 ? "" : "_ro")+".png";
- btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
- pass = i;
- }
- if (i < 19)
- btn.style.left = asta_xarr[i % 3];
- else
- btn.style.left = asta_xarr[(i+1) % 3];
-
- btn.style.top = parseInt(i / 3) * 50 + (i == 9 ? 0 : 1);
-
- if (pnt >= 0) {
- eval("btn.onclick = function () { act_asta("+pass+",61); }");
- btn.style.cursor = "pointer";
- }
- else {
- btn.onclick = null;
- btn.style.cursor = "default";
- }
- }
-
-
- btn = $("astaptdiv");
- btn.style.left = asta_xarr[i % 3];
- btn.style.top = parseInt(i / 3) * 50 - 2;
- // btn.style.visibility = "visible";
-
- btn = $("astapt");
- var rpnt = (pnt < 0 ? -pnt : pnt);
- btn.value = (rpnt < 61 ? 61 : (rpnt > 120 ? 120 : rpnt));
-
- btn = $("astaptsub");
- btn.style.left = asta_xarr[i % 3];
- btn.style.top = 25 + parseInt(i / 3) * 50 - 1;
- btn.src = "img/astaptsub"+(pnt >= 0 ? "" : "_ro")+".png";
- btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
- if (pnt >= 0) {
- btn.onclick = function () { act_asta(9,$("astapt").value); };
- btn.style.cursor = "pointer";
- }
- else {
- btn.onclick = null;
- btn.style.cursor = "default";
- }
-
- i+=1;
- if (nopoint) {
- btn = $("astapasso");
- btn.style.left = asta_xarr[i % 3];
- btn.style.top = parseInt(i / 3) * 50;
- btn.src = "img/astapashalf"+(pnt >= 0 ? "" : "_ro")+".png";
- btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
- if (pnt >= 0) {
- btn.onclick = function () { act_asta(-1,0); };
- }
- else {
- btn.onclick = null;
- }
-
- btn = $("astalascio");
- btn.style.left = asta_xarr[i % 3];
- btn.style.top = parseInt(i / 3) * 50 + 24;
- btn.src = "img/astalascio.png";
- btn.style.visibility = "visible";
- btn.onclick = function () { safelascio(); };
- }
- else {
- btn = $("astapasso");
- btn.style.left = asta_xarr[i % 3];
- btn.style.top = parseInt(i / 3) * 50;;
- btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
- btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
- if (pnt >= 0) {
- btn.onclick = function () { act_asta(-1,0); };
- }
- else {
- btn.onclick = null;
- }
-
- btn = $("astalascio");
- btn.style.visibility = "hidden";
- btn.onclick = null;
- }
- // btn.style.visibility = "visible";
- $("asta").style.visibility = "visible";
-}
-
-function asta_pnt_set(pnt)
-{
- btn = $("astapt");
- var rpnt = (pnt < 0 ? -pnt : pnt);
- btn.value = (rpnt < 61 ? 61 : (rpnt > 120 ? 120 : rpnt));
-}