// THIS DOC WRITE FLASH CONTENT

function write_flash(flash_file, width, height) {

  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="' + flash_file + '" />');
  document.write('<param name="quality" value="high" />');
  document.write('<embed src="' + flash_file + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
  document.write('</object>');

}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		newtop_07_over = newImage("images/newtop_07-over.jpg");
		newtop_08_over = newImage("images/newtop_08-over.jpg");
		newtop_09_over = newImage("images/newtop_09-over.jpg");
		newtop_10_over = newImage("images/newtop_10-over.jpg");
		newtop_11_over = newImage("images/newtop_11-over.jpg");
		newtop_12_over = newImage("images/newtop_12-over.jpg");
		newtop_13_over = newImage("images/newtop_13-over.jpg");
		preloadFlag = true;
	}
}

function checkrequired(which) {
  var pass=true; 
  if (document.images) {
    for (i=0;i<which.length;i++) {
      var tempobj=which.elements[i];
      if (tempobj.name.substring(0,8)=="required") {
        if (((tempobj.type=="text"||tempobj.type=="textarea") && tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==0)) {
		  pass=false;
		  break;
        }
      }
    }
  }

  if (!pass) {
	shortFieldName=tempobj.name.substring(8,30);
	alert("Please make sure the '"+shortFieldName+"' field was properly completed.");
	tempobj.focus();
	return false;
  } else
	return true;
}