/*
dhtmlxScheduler v.2.3
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
to use it in not GPL project. Please contact sales@dhtmlx.com for details
(c) DHTMLX Ltd.
*/
scheduler.toPDF=function(C,J,P,L){var I=0;var H=0;var F=false;if(J=="fullcolor"){F=true;J="color"}J=J||"color";function M(T){T=parseFloat(T);if(isNaN(T)){return"auto"}return 100*T/I}function Q(T){T=parseFloat(T);if(isNaN(T)){return"auto"}return 100*T/H}function O(U){var T="";for(var V=0;V"}I=U[0].offsetWidth;return T}function G(V,W){var T=parseInt(V.style.left);for(var U=0;UV){return T}}return W}function A(W){var U="";var X=W.firstChild.rows;for(var V=0;V";H=W.firstChild.rows[0].cells[0].offsetHeight}return U}function S(X){var U="";U+="";if(scheduler._mode=="agenda"){var T=scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;U+=""+T[0].innerHTML+""+T[1].innerHTML+""}else{if(scheduler._mode=="year"){var T=scheduler._els.dhx_cal_data[0].childNodes;for(var V=0;V";U+=O(T[V].childNodes[1].childNodes);U+=A(T[V].childNodes[2]);U+=""}}else{U+="";var T=scheduler._els.dhx_cal_header[0].childNodes;U+=O(T);U+="";var W=scheduler._els.dhx_cal_data[0];if(W.firstChild.tagName=="TABLE"){U+=A(W)}else{W=W.childNodes[W.childNodes.length-1];while(W.className.indexOf("dhx_scale_holder")==-1){W=W.previousSibling}W=W.childNodes;U+="";for(var V=0;V"}U+="";H=W[0].offsetHeight}}}U+="";return U}function E(U,T){return(window.getComputedStyle?(window.getComputedStyle(U,null)[T]):(U.currentStyle?U.currentStyle[T]:null))||""}function B(){var b="";var j=scheduler._rendered;if(scheduler._mode=="agenda"){for(var Z=0;Z"+j[Z].childNodes[0].innerHTML+""+j[Z].childNodes[2].innerHTML+""}}else{if(scheduler._mode=="year"){var j=scheduler.get_visible_events();for(var Z=0;Z";scheduler._mark_year_date(f);f=scheduler.date.add(f,1,"day");if(f.valueOf()>=scheduler._max_date.valueOf()){break}}}}else{for(var Z=0;Z";if(Y=="event"){b+="";var W=F?E(j[Z].childNodes[2],"color"):"";var h=F?E(j[Z].childNodes[2],"backgroundColor"):"";b+=""}else{var W=F?E(j[Z],"color"):"";var h=F?E(j[Z],"backgroundColor"):"";b+=""}b+=""}}}return b}function K(){var T="";return T}var D=(new Date()).valueOf();var R=document.createElement("div");R.style.display="none";document.body.appendChild(R);R.innerHTML='';document.getElementById(D).firstChild.value=S(J).replace("\u2013","-")+B()+K();document.getElementById(D).submit();R.parentNode.removeChild(R);grid=null};