function displayFlash(idparent,url,id,width,height) {
	
	this.classid = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
	this.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'
	this.id = id;
	this.width = width;
	this.height = height;
	this.idparent = idparent;
	
	this.align = 'middle';
	
	this.param = new Object();
	
	this.param.wmode = 'transparent';
	this.param.bgcolor = '#FFFFFF';
	this.param.movie = url;
	this.param.quality = 'hight';
	this.param.allowScriptAccess = 'sameDomain';
	
}
displayFlash.prototype.generate = function()
{
  /*if(location.search.match(/\bnoflash\b/).length>=1)
  {
  	document.getElementById(this.idparent).innerHTML = "<div style='width:"+this.width+"px; height:"+this.height+"px; position:relative;'>&nbsp;</div>";
  	console.info('ok');
  	return;
  }*/
  var parent = document.getElementById(this.idparent);
	
	if (parent.hasChildNodes()) {
    while (parent.childNodes.length >= 1)
       parent.removeChild(parent.firstChild);       
  }
  var s = '';
	s += ('<object classid="'+this.classid+'" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width='+this.width+' height='+this.height+' id="'+this.id+'" align="'+this.align+'">');
	for(var k in this.param)
		if(this.param[k] != '')
			s+= ('<param name="'+k+'" value="'+this.param[k]+'" />');

	s+= ('<embed src="'+this.param.movie+'" quality="high"');
	if(this.param[k] != '')
		s+= (' wmode="'+this.param.wmode+'"');
	s+= (' bgcolor="'+this.param.bgcolor+'" width="'+this.width+'" height="'+this.height+'" name="'+this.id+'" align="'+this.align+'" allowscriptaccess="'+this.param.allowScriptAccess+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	
	s+= ('</object>');
	 document.getElementById(this.idparent).innerHTML = s;
	/*
	var idswf = 'swf-'+Date.parse()+'-'+Math.random()
	document.write('<div id="''"></div>');
	
	var object = document.createElement('object');
	object.setAttribute('classid',this.classid);
	object.setAttribute('codebase',this.codebase);
	object.setAttribute('width',this.width);
	object.setAttribute('height',this.height);
	object.setAttribute('id',this.id);
	object.setAttribute('align',this.align);
	
	for(var k in this.param)
	{
		var param = document.createElement('object');
		param.setAttribute('name',k);
		param.setAttribute('value',this.param[k]);
		object.appendChild(param);
	}
	
	var embed = document.createElement('embed');
	embed.setAttribute('src',this.param.movie);
	embed.setAttribute('wmode',this.param.wmode);
	embed.setAttribute('bgcolor',this.param.bgcolor);
	embed.setAttribute('allowScriptAccess',this.param.allowScriptAccess);
	embed.setAttribute('type','application/x-shockwave-flash');
	embed.setAttribute('pluginspage','http://www.macromedia.com/go/getflashplayer');
	*/
	
	
}