////////////////////////////////////////////////////////////////////
// methods for changing the clipping of a layer
// Justin Gallagher
// 1/20/99
// These functions are useful for altering the clipping of 
// a layer in order to make it appear animated
////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
// setClipLeft
// description: set the left clipping value of a layer to a value given by a param.
// params: the layer to change, and the value to set the clip to
// return: nothing...unless strange browser
// cross browser compatible

function setClipLeft(layer, value) {

  if (isMinNS4)
    layer.clip.left = value;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[3] = value;
  }
  return(-1);
} //end setClipLeft

////////////////////////////////////////////////////////////////////
// setClipRight
// description: set the right clipping value of a layer to a value given by a param.
// params: the layer to change, and the value to set the clip to
// return: nothing...unless strange browser
// cross browser compatible

function setClipRight(layer, value) {

  if (isMinNS4)
    layer.clip.right = value;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[1] = value;
  }
  return(-1);
} //end setClipRight

////////////////////////////////////////////////////////////////////
// setClipTop
// description: set the top clipping value of a layer to a value given by a param.
// params: the layer to change, and the value to set the clip to
// return: nothing...unless strange browser
// cross browser compatible

function setClipTop(layer, value) {

  if (isMinNS4)
    layer.clip.top = value;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[0] = value;
  }
  return(-1);
} //end setClipTop

////////////////////////////////////////////////////////////////////
// setClipBottom
// description: set the left clipping value of a layer to a value given by a param.
// params: the layer to change, and the value to set the clip to
// return: nothing...unless strange browser
// cross browser compatible

function setClipBottom(layer, value) {

  if (isMinNS4)
    layer.clip.bottom = value;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[2] = value;
  }
  return(-1);
} //end setClipBottom

////////////////////////////////////////////////////////////////////
// incClipLeft
// description: increments the left clipping value of a layer by the 
// value given by a param.
// params: the layer to change, and the value to increment the clip by
// return: nothing...unless strange browser
// cross browser compatible

function incClipLeft(layer, inc) {

  if (isMinNS4)
    layer.clip.left += inc;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[3] += inc;
  }
  return(-1);
} //end incClipLeft

////////////////////////////////////////////////////////////////////
// incClipRight
// description: increments the right clipping value of a layer by the 
// value given by a parameter.
// params: the layer to change, and the value to increment the clip by
// return: nothing...unless strange browser
// cross browser compatible

function incClipRight(layer, inc) {

  if (isMinNS4)
    layer.clip.right += inc;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[1] += inc;
  }
  return(-1);
} //end incClipRight

////////////////////////////////////////////////////////////////////
// incClipTop
// description: increments the top clipping value of a layer by the 
// value given by a param.
// params: the layer to change, and the value to increment the clip by
// return: nothing...unless strange browser
// cross browser compatible

function incClipTop(layer, inc) {

  if (isMinNS4)
    layer.clip.top += inc;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[0] += inc;
  }
  return(-1);
} //end incClipTop

////////////////////////////////////////////////////////////////////
// incClipBottom
// description: increments the bottom clipping value of a layer by 
// the value given by a param.
// params: the layer to change, and the value to increment the clip by
// return: nothing...unless strange browser
// cross browser compatible

function incClipBottom(layer, inc) {

  if (isMinNS4)
    layer.clip.bottom += inc;

  if (isMinIE4) {
    var str =  layer.style.clip;
    if (!str){
      return(0);
    }
    layer.style.clip[2] += inc;
  }
  return(-1);
} //end incClipBottom