// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win){

 var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
 if(vars==null) vars='';
 if(bg==null) bg='#FFFFFF';
 if(win==null) win='transparent';
 function BrowserCheck() {
 appname = navigator.appName;
 useragent = navigator.userAgent;
 if(appname == "Microsoft Internet Explorer") appname = "IE";
 IE55 = (useragent.indexOf('MSIE 5.5')>0); //5.5 ¹öÀü
 IE6 = (useragent.indexOf('MSIE 6')>0); //6.0 ¹öÀü

 if(appname=="IE" && IE55 || IE6) vars = 'ieVer=6'; //ÀÍ½ºÇÃ·Î·¯ÀÌ¸é¼­ 5.5 or 6.0 ¹öÀüÀÌ¸é...
 else vars= 'ieVer=7';
 }
 onload=BrowserCheck;




 // ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
 var flashStr= " <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
 flashStr+=" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
 flashStr+=" width='"+w+"'";
 flashStr+=" height='"+h+"'";
/*¹ÚÃ¶Æò»èÁ¦ ¸¶Áø°ú ÆÐµùÀÌ µÎ¹øÀû¿ëµÊ*/
/* flashStr+=" id='"+id+"'";*/
 flashStr+=" align='middle'>";

 flashStr+=" <param name='allowScriptAccess' value='always' />";
 flashStr+=" <param name='movie' value='"+url+"' />";
 flashStr+=" <param name='FlashVars' value='"+vars+"' />";
 flashStr+=" <param name='wmode' value='"+win+"' />";
 flashStr+=" <param name='menu' value='false' />";
 flashStr+=" <param name='quality' value='high' />";
 flashStr+=" <param name='bgcolor' value='"+bg+"' />";
 flashStr+=" <param name='base' value='.' />";


 flashStr+=" <embed base ='.' src='"+url+"'";
 flashStr+=" flashVars='"+vars+"'";
 flashStr+=" wmode='"+win+"'";
 flashStr+=" menu='false'";
 flashStr+=" quality='high'";
 flashStr+=" bgcolor='"+bg+"'";
 flashStr+=" width='"+w+"'";
 flashStr+=" height='"+h+"'";
 flashStr+=" name='"+id+"'";
 flashStr+=" align='middle'";
 flashStr+=" allowScriptAccess='always'";
 flashStr+=" type='application/x-shockwave-flash'";
 flashStr+=" pluginspage='http://www.macromedia.com/go/getflashplayer' />";
 flashStr+=" </object>";

 // ÇÃ·¡½Ã ÄÚµå Ãâ·Â
 document.write(flashStr);
}

/* MyStyle Flash Show */
function styleShow(no){
 $("style_flash_main").style.display = "none";
 for( var i=1; i<=4; i++){
 if(no == i){
 $("style_flash_sub_"+i).style.display = "block";
 }else{
 $("style_flash_sub_"+i).style.display = "none";
 }
 }
}
/* Happy Artist Flash Show */
function artistShow(no){

 $("artist_flash_main").style.display = "none";
 for( var i=1; i<=4; i++){
 if(no == i){
 $("artist_flash_sub_"+i).style.display = "block";
 }else{
 $("artist_flash_sub_"+i).style.display = "none";
 }
 }

}

//µ¿¿µ»ó
function aviPlay(src,w,h) {
document.write('<embed src="'+src+'" width='+w+' height='+h+'>')
}

function flashWrite2(url,w,h,id,bg,vars,win){
	var invest="<invest><contents idx=\"53201\" code=\"ath\" path=\"/swf/main/img/1_1.jpg\"/><contents idx=\"53202\" code=\"bth\" path=\"/swf/main/img/1_2.jpg\"/><contents idx=\"53203\" code=\"cth\" path=\"/swf/main/img/1_3.jpg\"/></invest>";
	var live="<live><contents idx=\"53204\" code=\"dth\" path=\"/swf/main/img/2_1.jpg\"/><contents idx=\"53205\" code=\"eth\" path=\"/swf/main/img/2_2.jpg\"/><contents idx=\"53206\" code=\"fth\" path=\"/swf/main/img/2_3.jpg\"/></live>";
	var finane="<finance><contents idx=\"53207\" code=\"gth\" path=\"/swf/main/img/3_1.jpg\"/><contents idx=\"53208\" code=\"hth\" path=\"/swf/main/img/3_2.jpg\"/><contents idx=\"53209\" code=\"ith\" path=\"/swf/main/img/3_3.jpg\"/></finance>";
	
	var flashStr=
		"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
		"<param name='allowScriptAccess' value='always' />"+
		"<param name='movie' value='"+url+"?invest="+invest+"&live="+ live +"&finance="+ finane +"' />"+
		"<param name='FlashVars' value='"+vars+"' />"+
		"<param name='wmode' value='"+win+"' />"+
		"<param name='menu' value='false' />"+
		"<param name='quality' value='high' />"+
		"<param name='bgcolor' value='"+bg+"' />"+
		"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
		"</object>";

 // ÇÃ·¡½Ã ÄÚµå Ãâ·Â
 document.write(flashStr);

}

//ÆË¾÷
function GoUrl(url, width, height, scroll)
{
	window.open (url,"GoUrl","width="+width+"&, height="+height+"&, scrollbars=yes, menubars=no, toolbars=no");
}

//ÇÃ·¡½¬ ¸µÅ©
function Link(num) {
	switch(num) {
		case 0: document.location.href="/brandroom/skybori/main.asp"; //È¨À¸·Î (ÇÏ´Ãº¸¸®)
			break;
	}
}

function topmenu(num) {
	switch(num) {
		case 1: document.location.href="/index.asp"; //¿õÁøÄ¿¹Â´ÏÆ¼
			break;
		case 2: document.location.href="/brandroom/skybori/main.asp"; //ÇÏ´Ãº¸¸® *** ÇØ´ç»çÀÌÆ®
			break;
		case 3: document.location.href="/brandroom/nature/main.asp"; //ÀÚ¿¬Àº
			break;
	}
}

function quicktop(num) {
	switch(num) {
		case 1: document.location.href="http://company.wjfood.co.kr"; //±â¾÷¼Ò°³
			break;
		case 2: document.location.href="http://shop.wjfood.co.kr"; //ÇÞ»ì e-shop
			break;
	}
}

function quick(num) {
	switch(num) {
		case 1: document.location.href="/brandroom/skybori/main.asp"; //ÇÏ´Ãº¸¸® *** ÇØ´ç»çÀÌÆ®
			break;
		case 2: document.location.href="/brandroom/nature/main.asp"; //ÀÚ¿¬Àº
			break;
		case 3: window.open('http://www.wjfood.co.kr/history/history.htm','','top=50,left=100, height=600, width=800, scrollbars=no'); //¿ª»ç°ü
			break;
		case 4: document.location.href="http://company.wjfood.co.kr/pr/e-book.asp"; //e-»çº¸
			break;
		case 5: document.location.href="http://company.wjfood.co.kr/costomer/agent.asp"; //´ë¸®Á¡Àå, ¿µ¾÷»ç¿ø¸ðÁý
			break;
	}
}

function footer(num) {
	switch(num) {
		case 1: GoUrl('http://wjfood.co.kr/pop/agreement.asp','500','600','yes'); //ÀÌ¿ë¾à°ü
			break;
		case 2: GoUrl('http://wjfood.co.kr/pop/protection.asp','500','600','yes'); //°³ÀÎÁ¤º¸º¸È£Á¤Ã¥
			break;
		case 3: GoUrl('http://wjfood.co.kr/pop/email.asp','500','382','no'); //¹«´ÜÀÌ¸ÞÀÏÁý´Ü°ÅºÎ
			break;
		case 4: window.open('http://company.wjfood.co.kr/costomer/guide.asp'); //¼ÒºñÀÚº¸È£½Ç
			break;
	}
}

// ÆîÄ§¸Þ´º
// 2006.11.26 Ãß°¡ ±è¹ÎÁ¤
function ShowHide(num) {
	var obj = document.all;
	
	for (var i = 0; i < obj.length; i++) {
		if (obj[i].id.substr(0, 4) == "_SH_") {
			obj[i].style.display = "none";
		}

		if (parseInt(obj[i].id.substr(4, obj[i].id.length)) == num) {
			obj[i].style.display = "";
		}
	}
}


<!--- ¹ÚÃ¶Æò Ãß°¡ ---->
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

var dragswitch=0
var nsx
var nsy
var nstemp

function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}

function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmouseup=new Function("dragapproved=false")

function hidebox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}

