// JavaScript Document
function showFlash(file,width,height,wmode,quality){
	fDiv	=	document.getElementById('flashFile');
	var str		=	'';
	str		=	'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">';
	str		+=	' <param name="wmode" value="'+wmode+'" />';
	str		+=	' <param name="movie" value="'+file+'" />';
	str		+=	' <param name="quality" value="'+quality+'" />';
	str		+=	' <embed wmode="opaque" src="'+file+'" quality="'+quality+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>';
	str		+=	'</object>';
	fDiv.innerHTML	=	str;
}

function newIFrame(src,width,height){
	topPadding				=	80;
	availHeight				=	screen.availHeight;
	availWidth				=	screen.availWidth;

	centerHeight			=	availHeight/2;
	centerWidth				=	availWidth/2;

	//center window on screen
	halfNewDivHeight		=	parseInt(height)/2;
	halfNewDivWidth			=	parseInt(width)/2;

	//top left corner of new box...
	topNewDiv				=	centerHeight-halfNewDivHeight-topPadding;
	topNewDiv				=	(topNewDiv<0) ? 0 : topNewDiv;
	leftNewDiv				=	centerWidth-halfNewDivWidth;
	leftNewDiv				=	(leftNewDiv<0) ? 0 : leftNewDiv;
	dframe					=	document.getElementById('floatingDiv');
	dframe.style.display	=	'block';
	dframe.style.height		=	parseInt(height)+'px';
	dframe.style.top		=	topNewDiv+'px';
	dframe.style.left		=	leftNewDiv+'px';
	
	iframe					=	document.createElement('iframe');
	iframe.src				=	src;
	iframe.width			=	parseInt(width);
	iframe.height			=	parseInt(height);
	iframe.frameBorder		=	0;	
	dframe.appendChild(iframe);
}	


function closeDiv(floatingDiv){
	frame				=	document.getElementById(floatingDiv);
	frame.style.display	=	'none';
	frame.innerHTML		=	'';
}
