document.write('<script src="js/config.js"></script>');

document.write('<link rel="stylesheet" type="text/css" href="./style/main.css"/>');

document.write('<script src="dwr/util.js"></script>');	
document.write('<script src="dwr/engine.js"></script>');	

document.write('<script src="dwr/interface/users.js"></script>');
document.write('<script src="dwr/interface/systemUsers.js"></script>');
document.write('<script src="dwr/interface/projectUsers.js"></script>');
document.write('<script src="dwr/interface/userGroup.js"></script>');
document.write('<script src="dwr/interface/systemUserView.js"></script>');
document.write('<script src="dwr/interface/projects.js"></script>');
document.write('<script src="dwr/interface/projectUsersView.js"></script>');

document.write('<script src="js/jquery-1.2.6.min.js"></script>');
document.write('<script src="js/jq.select.js"></script>');
document.write('<script src="js/jquery.cookie.js"></script>');

document.write('<script src="js/pojo.js"></script>');
document.write('<script src="js/regex.js"></script>');
document.write('<script src="js/util.js"></script>');



var ui = {};

	// s = 2008-1-1 or 2-29-2008
	Date.doparse = function(s){		
		t = s.toString().match(/\d+|\d+|\d+|\d+|[^\d]+/g);	

		y = t[0];	m = t[2];	d = t[4];
		
		if( y > 1000 ){
			s = ( m + "/" + d + "/" + y );
		}

		return new Date( Date.parse( s ) );
	};


  Date.prototype.format   =   function(format)   
  {   
      var   o   =   {   
          "M+"   :   this.getMonth()+1,   //month   
          "d+"   :   this.getDate(),         //day   
          "h+"   :   this.getHours(),       //hour   
          "m+"   :   this.getMinutes(),   //minute   
          "s+"   :   this.getSeconds(),   //second   
          "q+"   :   Math.floor((this.getMonth()+3)/3),     //quarter   
          "S"   :   this.getMilliseconds()   //millisecond   
      }   
      if(/(y+)/.test(format))   format=format.replace(RegExp.$1,   
          (this.getFullYear()+"").substr(4   -   RegExp.$1.length));   
      for(var   k   in   o)if(new   RegExp("("+   k   +")").test(format))   
          format   =   format.replace(RegExp.$1,   
              RegExp.$1.length==1   ?   o[k]   :     
                  ("00"+   o[k]).substr((""+   o[k]).length));   
      return   format;   
  };   
  
  Date.prototype.toString = function(){
  	return this.format("yyyy-MM-dd");
  };
  
