//
// This code detects which browser we are
// running into (IE or others) and assigns
// the correct element (object or embed) to
// the "plugin" variable, that we will use.
//

var plugin;

if(navigator.userAgent.indexOf('MSIE') != -1)

	{
		plugin = document.getElementById('ie_plugin');
	}
		else
	{
		plugin = document.getElementById('np_plugin');
	}

//
// This is a local JS function used by our form
// element to call the plugin functions using
// the "plugin" variable that we defined above
//

function openNewMovie()

	{
		var url = document.forms['videoSelector'].movie.value;

		if(url != '')
			{
				plugin.Open(url);
			}
	}