/*
Copyright (C) 2011 BlueGolf, LLC. All Rights Reserved
*/
function Util(){}Util.isIE=(navigator.appName=="Microsoft Internet Explorer");
Util.chainHandler=function(d,a,c){if(!c){c=a;a=d;d=window;}if(!c){c=a;a="onload";
}if(window.jQuery&&d===window&&a==="onload"){jQuery(document).ready(c);}else{if(d[a]){var b=d[a];
d[a]=function(){c();b();};}else{d[a]=c;}}};Util.colorBrightness=function(g){var b=1;
var f=String(g);if((/#[0-9a-fA-F]{6}/).test(f)){var e=parseInt(f.substring(1,3),16);
var d=parseInt(f.substring(3,5),16);var a=parseInt(f.substring(5,7),16);b=((0.2*e)+(0.7*d)+(0.1*a))/255;
}else{if((/#[0-9a-fA-F]{3}/).test(f)){var e=parseInt(f.substring(1,2),16);var d=parseInt(f.substring(2,3),16);
var a=parseInt(f.substring(3,4),16);b=((0.2*e)+(0.7*d)+(0.1*a))/15;}}return b;};Util.date2iso=function(f){var a=undefined;
if(f&&f.getFullYear){var c=String(10000+f.getFullYear());c=c.substr(c.length-4);var e=String(101+f.getMonth());
e=e.substr(e.length-2);var b=String(100+f.getDate());b=b.substr(b.length-2);a=c+e+b;
}return a;};Util.getWindowHeight=function(){return(Util.isIE?document.documentElement.offsetHeight:innerHeight);
};Util.getWindowWidth=function(){return(Util.isIE?document.documentElement.offsetWidth:innerWidth);
};Util.iso2date=function(b){var a=undefined;b=String(b);if(b.length==8){a=new Date(b.substr(0,4),b.substr(4,2)-1,b.substr(6,2));
}else{if(b.length==15){a=new Date(b.substr(0,4),b.substr(4,2)-1,b.substr(6,2),b.substr(9,2),b.substr(11,2),b.substr(13,2));
}}return a;};Util.isPointInElement=function(d,a,i){var h=0;var g=0;var f=d;while(f!=null){h+=f.offsetLeft;
g+=f.offsetTop;f=f.offsetParent;}var c=h+d.offsetWidth;var b=g+d.offsetHeight;return(a>=h&&a<=c&&i>=g&&i<=b);
};Util.position=function(f,h,l,j){if(f.className.indexOf('tooltip') != -1){f.style.display="";var g=f.offsetHeight;
var k=f.offsetWidth;f.style.display="none";}var i=document.getElementById("alldiv");
var d=i.offsetWidth;var a=Math.max(i.offsetHeight,Util.getWindowHeight());while(i!=null){d+=i.offsetLeft;
a+=i.offsetTop;i=i.offsetParent;}var c=l?l:0;var b=j?j:0;i=h;while(i!=null){c+=i.offsetLeft;
b+=i.offsetTop;i=i.offsetParent;}i=f.offsetParent;while(i!=null){c-=i.offsetLeft;
b-=i.offsetTop;i=i.offsetParent;}if(c+k>d){c=d-k;}if(c<0){c=0;}if(b>a-g){if(c+h.offsetWidth+k<=d){b=a-g;
c=c+h.offsetWidth;}else{b=b-h.offsetHeight-g;}}if(b<0){b=0;}f.style.position="absolute";
f.style.left=c+"px";f.style.top=b+"px";};Util.removeHandlers=function(d){var a=d.childNodes;
for(var c=0;a&&c<a.length;c++){Util.removeHandlers(a[c]);}a=d.attributes;for(c=0;
a&&c<a.length;c++){var b=a[c].name;if(typeof a[b]==="function"){d[b]=null;}}};Util.returnFalse=function(){return false;
};function Haze(){this.div=document.getElementById("haze");}Haze.prototype.hide=function(){this.div.style.display="none";
};Haze.prototype.show=function(){var a=document.getElementById("alldiv");this.div.style.top="0px";
this.div.style.left="0px";this.div.style.width=(Util.isIE?document.documentElement.offsetWidth:innerWidth)+"px";
this.div.style.height=Math.max(a.offsetHeight,Util.isIE?document.documentElement.offsetHeight:innerHeight)+"px";
this.div.style.display="";};
