function Applet() {
    this.attr  = new Object(); // an object to keep the applet attributes
    this.param = new Object(); // an object to keep the applet parameters
}

Applet.prototype.write = function() {

    document.write('<applet ');

    // write the attributes of the applet tag
    for (name in this.attr) {
        var value = this.attr[name];
	document.write(name+'="'+value+'" ');
    }
    document.write('>');

    // write the applet parameters
    for (name in this.param) {
        var value = this.param[name];
	document.write('<param name="'+name+'" value="'+value+'">');
    }
    document.write('</applet>');
}

function ActiveX() {
    this.attr  = new Object(); // an object to keep the object attributes
    this.param = new Object(); // an object to keep the object parameters
}

ActiveX.prototype.write = function() {

    document.write('<object ');

    // write the attributes of the object tag
    for (name in this.attr) {
        var value = this.attr[name];
	document.write(name+'="'+value+'" ');
    }
    document.write('>');

    // write the object parameters
    for (name in this.param) {
        var value = this.param[name];
	document.write('<param name="'+name+'" value="'+value+'">');
    }
    document.write('</object>');
}

function activateObjects() {
	objects = document.getElementsByTagName("object");	
	for (var i = 0; i < objects.length; i++)	{	    
		objects[i].outerHTML = objects[i].outerHTML;	
	}
}
