//function to add a flash flv player into the page at the calling point.
//parameters are:  video url (required), title (optional) , snapshot url(optional) , site(optional)
function add_flv(vurl,title,purl,site){

//check for minimum of video url, or return false
if(typeof(vurl) == 'undefined'){
 return false;}
//check for site or set for default 
if(typeof(site) == 'undefined'){
var site="default";}
//check for snapshot url or set to nothing
if(typeof(purl) == 'undefined'){
var purl="";}
//check for title url or set to blank title
if(typeof(title) == 'undefined'){
var title="~Untitled Video~";}

//set custom properties based on 'site'
switch(site){	
	case "MISIKKO": //if Misikko, set properties
		var logourl ='/lib/misikko/misikko-video-logo.png';  
	break;
	case "AM": //if American Muscle, set properties
		var logourl ='/lib/mustangtuning/am-video-logo.png'; 
	break;
	case "default":
	    //nothing 
		var logourl =' ';
	break;
}
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"'
+ 'WIDTH="332" HEIGHT="310" id="flv_player"><PARAM NAME=movie VALUE="http://lib.store.yahoo.net/lib/misikko/flv-player.swf?vtitle='+title+'&logourl='+logourl+'&vurl='+vurl+'&purl='+purl+'">'
+ '<PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=noscale><PARAM NAME=allowFullScreen VALUE=true><PARAM NAME=bgcolor VALUE=#FFFFFF>'
+ '<EMBED src="http://lib.store.yahoo.net/lib/misikko/flv-player.swf?vtitle='+title+'&logourl='+logourl+'&vurl='+vurl+'&purl='+purl+'" quality=high bgcolor=#FFFFFF WIDTH="332" HEIGHT="310"'
+ 'NAME="flv_player" scale="noscale" allowFullScreen="true" ALIGN="" TYPE="application/x-shockwave-flash"'
+ 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>')
return true;
}
