function show( type , id ) {
  document.getElementById(type+id).style.display = 'inline';
  document.getElementById('shower_'+ type + id ).style.display = 'none';
  document.getElementById('hider_'+ type + id ).style.display = 'inline';
}
function hide( type , id ) {
  document.getElementById( type + id ).style.display = 'none'
  document.getElementById('shower_' + type + id ).style.display = 'inline'
  document.getElementById('hider_' + type + id ).style.display = 'none'
}
function loadIframeChangeSize(iframeName, url, aWidth, aHeight) {
  var myFrame = window.frames[iframeName];
  if ( myFrame ) {
    if( !(myFrame.width == aWidth && myFrame.height == aHeight) ) {
      alert("Settings to: " + aWidth + " " + aHeight);
      myFrame.style.width = aWidth;
      myFrame.style.height = aHeight;
      alert("Done");
    }
    myFrame.location = url;
    return false;
  }
  else return true;

}
function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;
    return false;
  }
  else return true;
}

function trim(TRIM_VALUE){
  if(TRIM_VALUE.length < 1){
    return"";
  }
  TRIM_VALUE = rTrim(TRIM_VALUE);
  TRIM_VALUE = lTrim(TRIM_VALUE);
  if(TRIM_VALUE==""){
    return "";
  } else{
  return TRIM_VALUE;
  }
} //End Function

function rTrim(VALUE){
  var w_space = String.fromCharCode(32);
  var v_length = VALUE.length;
  var strTemp = "";
  if(v_length < 0){
  return"";
  }
  var iTemp = v_length -1;

  while(iTemp > -1){
  if(VALUE.charAt(iTemp) == w_space){
  } else {
  strTemp = VALUE.substring(0,iTemp +1);
  break;
  }
  iTemp = iTemp-1;
  } //End While
  return strTemp;
} //End Function

function lTrim(VALUE){
  var w_space = String.fromCharCode(32);
  if(v_length < 1){
    return"";
  }
  var v_length = VALUE.length;
  var strTemp = "";

  var iTemp = 0;

  while(iTemp < v_length){
    if(VALUE.charAt(iTemp) == w_space){
  } else {
    strTemp = VALUE.substring(iTemp,v_length);
    break;
  }
  iTemp = iTemp + 1;
  } //End While
  return strTemp;
} //End Function
