$(function(){ $("input.datepicker").datepicker( { dateFormat : 'dd-M-yy' , closeText : 'X' , clearText : '' , showOn : 'button' , buttonImage : '/i/asfdcldr.gif' , buttonImageOnly : true , changeMonth: true , changeYear: true }); $("input.htmldbDate").datepicker( { dateFormat : 'dd-M-yy' , closeText : 'X' , clearText : '' , showOn : 'button' , buttonImage : '/i/asfdcldr.gif' , buttonImageOnly : true , changeMonth: true , changeYear: true }); $(".htmldbDrill").click(function(e) { try { u=this; el=html_CascadeUpTill(u,"TD"); htmlDrillDown(u,el.firstChild); } catch(e) { alert(e.description); } return false; }); htmlDrillDown = function(u,e) { var nh=0; if (e) { el=e; } else { el=event.srcElement; } el=html_CascadeUpTill(el,"TD"); currRow=html_CascadeUpTill(el,"TR"); et=html_CascadeUpTill(el,"TABLE"); if (currRow.drillRow) { $(currRow.drillRow).find("*").andSelf().remove(); $(currRow.drillCell).find("*").andSelf().remove(); currRow.drillRow=""; currRow.drillCell=""; } nw=currRow.offsetWidth; rn=currRow.rowIndex; /* add new empty cell to parent row */ var nNewEmptyCell = document.createElement("td"); currRow.appendChild( nNewEmptyCell ); nNewEmptyCell.style.backgroundColor="ffffff"; nNewEmptyCell.style.border=""; currRow.drillCell=nNewEmptyCell; /* end add new empty cell to parent row */ cc=currRow.cells.length; var nNewRow = document.createElement("tr"); var nNewCell = document.createElement("td"); nNewRow.style.backgroundColor="ffffff"; nNewCell.style.backgroundColor="ffffff"; nNewCell.style.border=""; $(nNewRow).insertAfter(currRow); nNewRow.appendChild( nNewCell ); currRow.drillRow=nNewRow; nNewCell.prow = nNewRow; nNewCell.colSpan = cc; nNewCell.style.borderBottom="2px groove gray"; shtml=""; shtml=shtml+"
"; shtml=shtml+"
"; $(nNewCell).html(shtml); loadingDiv=document.getElementById("loadingDiv"+rn); loadingDiv.pRow=currRow; $("#loadingDiv"+rn).click(function(el) { try { currRow=this.pRow $(currRow.drillRow).find("*").andSelf().remove(); $(currRow.drillCell).find("*").andSelf().remove(); currRow.drillRow=""; currRow.drillCell=""; } catch (e) { } return false; }); } htmldbSizeIframe = function(o,rid,frm) { var nh=parseInt(o.style.height); var nw=parseInt(o.style.width); ch=nh; cw=nw; try { if ($.browser.msie) { nh=o.contentWindow.document.body.scrollHeight+17; nw=o.contentWindow.document.body.scrollWidth+17; } else { nh=o.contentWindow.document.body.scrollHeight; nw=o.contentWindow.document.body.scrollWidth; } if (frm=="onload") { $(o).animate({ height:nh, width:nw },200); } else { o.style.height = nh; o.style.width = nw; } $("#loadingImg"+rn).remove(); $("#loadingDiv"+rn).html("<< Collapse"); } catch(e) { window.status=e.description; } } htmldbsubcollapse = function (ep,rid) { ep.previousSibling.expanded="N"; ep.removeNode(true); } });