function getVideo(fileName, videoNameID, width, height, loop, menu , wmode , quality , bgcolor , play){
	

	if (typeof a === 'undefined') {
      a = 0;
    } 
	if (typeof videoLib === 'undefined') {videoLib="/media/video/";}
	if (typeof videoNameID === 'undefined') {videoNameID="v1";}
	if (typeof width === 'undefined') {width="318";}
	if (typeof height === 'undefined') {height="290";}
	if (typeof loop === 'undefined') {loop="false";}
	if (typeof menu === 'undefined') {menu="false";}
	if (typeof wmode === 'undefined') {wmode="opaque";}
	if (typeof quality === 'undefined') {quality="high";}
	if (typeof bgcolor === 'undefined') {bgcolor="000000";}
	if (typeof play === 'undefined') {play="true";}

	output = "<object id='demomovie' classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"" + width + "\" height=\"" + height + "\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\">";
	output += "<param name=\"movie\" value=\"" + videoLib + fileName + "\" />";
	output += "<param name=\"loop\" value=\"" + loop + "\" />";
	output += "<param name=\"menu\" value=\"" + menu + "\" />";
	output +=  "<param name=\"wmode\" value=\"" + wmode + "\" />";
	output += "<param name=\"quality\" value=\"" + quality + "\" />";
	output += "<param name=\"bgcolor\" value=\"" + bgcolor + "\" /> <embed id='demomovie' name='demomovie' src=\"" + videoLib + fileName + "\" loop=\"" + loop + "\" wmode=\"" + wmode + "\" menu=\"" + menu + "\" quality=\"" + quality + "\" bgcolor=\"#" + bgcolor + "\" width=\"" + width + "\" height=\"" + height + "\" name=\"" + videoLib + videoNameID + "\" align=\"middle\" play=\"" + play + "\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> </embed>";
	output += "</object>";

	document.write(output);
}

function getVideo2(fileName,  bgcolor , videoNameID, width, height, loop, menu , wmode , quality , play){
	

	if (typeof a === 'undefined') {
      a = 0;
    } 
	if (typeof videoLib === 'undefined') {videoLib="";}
	if (typeof videoNameID === 'undefined') {videoNameID="v1";}
	if (typeof width === 'undefined') {width="318";}
	if (typeof height === 'undefined') {height="290";}
	if (typeof loop === 'undefined') {loop="false";}
	if (typeof menu === 'undefined') {menu="false";}
	if (typeof wmode === 'undefined') {wmode="opaque";}
	if (typeof quality === 'undefined') {quality="high";}
	if (typeof bgcolor === 'undefined') {bgcolor="000000";}
	if (typeof play === 'undefined') {play="true";}

	output = "<object id='demomovie' classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"" + width + "\" height=\"" + height + "\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\">";
	output += "<param name=\"movie\" value=\"" + videoLib + fileName + "\" />";
	output += "<param name=\"loop\" value=\"" + loop + "\" />";
	output += "<param name=\"menu\" value=\"" + menu + "\" />";
	output +=  "<param name=\"wmode\" value=\"" + wmode + "\" />";
	output += "<param name=\"quality\" value=\"" + quality + "\" />";
	output += "<param name=\"bgcolor\" value=\"" + bgcolor + "\" /> <embed id='demomovie' name='demomovie' src=\"" + videoLib + fileName + "\" loop=\"" + loop + "\" wmode=\"" + wmode + "\" menu=\"" + menu + "\" quality=\"" + quality + "\" bgcolor=\"#" + bgcolor + "\" width=\"" + width + "\" height=\"" + height + "\" name=\"" + videoLib + videoNameID + "\" align=\"middle\" play=\"" + play + "\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> </embed>";
	output += "</object>";
	
	return output;
}

function setVideo(theContainer, theMovie){
	//tempMovie = getFlashMovieObject(theContainer);
			
	//if (tempMovie.src!="/media/video/"){
	//	tempMovie.LoadMovie(0, theMovie);	
	//}else{
	//	tempMovie.src =  theMovie;
	//}


	var tempShell;
	tempShell = document.getElementById("videoshell");


//alert(tempShell.innerHTML);

	tempShell.innerHTML = getVideo2(theMovie);

//alert(tempShell.innerHTML);

}

function setVideo2(theContainer, theMovie){
	var tempShell;
	tempShell = document.getElementById("videoshell");
	tempShell.innerHTML = getVideo2(theMovie, "ffffff");
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])

		
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function initProductDemo(){
	return getVideo("", "v1", "318", "290", "false", "false" , "opaque" , "high" , "ffffff" , "true");
}

function getThickBoxVideo(theMovie, theWidth, theHeight){
	document.write( getVideo2(theMovie, "#000000" , "productinfo", theWidth, theHeight, "false", "false" , "opaque" , "high" , "true"));
}






