﻿//-- 일반적으로 단순한 플래쉬 일 경우
/*
	-- 파라미터 정보 --

	width : 가로크기
	height : 세로크기
	url : 플래쉬 파일의 경로
*/

function swfView(width, height, url){
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write("		width='"+width+"' height='"+height+"' align='middle'>");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie'				value='"+url+"' /> ");
	document.write("	<param name='quality'			value='high' /> ");
	document.write("	<param name='wmode'				value='transparent' /> ");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write("		allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}


//-- 일반적으로 단순한 플래쉬 일 경우
/*
	-- 파라미터 정보 --

	width : 가로크기
	height : 세로크기
	url : 플래쉬 파일의 경로
	fvalues : 파라미터 값
*/

function swfView3(width, height, url, fvalues){
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write("		width='"+width+"' height='"+height+"' align='middle'>");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie'				value='"+url+"' /> ");
	document.write("	<param name='quality'			value='high' /> ");
	document.write("	<param name='wmode'				value='transparent' /> ");
	document.write("	<param name='flashVars'			value='"+fvalues+"'/> ");  
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write("		allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

/*
	-- 파라미터 정보 --

	id : 클래스 아이디
	width : 가로크기
	height : 세로크기
	url : 플래쉬 파일의 경로
*/

function flexView(id, width, height, url){
	
	
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write("		width='"+width+"' height='"+height+"' id='"+id+"' align='middle' style='border=0px;'>");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie'				value='"+url+"' /> ");
	document.write("	<param name='quality'			value='high' /> ");
	document.write("	<param name='wmode'				value='transparent' /> ");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write("		allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
/*
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,14,0' ");
	document.write("		width='"+width+"' height='"+height+"' align='middle' id='"+id+"'>");
	document.write("	<param name='src' value='"+url+"'>");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write("		allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
*/
}

//-- 여러 파람들이 존재 할 경우..
/*
	-- 파라미터 정보 --

	width : 가로크기
	height : 세로크기
	idname : 오브젝트에 아이디 값이 필요할 경우 
	obname : 오브젝트 네임이 필요할 경우
	allowscriptaccess : 스크립트 제어정보 (예 : sameDomain) 
	quality : play 되는 동안 사용될 anti-aliasing의 레벨을 설정 (예 : low | high | autolow | autohigh | best)
	wmode : 투명, 절대위치등 레이어의 기능 
			( 예 : Window (웹 페이지의 개별적인 사각형의 window에서 movie를 play ) | 
				   Opaque (페이지 위의 개체 뒤에 있는 모든 개체들을 보이지 않게 ) | 
				   Transparen (movie의 투명한 영역을 통해 HTML 페이지의 배경이 보이도록 ) )
	scale : WIDTH 와 HEIGHT 값이 퍼센트로 지정되어 있는 경우, movie가 브라우저 window의 어느 곳에 위치할 것인지 설정 
			(예 : showall(원본 화면비율이 적용되는 특정 영역안에 movie 전체를 위치. 뒤틀림은 발생하지 않으며, movie의 두 부분의 경계선이 나타남 ) | 
				  noborder(원본 화면비율이 적용되는 특정 영역을 채우기 위해 movie의 크기를 조절. 뒤틀림은 발생하지 않으며, movie의 일부가 짤려 나감) | 
				  exactfit(특정 영역에 전체가 보여지도록 만듬. 원본 화면비율에 상관없기 때문에 뒤틀림이 발생))
	bgcolor : 배경색 (예 : #ffffff)
	swLiveConnect : 브라우저가 처음 Flash Player를 load 하는 경우 Java를 시작할 것인지 설정 (예 : true | false)
	fvalues : 플래쉬에게 별도의 값을 던져 주어야 할 경우
	base : base directory or URL
	url : 플래쉬의 경로
*/

function swfView2(width, height, idname, obname, allowscriptaccess, quality, wmode, scale, bgcolor, swLiveConnect, fvalues, base, url){

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");

	if(idname != ""){
		document.write("		id='"+idname+"' ");
	}

	document.write("		width='"+width+"' ");
	document.write("		height='"+height+"'>");

	document.write("	<param name='movie'				value='"+url+"'/>");
	document.write("	<param name='quality'			value='"+quality+"'/>");

	if(wmode != ""){
		document.write("	<param name='wmode'				value='"+wmode+"'/>");
	}

	if(allowscriptaccess != ""){
		document.write("	<param name='allowscriptaccess' value='"+allowscriptaccess+"'/>");
	}

	if(base != ""){
		document.write("	<param name='base'			value='"+base+"'/>");
	}

	if(bgcolor != ""){
		document.write("	<param name='bgcolor'		value='"+bgcolor+"' /> ");
	}

	if ( fvalues != "" ) {
		document.write("	<param name='flashVars'		value='"+fvalues+"'/> ");    
	}

	document.write("	<param name='scale'				value='"+scale+"' />");
	document.write("	<embed	src					='"+url+"'");
	document.write("			base				='"+base+"' ");
	document.write("			scale				='"+scale+"' ");
	document.write("			swLiveConnect		='"+swLiveConnect+"' ");

	if(idname != ""){
		document.write("			id					='"+idname+"' ");
	}

	if(obname != ""){
		document.write("			name				='"+obname+"' ");
	}

	if(allowscriptaccess != ""){
		document.write("			allowScriptAccess	='"+allowscriptaccess+"' ");
	}

	document.write("			quality				='"+quality+"' ");

	if(wmode != ""){
		document.write("			wmode				='"+wmode+"' ");
	}

	document.write("			width				='"+width+"' ");
	document.write("			height				='"+height+"' ");
	document.write("			type='application/x-shockwave-flash' ");
	document.write("			pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>");
	document.write("</object>");

}

function divLayerSizeEdit(w, h)
{
 var obj = document.getElementById('cate');

 obj.style.width = w;
 obj.style.height = h;
}