
function writeFlash(id, src, height, width, param, param_val){

  output = ("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + width + "\" height=\"" + height + "\" id=\"" + id + "\" align=\"top\">");
  var scale = "";
  var wmode = "";
  var allowScriptAccess = "";

  for(i=0; i<param.length; i++){

    output += ("<param name=\"" + param[i] + "\" value=\"" + param_val[i] + "\" />\n");

    if(param[i] == "scale"){

      scale = "scale=\"" + param_val[i] + "\"";

    }

    if(param[i] == "wmode"){

      wmode = "wmode=\"" + param_val[i] + "\"";

    }

    if(param[i] == "allowScriptAccess"){

      allowScriptAccess = "allowScriptAccess=\"" + param_val[i] + "\"";

    }
 
  }

  output += ("<embed src=\"" + src + "\" quality=\"high\" bgcolor=\"#ff0000\" width=\"" + width + "\" height=\"" + height + "\" name=\"" + id + "\" salign=\"t\" align=\"top\" " + allowScriptAccess + " " + wmode + " type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  border=\"0\" " + scale + " />");
  output += ("</object>");

  document.write(output);

}

function charCount(trig_id, targ_id, max, critlim, normclass, critclass){

  var trig_obj = document.getElementById(trig_id);
  var targ_obj = document.getElementById(targ_id);

  charcount = max - trig_obj.value.length;

  if(charcount < 0){

    trig_obj.value = trig_obj.value.substring(0, max);
    charcount = 0;

  }

  targ_obj.value = charcount + " characters remaining";

  targ_obj.className = normclass;

  if(charcount <= critlim){

    targ_obj.className = critclass;

  }

}

function checkFS(){

  return document.body.clientHeight + "|" + screen.height + "|" + document.body.clientWidth + "|" + screen.width;

}

function restartCCC(){

  window.location.href = location.href;

}
