/**
 * 업로더를 생성해 주는 함수
 * 
 * @author jidolstar (jidolstar@gmail.com)
 * @since 2008.10.24
 * @version 2008.10.26.( Last Modified )
 * 
 * @param swfURL 업로더 SWF URL
 * @param divId 업로더  SWF가 들어갈 html element id
 * @param swfObjectName 업로더  SWF객체이름
 * @param width 업로더  폭
 * @param height 업로더  높이
 * @param flashPlayerVersion Flash Player 버전 값
 * @param expressInstallURL expressInstall.swf의 경로
 * @param flashvars 각종 설정들 
 * 	var flashvars = {
 *		faServiceJSInstanceName : FAService 인스턴스 명,
 *		uploadURL : 업로드 서버측 URL ,
 *		maxFileSize : byte 단위 파일 크기. 가령 10MB라면 10,000,000으로 설정한다.,
 *		maxFileCount : 한번에 올릴 수 있는 최대 파일 수,
 *		uploadDataFieldName : 업로드 DataFieldName,
 *		fileFilterDescriptions : 파일 필터 설명, |로 구분한다. ex) "ALL|Images|Douments",
 *		fileFilterExtensions : 파일 필터링할 대상, |로 구분한다. ex) "*|*.jpg;*.gif;*.png|*.doc;*.hwp;*.pdf",
 *		buttonImagePath : Button Image경로, png, swf, jpg 등이 가능. buttonStyleSkinPath보다 적용 우선순위가 높다.
 *	};
 */
function createFileUploader( swfURL, divId, swfObjectName, width, height, flashPlayerVersion, expressInstallURL, flashvars ) 
{
	if( swfURL == null || 
		divId == null || 
		swfObjectName == null ||
		width == null ||
		height == null || 
		flashPlayerVersion == null ||
		expressInstallURL == null )
	{
		alert("create a uploader failed!");
		return;
	}
	
	var params = {
		play : "false",	//true(default),false
		loop : "false", //true(default),false
		scale : "showall ", //showall(default) , noorder, exactfit
		quality : "Autolow", //Low,Autolow,Autohigh,Medium,High(default),Best
		allowscriptaccess : "samedomain", //always , never , samedomain(default)
		menu : "false", //true(default),false
		bgcolor : "#000000",
		base : ".",
		wmode : "Opaque" //Window(default), Opaque, Transparent, Opaque windowless, Transparent windowless
	};
	
	var attributes = {
		id: swfObjectName,
		name: swfObjectName,
		swliveconnect:"false", //true, false(default)
		xiRedirectUrl: "http://starpl.com",	
		base : "."
	};	
	
	swfobject.embedSWF( swfURL, divId, width, height, flashPlayerVersion, expressInstallURL, flashvars, params, attributes);
}

function createAlbumEditor( swfURL, divId, swfObjectName, width, height, flashPlayerVersion, expressInstallURL, flashvars ) 
{
	if( swfURL == null || 
		divId == null || 
		swfObjectName == null ||
		width == null ||
		height == null || 
		flashPlayerVersion == null ||
		expressInstallURL == null || 
		flashvars == null )
	{
		alert("create the editor failed!");
		return;
	}
	
	var params = {
		play : "false",
		loop : "false",
		scale : "showall ",
		quality : "Autohigh", 
		allowscriptaccess : "always", 
		menu : "false", 
		bgcolor : "#000000",
		base : ".",
		wmode : "opaque",
		allowfullscreen : "false"
	};
	
	var attributes = {
		id: swfObjectName,
		name: swfObjectName,
		swliveconnect:"false", 
		xiRedirectUrl: "http://starpl.com",	
		base : "."
	};	
	
	swfobject.embedSWF( swfURL, divId, width, height, flashPlayerVersion, expressInstallURL, flashvars, params, attributes);
}
