// Swap images function swap(what) { if (what.src.indexOf("_on")==-1) { var onStatus = ""; var regex = /_off/g; onStatus = what.src.replace(regex,"_on"); } else { var onStatus = ""; var regex = /_on/g; onStatus = what.src.replace(regex,"_off"); } what.src = onStatus; } function highLight(t) { var lastNr = new String(t.id).charAt(3); var firstNrs = new String(t.id).slice(0, 3); t.className="blue"; for(i=lastNr - 1; i>-1; i--) { eval('document.getElementById("' + firstNrs + i + '").className="yellow"'); } var secondthirdNr = new String(t.id).slice(1, 3); firstNrs = new String(t.id).slice(0, 1); for(i=secondthirdNr -1; i>=0; i--) { if (i<10) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="yellow"'); } else { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="yellow"'); } } for(i=Number(secondthirdNr) +1; i<=30; i++) { if (i<10) { if (document.getElementById(firstNrs + "0" + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="yellow"'); } } else { if (document.getElementById(firstNrs + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="yellow"'); } } } } function dim(t) { var lastNr = new String(t.id).charAt(3); var firstNrs = new String(t.id).slice(0, 3); t.className="void"; for(i=lastNr - 1; i>-1; i--) { eval('document.getElementById("' + firstNrs + i + '").className="void"'); } var secondthirdNr = new String(t.id).slice(1, 3);//new String(t.id).charAt(2); firstNrs = new String(t.id).slice(0, 1); for(i=secondthirdNr -1; i>=0; i--) { if (i<10) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="void"'); } else { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="void"'); } } for(i=Number(secondthirdNr) +1; i<=40; i++) { if (i<10) { if (document.getElementById(firstNrs + "0" + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="void"'); } } else { if (document.getElementById(firstNrs + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="void"'); } } } } function highLight2(t) { var lastNr = new String(t.id).slice(3); var firstNrs = new String(t.id).slice(0, 3); t.className="blue"; for(i=lastNr - 1; i>-1; i--) { if(i < 10) { eval('document.getElementById("' + firstNrs +'0'+ i + '").className="yellow"'); } else { eval('document.getElementById("' + firstNrs + i + '").className="yellow"'); } } var secondthirdNr = new String(t.id).slice(1, 3); firstNrs = new String(t.id).slice(0, 1); for(i=secondthirdNr -1; i>=0; i--) { if (i<10) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="yellow"'); } else { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="yellow"'); } } for(i=Number(secondthirdNr) +1; i<=30; i++) { if (i<10) { if (document.getElementById(firstNrs + "0" + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="yellow"'); } } else { if (document.getElementById(firstNrs + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="yellow"'); } } } } function dim2(t) { var lastNr = new String(t.id).slice(3); var firstNrs = new String(t.id).slice(0, 3); t.className="void"; for(i=lastNr - 1; i>-1; i--) { if(i < 10) { eval('document.getElementById("' + firstNrs +'0'+ i + '").className="void"'); } else { eval('document.getElementById("' + firstNrs + i + '").className="void"'); } } var secondthirdNr = new String(t.id).slice(1, 3); firstNrs = new String(t.id).slice(0, 1); for(i=secondthirdNr -1; i>=0; i--) { if (i<10) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="void"'); } else { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="void"'); } } for(i=Number(secondthirdNr) +1; i<=40; i++) { if (i<10) { if (document.getElementById(firstNrs + "0" + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + "0" + i + lastNr + '").className="void"'); } } else { if (document.getElementById(firstNrs + i + lastNr) != null) { eval('document.getElementById("' + firstNrs + i + lastNr + '").className="void"'); } } } }