function sep(d){ans={};var ar=d.split('\\t');var l=ar.length;for(var i=0;i<l;i++){vare=ar[i].indexOf('=');ans[ar[i].substr(0,e)]=ar[i].substr(e+1)};returnans}
function dfmt(c,e){var d=new Date(e*1000);var DD,HH,MM;if(c['utc']){DD=d.getUTCDate();HH=d.getUTCHours();MM=d.getUTCMinutes()}else{DD=d.getDate();HH=d.getHours();MM=d.getMinutes()}var ans=''+DD+'/';if(HH<10){ans+='0'}ans+=''+HH+':';if(MM<10){ans+='0'}ans+=''+MM;returnans}
function gcn(n){var ans='',d=document.cookie;if(d){var c0=d.indexOf(n+'='),cs=d.indexOf(' '+n+'=');if(c0==0||cs>0){if(cs>0){c0=cs+1}var c=d.substr(c0).split(';',1);var e=c[0].indexOf('=');if(e>0){ans=c[0].substr(e+1)}}}return ans}
function scnv(n,v){var d = new Date();d.setTime(d.getTime()+(864*Math.pow(10,8)));document.cookie=n+'='+v+'; expires='+d.toUTCString()+'; path=/'}
function scnv(n,v){var d=new Date();d.setTime(d.getTime()+(864*Math.pow(10,8)));document.cookie=n+'='+v+'; expires='+d.toUTCString()+'; path=/'}
function ccb(c,n){var e=document.getElementById(n);c[n]=(e&&e.checked)}
function gch(z,zm){if(z<0.5){return0.5}if(z>(zm-0.5)){return(zm-0.5)}return z}
function gchx(c,x){return gch(x*c['xm']+c['xo'],c['ctx'].canvas.width)}
@ -69,7 +78,7 @@ function gfl(c){c['ctx'].fill()}
function gst(c){c['ctx'].stroke()}
function gfi(c){gle(c);gst(c)}
function gbd(c){gbe(c,0,0);gln(c,1,0);gln(c,1,1);gln(c,0,1);gle(c);gfl(c);gst(c)}
function ggr(c,xs,ys,yt,xn,x0,x1,y0,y1,ar,nx,vx,vy,av){
function ggr(c,xs,ys,yt,xn,x0,x1,y0,y1,ar,nx,vx,vy,av,w,cols){
gtso(c,xs,ys);
gss(c,'black');glw(c,1.5);
gbe(c,0,1);gln(c,0,0);gln(c,1,0);gst(c);
@ -78,7 +87,6 @@ var hi=c['ctx'].measureText('M').width, wi=c['ctx'].measureText('1').width;
function tip(i,n){var e=document.getElementById(i);if(e){if(e.style.visibility=='visible'){untip(e)}else{e.style.visibility='visible';e.style.opacity=0.95;e.tmo=setTimeout(function(){untip(e)},n)}}}
function dodrw(data,cbx){if(hasCan()){gdrw(c,sep(data),cbx)}}
function gact(t){if(t.checked){scnv(t.id,1)}else{scnv(t.id,0)}godrw(0)}";
function gact(t){if(t.checked){scnv(t.id,1)}else{scnv(t.id,0)}godrw(0)}
function wch(){var w='';for(var i=1;i<=$nc;i++){var e=document.getElementById('worker'+i);if(e&&e.value&&e.value.trim()){if(i>1){w+=','}w+=e.value.trim()}}if(w){scnv('workers',w)}}";
return $g;
}
#
function dousperf($data, $user)
{
$ans = getShiftData($user);
global $fld_sep, $val_sep;
// This also defines how many worker fields there are