// JavaScript Document
function embed(sId, sWidth, sHeight, sLanguage, suPath)
{
	var OETags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
	+ 'width="'+sWidth+'" height="'+sHeight+'" id="'+sId+'" align="middle">'
    + '<param name="allowScriptAccess" value="sameDomain" />'
	+ '<param name="movie" value="'+sId+'.swf" />'
	+ '<param name="loop" value="false" />'
	+ '<param name="flashvars" value="startLanguage='+sLanguage+'&setupPath='+suPath+'" />'
	+ '<param name="quality" value="best" />'
	+ '<param name="bgcolor" value="#000000" />'
	+ '<embed src="'+sId+'.swf" quality="best" bgcolor="#000000" width="'+sWidth+'" height="'+sHeight+'"'
	+ 'name="'+sId+'" align="middle" play="true" loop="false" allowScriptAccess="sameDomain" '
	+ 'flashvars="startLanguage='+sLanguage+'&setupPath='+suPath+'" '
	+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> '
    + '</object>';
	document.write(OETags);   // embed the etool SWF
}

function runKVideoEmbed(swfId, swfLanguage, setupPath)
{
    var swfWidth;
	var swfHeight;
	
	switch(swfId)
	{
	case "kVid_160x107" :
	  swfWidth = "160";
	  swfHeight = "169";
	  break    
	case "kVid_160x120" :
	  swfWidth = "160";
	  swfHeight = "182";
	  break
	case "kVid_240x160" :
	  swfWidth = "240";
	  swfHeight = "222";
	  break
	case "kVid_240x180" :
	  swfWidth = "240";
	  swfHeight = "242";
	  break
	case "kVid_320x213" :
	  swfWidth = "320";
	  swfHeight = "275";
	  break    
	case "kVid_320x240" :
	  swfWidth = "320";
	  swfHeight = "301";
	  break
	case "kVid_475x316" :
	  swfWidth = "475";
	  swfHeight = "379";
	  break    
	case "kVid_475x356" :
	  swfWidth = "475";
	  swfHeight = "418";
	  break
	case "kVid_640x480" :
	  swfWidth = "640";
	  swfHeight = "542";
	  break    
	case "kVid_720x480" :
	  swfWidth = "720";
	  swfHeight = "542";
	  break
	default:
	  swfWidth = "320";
	  swfHeight = "301";
	}
	embed(swfId, swfWidth, swfHeight, swfLanguage, setupPath);	
}
