//   videoSupport.js


function change_video(browser)
{

/* get the name of the file hard-coded in the mediaplayer1 OBJECT */
var default_filename=document.mediaplayer1.Filename;

/* construct the filename with the selected bit rate */
var newfilename=default_filename.substr(0, default_filename.length-7)+browser +'.wmv'

/* this will update the input field "answer"  
document.getElementById("answer").value=browser;
*/

/* update the filename parameter to the selected file.  for whatever reason, 
only this parameter needs to be updated in order to play this video file. */
document.mediaplayer1.Filename=newfilename;

}

function get_videoname(browser)
{

/* get the name of the file hard-coded in the mediaplayer1 OBJECT */
var default_filename=document.mediaplayer1.URL;

/* construct the filename with the selected bit rate 

for example, replace: M/cloudA1002_M.wmv to S/cloudA1002_S.wmv

http://www.ccnshop.com/video/solutions/PA/QA/wmv_S/cloudA1002_S.wmv

var newfilename=default_filename.substr(0, default_filename.length-5)+browser +'.wmv'

*/
var newfilename=default_filename.substr(0, 49)+browser +
				default_filename.substr(50, default_filename.length-55)+browser +'.wmv'


/* this will update the input field "answer"  
document.getElementById("answer").value=browser;
*/

document.mediaplayer1.URL=newfilename;

/* alert(document.URL); */

}

function xget_videoname(browser)
{

/* get the name of the file hard-coded in the mediaplayer1 OBJECT */
var default_filename=document.mediaplayer1.URL;
alert(default_filename);
document.mediaplayer1.URL=browser;
}


