

/***********************************************************************************/
/* Image RollOver Function                                                         */
/***********************************************************************************/
function imgOver(obj,img) {
  var chgObj = obj.src;
  var chgImg = (img != null && img != 'undefined')?img:chgObj.substring(0,chgObj.lastIndexOf("/")+1)+chgObj.substring(chgObj.lastIndexOf("/")+1,chgObj.lastIndexOf(".")-1)+"on.gif";
  obj.src = chgImg;
}

/***********************************************************************************/
/* Image RollOut Function                                                          */
/***********************************************************************************/
function imgOut(obj,img) {
  var chgObj = obj.src;
  var chgImg = (img != null && img != 'undefined')?img:chgObj.substring(0,chgObj.lastIndexOf("/")+1)+chgObj.substring(chgObj.lastIndexOf("/")+1,chgObj.lastIndexOf(".")-1)+"off.gif";
  obj.src = chgImg;
}


/***********************************************************************************/
/* Table Cell RollOver Function                                                          */
/***********************************************************************************/
function tdOver(obj,cColor) {
  var chgColor = (cColor != null && cColor != 'undefined')?cColor:"#f6f6f6";
  obj.style.backgroundColor = chgColor;
}

/***********************************************************************************/
/* Table Cell RollOut Function                                                          */
/***********************************************************************************/
function tdOut(obj,cColor) {
  var chgColor = (cColor != null && cColor != 'undefined')?cColor:"#ffffff";
  obj.style.backgroundColor = chgColor;
}

/***********************************************************************************/
/* Layer RollOver Function                                                          */
/***********************************************************************************/
function divOver(idx) {
  document.getElementById(idx).style.display = "block";
}

/***********************************************************************************/
/* Layer RollOut Function                                                          */
/***********************************************************************************/
function divOut(idx) {
  document.getElementById(idx).style.display = "none";
}


/***********************************************************************************/
/* Popup Common Function                                                           */
/***********************************************************************************/
function popWin(gURL,pName,w,h,t,px,py) {
  var opt = "width=" + w + ",height=" + h;
  var pTop = (screen.availHeight - h) / 3;
  var pLeft = (screen.availWidth - w) / 2;

  if (px != null && py != null) {
    opt += ",top=" + px + ",left=" + py;
  } else {
    opt += ",top=" + pTop + ",left=" + pLeft;
  }

  switch (t) {
    case 1 :
      opt += ",scrollbars=yes";
      break;
    default :
      opt += ",scrollbars=no";
  }
  var pop = window.open(gURL,pName,opt);
  pop.focus();
}
