 function isEmpty(str){
  str = this != window? this : str;
  str = str.replace(/^\s+/g, '').replace(/\s+$/g, '');
  if(str.length == 0){
      return true;
  } else {
      return false;
  }
}

function pauseScript(millis){
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < millis);
}

