function setEmbed() {
	var obj = new String; 
	var parameter = new String; 
	var embed = new String; 
	var html = new String; 
	var allParameter = new String; 
	var clsid = new String; 
	var codebase = new String; 
	var pluginspace = new String; 
	var embedType = new String; 
	var src = new String; 
	var width = new String; 
	var height = new String; 

	this.init = function(getType , s ,w , h ) {
		if ( getType == "flash") {
			clsid = "D27CDB6E-AE6D-11CF-96B8-444553540000";
			codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"; 
			pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
			embedType = "application/x-shockwave-flash"; 
		}
		/* type Ãß°¡ 
		else if ( ) {
		} 
		*/

		parameter += "<param name='movie' value='"+ s + "'>\n";
		parameter += "<param name='quality' value='high'>\n";
		src = s;
		width = w;
		height = h;
	}

	this.parameter = function( parm , value ) {
		parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
		allParameter += " "+parm + "='"+ value+"'";
	}

	this.show = function() {
		if (clsid) {
			obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n";
		}

		embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n";

		if (obj) {
			embed += "</object>\n"; 
		}

		html = obj + parameter + embed;

		document.write(html);
	}
}

var win = null;

function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2: 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no, directories=no,resizeable=no,status=no,toolbar=no,menubar=no';
	win = window.open(mypage,myname,settings)
}

menu1_1 = new Image();
menu2_1 = new Image();
menu3_1 = new Image();
menu4_1 = new Image();
menu5_1 = new Image();
menu6_1 = new Image();
menu1_2 = new Image();
menu2_2 = new Image();
menu3_2 = new Image();
menu4_2 = new Image();
menu5_2 = new Image();
menu6_2 = new Image();

menu1_1.src="images/menu1_1.jpg";
menu2_1.src="images/menu2_1.jpg";
menu3_1.src="images/menu3_1.jpg";
menu4_1.src="images/menu4_1.jpg";
menu5_1.src="images/menu5_1.jpg";
menu6_1.src="images/menu6_1.jpg";
menu1_2.src="images/menu1_2.jpg";
menu2_2.src="images/menu2_2.jpg";
menu3_2.src="images/menu3_2.jpg";
menu4_2.src="images/menu4_2.jpg";
menu5_2.src="images/menu5_2.jpg";
menu6_2.src="images/menu6_2.jpg";

lname = new Array();
lname[0] = "sub0";
lname[1] = "sub1";
lname[2] = "sub2";

function change_img1(name,img,id) {
	iname = id;
	if(document.images) { document.images[name].src = eval(img + ".src");}

	for ( i = 0; i < 3; i++) {
		name1 = lname[i];

		if (document.layers) {
			document.layers[name1].visibility = "hide"; }
		else {
			document.all[name1].style.visibility = "hidden"; }
	}

	if (document.layers) {
		document.layers[iname].visibility = "show"; }
	else {
		document.all[iname].style.visibility = "visible"; }
}

function change_img2(name,img) {
	if(document.images) { document.images[name].src = eval(img + ".src");}
}


main_left1 = new Image();
main_left2 = new Image();
main_left3 = new Image();

main_left1.src="images/main_left1.jpg";
main_left2.src="images/main_left2.jpg";
main_left3.src="images/main_left3.jpg";

function change_left(name,img) {
	if(document.images) { document.images[name].src = eval(img + ".src");}
}



var sel1=3000;
var slide=true;
var cnt=0;
var currentImage=1;
var timeout=0;
var pic1= new Array();
var pic=new Array();
var p_title=new Array();

// ÀÌ¹ÌÁö ½½¶óÀÌµå´Â 1¹ø([1])ÀÌ ·Îµù½Ã ¿­¸®´Â ÆÄÀÏÀÌ¶ó 2([2])¹øºÎÅÍ ½ÃÀÛµÇ¸ç 0([0])¹øÀº ¹«½ÃµÇ´Â°Å °°¾Æ¼­ ¾ø¿¥

// Ãß°¡¹æ¹ý - X : ÀÌ¹ÌÁöÀÇ ¹øÈ£·Î 1¹øºÎÅÍ +1¾¿ Ãß°¡ÇÏ¸é µÊ
// pic1[X] = "ÀÌ¹ÌÁö °æ·Î";
// p_title[X] = "ÀÌ¹ÌÁö ¼³¸íºÎºÐ - htmlÅÂ±× µÊ";

// ÀÌ¹ÌÁö ½½¶óÀÌµå °æ·ÎºÎºÐ
	pic1[1] = "images/main_right_center.jpg";
	p_title[1] = "";
	pic1[2] = "images/main_right_center2.jpg";
	p_title[2] = "";
	pic1[3] = "images/main_right_center3.jpg";
	p_title[3] = "";

pic[1]=new Image();
pic[1].src=pic1[1];
isNext = false;

function p_speed() {
	sel=speedid.selectedIndex;
	sel1=speedid.options[sel].value;
}

function go() {
	if (!slide) {
		nextImage1();
	}
}

function loadImage(imgNum) {
	if (imgNum >= 0) {
		title1.innerHTML=p_title[currentImage];
	}

	if (slide && !isNext) {
		imgsrc.filters.blendTrans.apply();
		document.imgsrc.src= pic[imgNum].src;
		imgsrc.filters.blendTrans.duration=0.5;
		imgsrc.filters.blendTrans.play();
    	nextImage1();
	} else {
		document.imgsrc.src= pic[imgNum].src;
		isNext = false;
	}
}

function nextImage() {
	if (currentImage < pic.length-1) {
		currentImage++;
	} else {
		currentImage=1;
	}
    isNext = true;
    loadImage(currentImage);
}

function nextImage1() {
	if (currentImage < pic1.length-1) {
		currentImage++;
	} else {
		currentImage = 1;
	}
    slide = true;
    timeout = setTimeout("loadImage(currentImage)",sel1);
}

function preload() {
	for (i = 2; i < pic1.length; i++) {
		pic[i]=new Image();
		pic[i].src=pic1[i];
	}
}

function prevImage() {
	if (currentImage <= pic1.length-1) {
		currentImage--;
		if(currentImage < 1) {
		 	currentImage=currentImage+pic1.length;
	     	currentImage--;
	   	}
	}
    isNext = true;
    loadImage(currentImage)
}

function still() {
	clearTimeout(timeout);
	slide=false;
}

