//Å¸ÀÌÆ²//
document.write ("<title>(ÁÖ)½ÅÈ£½Ã½ºÅÛ</title>")

// Å×ÀÌºí º¸¿©ÁÜ
function ShowTable(sty){
	document.all[sty].style.display='';
}

// Å×ÀÌºí ¼û±è
function HideTable(sty){
	document.all[sty].style.display='none';
}

//ÇÃ·¡½ÃÆÄÀÏ//

//flash
function flash_contents(file, width, height){
	document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' ALIGN=''>");
	document.writeln("<PARAM NAME=movie value='"+file+"' />");
	document.writeln("<PARAM NAME=quality VALUE=high>");
	document.writeln("<PARAM NAME=bgcolor VALUE=#FFFFFF>");
	document.writeln("<PARAM NAME=wmode VALUE=transparent> ");
	document.writeln("<embed src='"+file+"' quality='high' bgcolor='#FFFFFF' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.writeln("</OBJECT>");
}

//µ¿¿µ»ó
function tv_adplay(file, width, height, mediaName) {
	document.write('<OBJECT ID="'+mediaName+'" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+width+'" height="'+height+'">')
	document.write('	<param name="autoStart" value="true">')
	document.write('	<param name="balance" value="0">')
	document.write('	<param name="enableContextMenu" value="">')
	document.write('	<param name="ShowControls" value="true">')
	document.write('	<param name="enabled" value="true">')
	document.write('	<param name="fullScreen" value="">')
	document.write('	<param name="mute" value="">')
	document.write('	<param name="playCount" value="1">')
	document.write('	<param name="rate" value="1.0">')
	document.write('	<param name="SAMIFileName" value="">')
	document.write('	<param name="SAMILang" value="">')
	document.write('	<param name="SAMIStyle" value="">')
	document.write('	<param name="stretchToFit" value="">')
	document.write('	<param name="URL" value="'+file+'">')
	document.write('	<param name="volume" value="50">')
	document.write('</OBJECT>')
}
	
//µ¿¿µ»ó autosize
function tv_adplay_autosize(file, mediaName) {
	document.write('<OBJECT ID="'+mediaName+'" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">')
	document.write('	<param name="autoStart" value="true">')
	document.write('	<param name="balance" value="0">')
	document.write('	<param name="enableContextMenu" value="">')
	document.write('	<param name="ShowControls" value="true">')
	document.write('	<param name="enabled" value="true">')
	document.write('	<param name="fullScreen" value="">')
	document.write('	<param name="mute" value="">')
	document.write('	<param name="playCount" value="1">')
	document.write('	<param name="rate" value="1.0">')
	document.write('	<param name="SAMIFileName" value="">')
	document.write('	<param name="SAMILang" value="">')
	document.write('	<param name="SAMIStyle" value="">')
	document.write('	<param name="stretchToFit" value="">')
	document.write('	<param name="URL" value="'+file+'">')
	document.write('	<param name="volume" value="50">')
	document.write('	<param name="AutoSize" value="true">')
	document.write('</OBJECT>')
}
//--------------------------------------------------------------

function active_source(source) {
	document.write(source);
}
//ÇÃ·¡½ÃÆÄÀÏ//



function go(url)
{
	location.href=url;
}


// ÆË¾÷ °ü·Ã ½ÃÀÛ

function startTime(cName, cMain, layerTop, layerLeft, layerWidth, layerHeight, type) {

	cookieIndex = getCookie(cName);
	if ( !cookieIndex || type == "0") {     
		document.getElementById(cName).style.visibility = "visible";
	} else {
		document.getElementById(cName).style.visibility = "hidden";
	}

    document.getElementById(cName).style.top = layerTop+"px";
    document.getElementById(cName).style.left = layerLeft+"px";
    document.getElementById(cName).style.width = layerWidth+"px";
    document.getElementById(cMain).style.height = layerHeight+"px";
}

function setCookie( name, value ) {
	var expiredays = 1;			//°øÁöÃ¢ ÇÏ·ç ¾È¶ç¿ì±â ½Ã°£. 1Àº ÇÏ·çÀÓ
	var todayDate = new Date();
	todayDate.setDate(todayDate.getDate() + expiredays);
	document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeLayer(cName, chkbox, type) {
    if ( chkbox.checked ) {
		setCookie(cName, "os");
	}
	if (type == "1") {
		document.getElementById(cName).style.visibility = "hidden";
	} else {
		window.close();
	}
}

isIE  = document.all;
isNN  = !document.all && document.getElementById;
isN4  = document.layers;

var max_zindex = 30;
function drag( mode,e,obj ) {
    if ( mode == 'start' ) {
		obj.offsetx = isIE ? event.clientX : e.clientX;
		obj.offsety = isIE ? event.clientY : e.clientY;

		obj.nowX    = parseInt(obj.style.left);
		obj.nowY    = parseInt(obj.style.top);
		obj.dragable = '1';

		var new_zindex = max_zindex + 1;
		obj.style.zIndex = new_zindex;
		max_zindex = new_zindex;
	} else if ( mode == 'move' ) {
		if ( obj.dragable == '1' ) {
			var x = isIE ? (obj.nowX + event.clientX - obj.offsetx) : (obj.nowX + e.clientX - obj.offsetx);
			var y = isIE ? (obj.nowY + event.clientY - obj.offsety) : (obj.nowY + e.clientY - obj.offsety);
			var max_winw = document.body.clientWidth - parseInt(obj.style.width);
			var max_winh = document.body.clientHeight - parseInt(obj.style.height);

			if ( x >= 0 && x <=max_winw ) obj.style.left = x;
			if ( y >= 0 && y <=max_winh ) obj.style.top  = y;
		}
	} else if ( mode == 'stop' ) {
		obj.dragable='0'
	}
}

function getCookie( name ) {
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ) {
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
			endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}

		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
		break;
    }
    return "";
}

// ÆË¾÷Ã¢ °£´ÜÇÑ ¸®»çÀÌÁî
function win_resize(ww, hh){
	resizeTo(200,200);
	var w = document.body.scrollWidth;
	var h = document.body.scrollHeight;

//		tmp_size = (w > tmp_w) ? tmp_w+20 : w;
//		tmp_size2 = (h > tmp_h) ? tmp_h+20 : h;

	resizeTo(w+ww,h+hh);
}


// ÆË¾÷ °ü·Ã ³¡

