///////////////////////////////////////////// obj_common /////////////////////////////////////////////////////////////////////////


//-- �Ϲ���8�� �ܼ��� �÷��� �� ���
/*
	-- �Ķ���� d�� --

	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='always' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}


//-- �Ϲ���8�� �ܼ��� �÷��� �� ���
/*
	-- �Ķ���� d�� --

	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='always' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}
//-- 일반적으로 단순한 플래쉬 일 경우
/*
	-- 파라미터 정보 --

	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='always' 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='always' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

//-- 일반적으로 단순한 플래쉬 일 경우
/*
	-- 파라미터 정보 --

	width : 가로크기
	height : 세로크기
	url : 플래쉬 파일의 경로
	fvalues : 파라미터 값
	플래쉬 아이디값 넣는부분 추가(김명식 : 디자인파트 배소현님 요청 (2006-08-24))
*/

function swfView4(width, height, url, fvalues, idname){
	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+"' 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='allowFullScreen'	value='true' />	");		// 2008-01-14 송응제 추가
	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+"' allowFullScreen='true' align='middle' wmode='transparent' ");

	if(idname != ""){
		document.write("			id					='"+idname+"' ");
	}


	document.write("		allowScriptAccess='always' swfLiveConnect=true 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://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write("		width='"+width+"' height='"+height+"' id='"+id+"'> ");
	document.write("	  <param name='src' value='"+url+"'> ");
	document.write("	  <param name='wmode' value='transparent'> ");
	document.write("	  <embed pluginspage='http://www.macromedia.com/go/getflashplayer' ");
	document.write("			 width='"+width+"' height='"+height+"' src='"+url+"'/> ");
	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>");

}



/********************************************************
	플래시 오브젝트 입력하기 위한 함수
	2008-06-23 By Han Sanghun (Ghost-Corps)
********************************************************/
/**
 * 플래시 태그 입력 문자열 생성 함수
 *
 * @param width 플래시 폭
 * @param height 플래시 높이
 * @param path SWF 파일 경로
 * @param flashvars 플래시로 전달할 파라메터
 * @param idname 플래시 오브젝트 ID, Name 프로퍼티
 * @param wmode 투명 설정
 * @param fullscreen 전체창 사용
 *
 * @return 플래시 입력 태그 문자열
 */
function getFlashObjectString(width, height, path, flashvars, idname, wmode, fullscreen){

	// 투명도 초기값 설정
	/*if(wmode==true || wmode=="true" || wmode=="transparent"){
		wmode = "transparent";
	}else{
		wmode = "window";
	}*/
	if(wmode != "window"){
		wmode = "transparent";
	}

	// 전체창 초기값 설정
	if(fullscreen==true || fullscreen=="true"){
		fullscreen = "true";
	}else{
		fullscreen = "false";
	}


	// opening object tag for IE
	var str = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ";
	str += " codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ";
	str += " id='" + idname + "' ";
	str += "width='" + width + "' height='" + height + "' >";

		// param tags
		str += "	<param name='quality' value='high' />";
		str += "	<param name='allowScriptAccess' value='always' />";
		str += "	<param name='allowFullScreen' value='" + fullscreen + "' />";
		str += "	<param name='movie' value='" + path + "' />";
		str += "	<param name='wmode' value='" + wmode + "' />";
		str += "	<param name='flashVars' value='" + flashvars + "' />";

		// embed tag for none-IE
		str += "	<embed src='" + path + "' ";
		str += "		width='" + width + "' "
		str += "		height='" + height + "' ";
		str += "		flashVars='" + flashvars + "'";
		str += "		wmode='" + wmode + "'";
		str += "		name='" + idname + "' ";
		str += "		allowFullScreen='" + fullscreen + "' ";
		str += "		allowScriptAccess='always' swfLiveConnect='true' ";
		str += "		type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";

	// closing object tag
	str += "</object>";

	return str;

}

/**
 * 플래시 태그 입력하는 함수
 *
 * @param width 플래시 폭
 * @param height 플래시 높이
 * @param path SWF 파일 경로
 * @param flashvars 플래시로 전달할 파라메터
 * @param idname 플래시 오브젝트 ID, Name 프로퍼티
 * @param wmode 투명 설정
 * @param fullscreen 전체창 사용
 */
function insertFlashObject(width, height, path, flashvars, idname, wmode, fullscreen){

	var str = getFlashObjectString(width, height, path, flashvars, idname, wmode, fullscreen);
	document.write(str);

}

/**
 * 지정된 레이어에 플래시 태그 입력하는 함수
 *
 * @param layerid 플래시를 입력할 레이어 ID
 * @param width 플래시 폭
 * @param height 플래시 높이
 * @param path SWF 파일 경로
 * @param flashvars 플래시로 전달할 파라메터
 * @param idname 플래시 오브젝트 ID, Name 프로퍼티
 * @param wmode 투명 설정
 * @param fullscreen 전체창 사용
 */
function insertFlashObjectLayer(layerid, width, height, path, flashvars, idname, wmode, fullscreen){

	var str = getFlashObjectString(width, height, path, flashvars, idname, wmode, fullscreen);
	var theLayer = document.getElementById(layerid);
	theLayer.innerHTML = str;

}



/**
 * 일정시간 뒤 플래시 태그 입력하는 함수
 *
 * @param delay 지연할 시간 (밀리세컨드)
 * @param layerid 플래시를 입력할 레이어 ID
 * @param width 플래시 폭
 * @param height 플래시 높이
 * @param path SWF 파일 경로
 * @param flashvars 플래시로 전달할 파라메터
 * @param idname 플래시 오브젝트 ID, Name 프로퍼티
 * @param wmode 투명 설정
 * @param fullscreen 전체창 사용
 */
function insertFlashObjectDelay(delay, layerid, width, height, path, flashvars, idname, wmode, fullscreen){

	var expression = "insertFlashObjectLayer(";
	expression += "'" + layerid + "'";
	expression += ", '" + width + "'";
	expression += ", '" + height + "'";
	expression += ", '" + path + "'";
	expression += ", '" + flashvars + "'";
	expression += ", '" + idname + "'";
	expression += ", '" + wmode + "'";
	expression += ", '" + fullscreen + "'";
	expression += ");";

	setTimeout(expression, delay);

}

/**
 * 일정시간 뒤 대기중 플래시 태그 모두 입력하는 함수
 */
function insertFlashObjectWaiting(){


	// 대기중 목록에 있는 모든 플래시 오브젝트 입력
	var obj;
	while(flashObject_waiting_list.length > 0){
		obj = flashObject_waiting_list.shift();
		insertFlashObjectLayer(obj.layerid, obj.width, obj.height, obj.path, obj.flashvars, obj.idname, obj.wmode, obj.fullscreen);
	}

}
/********************************************************
	플래시 오브젝트 입력하기 위한 함수
********************************************************/



/********************************************************
	플래시에서 호출 하는 공통 함수
	2008-02-22 By Yeonok(UI Design)
********************************************************/
// Flash 사이즈 조절
function setSize(id, h, w){
	var obj = document.getElementById(id);
	if(h) obj.height = h;
	if(w) obj.width = w;
}


function setSizeLargeCate(id, h, w){
	var obj = document.getElementById(id);
	if(h) obj.height = h;
	if(w) obj.width = w;

//	obj = document.getElementById(cate_top);
//	if(h) obj.height = h;

//	obj = document.getElementById("brand_search");
//	if(top) obj.style.pixelTop = h;
//	if(left) obj.style.pixelLeft = left;

}
//	플래시

function divLayerSizeEdit(w, h)
{


	var obj	= document.getElementById('layerName');

	obj.style.width	= w;
	obj.style.height	= h;
}

