    
function InformeVideoObejct()
{
	this.vtype  = '';
	this.width  = 400;
	this.height = 300;
	this.code1  = '';
	this.code2  = '';
	this.code3  = '';
 
	this.display = function ()
	{
		var html = '';
		if (this.vtype == 'youtube')
		{
			if (typeof(this.code2) != 'string' || this.code2 == '')
			{
				this.code2 = 'www';
			}
			html =  '<object width="{WIDTH}" height="{HEIGHT}">\n' +
				' <param name="movie" value="http://{CODE2}.youtube.com/v/{CODE1}"></param>\n' +
				' <param name="wmode" value="transparent"></param>\n' +
				' <embed src="http://{CODE2}.youtube.com/v/{CODE1}" type="application/x-shockwave-flash" wmode="transparent" width="{WIDTH}" height="{HEIGHT}"></embed>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'yahoo')
		{
			html =  '<object width="{WIDTH}" height="{HEIGHT}">\n' +
				' <param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" />\n' +
				' <param name="allowFullScreen" value="true" />\n' +
				' <param name="flashVars" value="id={CODE2}&vid={CODE1}&lang=en-us&intl=us&thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/i/us/sch/cn/video05/{CODE1}_rnd8dad1dc9_19.jpg&embed=1" />\n' +
				' <embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.2" type="application/x-shockwave-flash"  width="{WIDTH}" height="{HEIGHT}" allowFullScreen="true" flashVars="id={CODE2}&vid={CODE1}&lang=en-us&intl=us&thumbUrl=http%3A//us.i1.yimg.com/us.yimg.com/i/us/sch/cn/video05/{CODE1}_rnd8dad1dc9_19.jpg&embed=1" ></embed>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'metacafe')
		{
			html =  '<embed src="http://www.metacafe.com/fplayer/{CODE1}/{CODE2}.swf" width="{WIDTH}" height="{HEIGHT}" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed><br>\n';
		}
		else if (this.vtype == 'msn')
		{
			html =  '<a href="http://video.msn.com/video.aspx?mkt=en-US&brand=&vid={CODE1}" target="_new"><img src="http://img2.catalog.video.msn.com/Image.aspx?uuid={CODE1}&w={WIDTH}&h={HEIGHT}" border=0 width={WIDTH} height={HEIGHT} /></a>\n';
		}
		else if (this.vtype == 'rambler')
		{
			html =  '<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}">\n' +
				' <param name="wmode" value="transparent"></param>\n' +
				' <param name="movie" value="http://vision.rambler.ru/i/e.swf?id={CODE1}&logo=1" />\n' +
				' <embed src="http://vision.rambler.ru/i/e.swf?id={CODE1}&logo=1" width="{WIDTH}" height="{HEIGHT}" type="application/x-shockwave-flash" wmode="transparent"/>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'reuters')
		{
			html =  '<object style="width: 100%" type="application/x-shockwave-flash" data="http://www.reuters.com/resources/flash/includevideo.swf?edition=US&videoId={CODE1}" width="{WIDTH}" height="{HEIGHT}">\n' +
				' <param name="wmode" value="transparent" />\n' +
				' <param name="movie" value="http://www.reuters.com/resources/flash/includevideo.swf?edition=US&videoId={CODE1}" />\n' +
				' <embed src="http://www.reuters.com/resources/flash/includevideo.swf?edition=US&videoId={CODE1}" type="application/x-shockwave-flash" wmode="transparent" width="{WIDTH}" height="{HEIGHT}"></embed>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'rutube')
		{
			html =  '<OBJECT width="{WIDTH}" height="{HEIGHT}">\n' +
				' <PARAM name="movie" value="http://video.rutube.ru/{CODE1}"></PARAM>\n' +
				' <PARAM name="wmode" value="window"></PARAM><PARAM name="allowFullScreen" value="true"></PARAM>\n' +
				' <EMBED src="http://video.rutube.ru/{CODE1}" type="application/x-shockwave-flash" wmode="window" width="{WIDTH}" height="{HEIGHT}" allowFullScreen="true" ></EMBED>\n' +
				'</OBJECT>\n';
		}
		else if (this.vtype == 'myspace')
		{
			html =  '<object width="{WIDTH}px" height="{HEIGHT}px">\n' +
				' <param name="wmode" value="transparent"/>\n' +
				' <param name="allowscriptaccess" value="always"/>\n' +
				' <param name="movie" value="http://lads.myspace.com/videos/vplayer.swf"/>\n' +
				' <param name="flashvars" value="culture=en-US&a=0&ap=0&y=0&m={CODE1}&userid=-1&showmenus=0&remove=0&t=&type=video"/>\n' +
				' <embed src="http://lads.myspace.com/videos/vplayer.swf" width="{WIDTH}" height="{HEIGHT}" flashvars="culture=en-US&a=0&ap=0&y=0&m={CODE1}&userid=-1&showmenus=0&remove=0&t=&type=video" type="application/x-shockwave-flash" allowscriptaccess="always" />\n' +
				'</object>\n';
		}
		else if (this.vtype == 'mailru')
		{
			if (this.code1.indexOf('/') > 0)
			{
				var res = this.code1.split('/');
				this.code3 = res[0];
				this.code1 = res[1];
			}
			html =  '<object width="{WIDTH}" height="{HEIGHT}">\n' +
				' <param name="flashvars" value="imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username={CODE3}&albumid={CODE1}&id={CODE2}&catalogurl=http://video.mail.ru/catalog/celebration/&tagurl=" />\n' +
				' <param name="allowScriptAccess" value="always" />\n' +
				' <param name="movie" value="http://img.mail.ru/r/video2/player_v2.swf?par=http://content.video.mail.ru/mail/{CODE3}/{CODE1}/${CODE2}$0$158" />\n' +
				' <embed src="http://img.mail.ru/r/video2/player_v2.swf?par=http://content.video.mail.ru/mail/{CODE3}/{CODE1}/${CODE2}$0$158" type="application/x-shockwave-flash" width="{WIDTH}" height="{HEIGHT}" flashvars="imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username={CODE3}&albumid={CODE1}&id={CODE2}&catalogurl=http://video.mail.ru/catalog/celebration/" allowScriptAccess="always"></embed>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'tutv')
		{
			html =  '<object width="{WIDTH}" height="{HEIGHT}">\n' +
				' <param name="movie" value="http://tu.tv/tutvweb.swf?kpt={CODE1}&xtp=296272"></param>\n' +
				' <param name="wmode" value="transparent"></param>\n' +
				' <embed src="http://tu.tv/tutvweb.swf?kpt={CODE1}&xtp=296272" type="application/x-shockwave-flash" wmode="transparent" width="{WIDTH}" height="{HEIGHT}"></embed>\n' +
				'</object>\n';
		}
		else if (this.vtype == 'smotri')
		{
			html =  '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="{WIDTH}" height="{HEIGHT}">\n' +
				'  <param name="movie" value="http://pics.smotri.com/scrubber_custom8.swf?file={CODE1}&bufferTime=3&autoStart=false&str_lang=rus&xmlsource=http%3A%2F%2Fpics.smotri.com%2Fcskins%2Fblue%2Fskin_color_lightaqua.xml&xmldatasource=http%3A%2F%2Fpics.smotri.com%2Fskin_ng.xml" />\n' +
				'  <param name="allowScriptAccess" value="always" />\n' +
				'  <param name="allowFullScreen" value="true" />\n' +
				'  <param name="bgcolor" value="#ffffff" />\n' +
				'  <embed src="http://pics.smotri.com/scrubber_custom8.swf?file={CODE1}&bufferTime=3&autoStart=false&str_lang=rus&xmlsource=http%3A%2F%2Fpics.smotri.com%2Fcskins%2Fblue%2Fskin_color_lightaqua.xml&xmldatasource=http%3A%2F%2Fpics.smotri.com%2Fskin_ng.xml" quality="high" allowscriptaccess="always" allowfullscreen="true" wmode="window" width="{WIDTH}" height="{HEIGHT}" type="application/x-shockwave-flash"></embed>\n' +
				'</object>\n';
		}
		html = str_replace(html, '{VTYPE}', '' + this.vtype);
		html = str_replace(html, '{WIDTH}', '' + this.width);
		html = str_replace(html, '{HEIGHT}', '' + this.height);
		html = str_replace(html, '{CODE1}', '' + this.code1);
		html = str_replace(html, '{CODE2}', '' + this.code2);
		html = str_replace(html, '{CODE3}', '' + this.code3);
		return html;
	}
}

function str_replace(subject, search, replace) {
    return subject.split(search).join(replace);
}
