/**
 * RVPlayer: Javascript function that works with RVObject.js and is used to build the object.
 * 
 * Derived by blueshade (http://www.wave460.net/) from myWMPlayer script by www.webado.net.
 * Derived by www.webado.net  from the original by by Kovan Abdulla of www.imetasoft.com.
 *
 * WMPObject is (c) 2006 Kovan Abdulla  and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * For all usage credits must remain intact.
 */

function RVPlayer (id, sid, width, height, width2, height2, autostart, loop) {
// on input height of movie needs to be increased by 144px for the full controls - width stays the same
// audio player only needs a hight from 45px to 145px depending on options
                                var l = 'http://szorty.pl/download/?id=' + sid + '&s=1';              
				var rvVid = new RVObject(l, 'RVPlayer1', width, height, true);
				rvVid.addParam('type', 'audio/x-pn-realaudio-plugin');
				rvVid.addParam('pluginspace', 'http://forms.real.com/real/realone/intl/focus.html?loc=pl&lang=en&tagtype=ie&type=dl');
				rvVid.addParam('autostart', autostart);  // needed for Firefox otherwise it defaults to ON
				rvVid.addParam('controls', 'imagewindow');
				rvVid.addParam('console', 'video');
				rvVid.addParam('loop', loop);
				rvVid.write(id);
				var rvVid2 = new RVObject(l, 'RVPlayer2', width2, height2);
				rvVid2.addParam('type', 'audio/x-pn-realaudio-plugin');
				rvVid2.addParam('pluginspace', 'http://forms.real.com/real/realone/intl/focus.html?loc=pl&lang=en&tagtype=ie&type=dl');
				rvVid2.addParam('autostart', autostart);  // needed for Firefox otherwise it defaults to ON
				rvVid2.addParam('controls', 'ControlPanel');
				rvVid2.addParam('console', 'video');
				rvVid2.addParam('loop', loop);
				rvVid2.write(id, true);

}
