/*--- Avanquest WebEasy External Script ---*/

/* -------------------------------------------- */
/* Embed MS Windows Video File                  */
/* -------------------------------------------- */

function weAddWindowsVideo(url,dmx,dmy,ply,mnu,dsp,asr,aud,lop,spd,rmn,enb) 
{ 
	if (IE) 
	{ 
		document.writeln('<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"');
	} 
	else 
	{ 
		document.writeln('<object type="video/x-ms-asf-plugin" data="' + url + '"');
	} 
	document.writeln( 
	' width="' + dmx +'" height="' + dmy + '">' + 
	'  <param name="URL" value="' + url + '">' + 
	'  <param name="autoStart" value="' + ply + '">' + 
	'  <param name="uiMode" value="' + mnu + '">' + 
	'  <param name="fullScreen" value="' + dsp + '">' + 
	'  <param name="stretchToFit" value="' + asr +'">' + 
	'  <param name="mute" value="' + aud +'">' + 
	'  <param name="playCount" value="' + lop +'">' + 
	'  <param name="rate" value="' + spd + '">' + 
	'  <param name="enableContextMenu" value="' + rmn + '">' + 
	'  <param name="enabled" value="' + enb + '">' + 
	'  Windows Media Player 9 is required to view this clip.' + 
	'  It can be downloaded from' + 
	'  <a href="http://www.microsoft.com/windows/windowsmedia/9series/player.aspx">' + 
	'  the Microsoft web site</a>.' + 
	'</object>'); 
}

/* -------------------------------------------- */
/* Embed Adobe Flash SWF File                   */
/* -------------------------------------------- */


function weAddFlash(url,dmx,dmy,ply,lop,qua,sca,mnu,bgc)
{
	document.write('<object type="application/x-shockwave-flash"');
	document.write(' data="'+url+'"');
    document.write(' width="'+dmx+'" height="'+dmy+'">');
    document.write('<param name="movie" value="'+url+'">');
    document.write('<param name="play" value="'+ply+'">');
    document.write('<param name="loop" value="'+lop+'">');
    document.write('<param name="quality" value="'+qua+'">');
    document.write('<param name="scale" value="'+sca+'">');
    document.write('<param name="menu" value="'+mnu+'">');
    document.write('<param name="bgcolor" value="'+bgc+'">');
    document.write('<embed pluginspage="http://www.macromedia.com/go/getflashplayer"');
    document.write(' type="application/x-shockwave-flash"');
	document.write(' src="'+url+'"');
	document.write(' width="'+dmx+'"');
	document.write(' height="'+dmy+'"');
	document.write(' play="'+ply+'"');
	document.write(' loop="'+lop+'"');	
	document.write(' quality="'+qua+'"');	
	document.write(' scale="'+sca+'"');	
	document.write(' menu="'+mnu+'"');	
	document.write(' bgcolor="'+bgc+'">');
    document.write('<a href="http://www.macromedia.com/downloads/" target="_blank">');
    document.write('Plugins not found,</a>&nbsp;<A href="'+url+'" target="_blank">try</a>');
    document.write('</embed>');
    document.writeln('</object>');
}


/* -------------------------------------------- */
/* Embed MS Windows Audio File                  */
/* -------------------------------------------- */

function weAddWindowsAudio(url,dmx,dmy,ply,lop,mnu,rmn,enb)
{
	if (IE)
	{
		document.writeln('<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"');
	}
	else
	{
		document.writeln('<object type="video/x-ms-asf-plugin" data="' + url + '"');
		dmy=dmy+8
	}
	document.writeln(
	' width="' + dmx +'" height="' + dmy + '">' +
	'  <param name="URL" value="' + url + '">' +
	'  <param name="autoStart" value="' + ply + '">' +
	'  <param name="playCount" value="' + lop +'">' +
	'  <param name="uiMode" value="' + mnu + '">' +
	'  <param name="enableContextMenu" value="' + rmn + '">' +
	'  <param name="enabled" value="' + enb + '">' +
	'  Windows Media Player 9 is required to play this clip.' +
	'  It can be downloaded from' +
	'  <a href="http://www.microsoft.com/windows/windowsmedia/9series/player.aspx">' +
	'  the Microsoft web site</a>.' +
	'</object>');
}


/* -------------------------------------------- */
/* Embed Adobe PDF Document                     */
/* -------------------------------------------- */

function weAddPdfView(url, dmx, dmy)
{
	document.writeln(
		'<iframe src="' + url + '" width="' + dmx + '" height="' + dmy + '"' +
		' scrolling="no" frameborder="0">' +
		'  Your browser does not support IFRAMEs.' +
	    '  The contents of the IFRAME can be viewed' +
	    '  <a href="' + url + '" target="_blank">here</a>.' +
	    '</iframe>');
}

/* -------------------------------------------- */
/* Embed HTML/TEXT File                              */
/* -------------------------------------------- */

function weAddHtmlView(url, dmx, dmy, scr, fbr)
{
	document.writeln(
		'<iframe src="' + url + '" width="' + dmx + '" height="' + dmy + '"' +
		' scrolling="' + scr + '" frameborder="' + fbr + '">' +
		'  Your browser does not support IFRAMEs.' +
	    '  The contents of the IFRAME can be viewed' +
	    '  <a href="' + url + '" target="_blank">here</a>.' +
	    '</iframe>');
}
/* -------------------------------------------- */
/* Flash Play Folder List                       */
/* Used with permission -  Jeroen Wijering (c)  */
/* License is required for commercial web sites */
/* for more information: www.jeroenwijering.com */
/* -------------------------------------------- */

function weAddFlashPlayFolder(url,dmx,dmy,ply,lop,nri,sbr,fgc,bgc,hlc)
{
	var vid='flvplayer.swf';
	var top=dmy-22-(nri*22);  
	if(top < 0) top=0;
	vid += '?file='			+url;
	vid += '&autostart='	+ply;
	vid += '&repeat='		+lop;
	vid += '&autoscroll='	+sbr;
	vid += '&frontcolor='	+fgc;
	vid += '&backcolor='	+bgc;
	vid += '&lightcolor='	+hlc;
	if(nri > 0) vid += '&displayheight='+top;
	document.write('<object type="application/x-shockwave-flash"'); 
	document.write(' data="'+vid+'"');
    document.write(' width="'+dmx+'" height="'+dmy+'"');
    document.write(' wmode="transparent"'+'>');    
    document.write('<param name="movie" value="'+vid+'">');    
    document.write('<param name="wmode" value="transparent">');
    document.write('<embed pluginspage="http://www.macromedia.com/go/getflashplayer"');
    document.write(' type="application/x-shockwave-flash"');
	document.write(' src="'+vid+'"');
	document.write(' width="'+dmx+'"');
	document.write(' height="'+dmy+'"');
	document.write(' wmode="transparent">');
    document.write('<a href="http://www.macromedia.com/downloads/" target="_blank">');
    document.write('Plugins not found,</a>&nbsp;&nbsp;<A href="'+url+'" target="_blank">play</a>');
    document.write('</embed>');
   	document.writeln('</object>');
}




/*--- EndOfFile ---*/
