//-----------------------------------------------------------
// common/commontapjs.js
//-----------------------------------------------------------

function changeImage ( imgObjId, newSrc ) {
  var imgObj = document.getElementById(imgObjId);
  if ( imgObj ) {
  	imgObj.src = newSrc;
  }
}

function isEmpty ( x ) {
  if ( x.length == 0 ) {
    return true;
  } else {
    return false;
  }
}

function phoneNumberFormat(value) {
  var temp = value.toString();
  return "(" + temp.slice(0,3) + ") " + temp.slice(3,6) + "-" + temp.slice(6, temp.length);
}

/* set CSS values */
function setBgColor(thisObj, color) {
	thisObj.style.background=color;
}

