var edit = false; function setCursor(obj){ obj.style.cursor='pointer'; } function cal_click(element){ if (edit){ var sel = '#8beaa8'; var unSel = ''; var divColor = ''; var color = ''; if (key == 17) { if(element.tagName == 'TD'){ // All days in month var dw = element.childNodes[0].data.toUpperCase(); var cssParm = "[row]"; element = cssQuery(cssParm); divColor = element[0].style.backgroundColor; }else if (element.getAttribute("row") != null) { // All days in selected week var cssParm = "[row = '" + element.getAttribute("row") + "']"; divColor= element.style.backgroundColor; element = cssQuery(cssParm); } else if (element.getAttribute("uid") != null){ // All of selected event var cssParm = "[uid = '" + element.getAttribute("uid") + "']"; divColor= element.style.backgroundColor; element = cssQuery(cssParm); } } else if(element.tagName == 'TD'){ // Select all of selected day var dw = element.childNodes[0].data.toUpperCase(); var cssParm = "[id = '" + dw + "'] [row]"; element = cssQuery(cssParm); divColor = element[0].style.backgroundColor; } else { //Select only one object divColor = element.style.backgroundColor; color = (divColor == unSel)?sel:unSel; setColor(element, color); } color = (divColor == unSel)?sel:unSel; if (element.length != null){ //selectAll for (var i = 0; i < element.length; i++){ setColor(element[i], color); } } } } function setColor(obj, color){ obj.style.backgroundColor = color; } function ld_mon(yr,mon){ /* Get('calTbl').style.cursor='wait'; Get('MonthCal').style.cursor='wait'; */ call_cal(yr[yr.selectedIndex].text,mon[mon.selectedIndex].value); } function prvnxt(btn){ var m = get("M"); var y = get("Y"); if ((m.selectedIndex == 0) && (btn=="prev")) { m = m[11].value; y = y[y.selectedIndex -1].text; } else if ((m.selectedIndex == 11) && (btn=="next")) { m=m[0].value; y=y[y.selectedIndex +1].text; } else if (btn=="prev") { m=m[m.selectedIndex-1].value; y=y[y.selectedIndex].text; } else if (btn=="next") { m=m[m.selectedIndex+1].value; y=y[y.selectedIndex].text; } call_cal(parseInt(y),parseInt(m)); return false; } function setScroll(amt){ document.body.scrollTop = amt; } function getDtl(obj){ if (edit){ cal_click(obj); } else{ //* var f = Get("f"); f.evtid.value= obj.id; f.action = obj.href; f.submit(); //*/ } } function getMore(lnk){ f.evtid.value=lnk.id; f.action = lnk.href; f.submit(); } function get(str){ return document.getElementById(str); } function getN(str){ return document.getElementsByName(str); } function Get(name){ var Elements = document.getElementsByName(name); if ((Elements != null) && (Elements.length >1)){ return Elements; }else{ return document.getElementById(name); } } function scrollMe() { var f = Get("f"); f.scroll.value=document.body.scrollTop; } function Load() { setScroll(0); Get('calTbl').style.cursor='default'; Get('MonthCal').style.cursor='default'; }