function embedobj(clsid,mimetype,data,width,height,id,params,middle) {
	var embedstr = '<object ';
	if (data) {
		embedstr += ' data="'+data+'"';
	}
	if (mimetype) {
		embedstr += ' type="'+mimetype+'"';
	}
	if (width) {
		embedstr += ' width="'+width+'"';
	}
	if (height) {
		embedstr += ' height="'+height+'"';
	}
	if (id) {
		embedstr += ' id="'+id+'"';
	}
	if (clsid) {
		embedstr += ' classid="'+clsid+'"';
	}
	if (middle) {
		embedstr += ' class="middle"';
	}
	embedstr += '>';
	if (params) {
		for (var i in params) {
			embedstr += '<param name="' + i + '" value="' + params[i] + '" />';
		}
	}
/*	if (!id) {
		embedstr += '<embed';
		if (params) {
			for (var i in params) {
				var name;
				if (i == 'movie') {
					name = 'src';
				} else {
					name = i;
				}
				embedstr += ' ' + name + '="' + params[i] + '"';
			}
		}
		if (width) {
			embedstr += ' width="'+width+'"';
		}
		if (height) {
			embedstr += ' height="'+height+'"';
		}
		if (mimetype) {
			embedstr += ' type="'+mimetype+'"';
		}
		if (middle) {
			embedstr += ' class="middle"';
		}
		embedstr += ' />';
	}*/
	embedstr += '</object>';
	document.write(embedstr);
}

