//라운드테이블//
function roundTable(objID) {
var obj = document.getElementById(objID);
var Parent, objTmp, Table, TBody, TR, TD;
var bdcolor, bgcolor, Space;
var trIDX, tdIDX, MAX;
var styleWidth, styleHeight;

// get parent node
Parent = obj.parentNode;
objTmp = document.createElement('SPAN');
Parent.insertBefore(objTmp, obj);
Parent.removeChild(obj);

// get attribute
bdcolor = obj.getAttribute('rborder');
bgcolor = obj.getAttribute('rbgcolor');
radius = parseInt(obj.getAttribute('radius'));
if (radius == null || radius < 1) radius = 1;
else if (radius > 6) radius = 6;

MAX = radius * 2 + 1;

/*
create table {{
*/
Table = document.createElement('TABLE');
TBody = document.createElement('TBODY');

Table.cellSpacing = 0;
Table.cellPadding = 0;

for (trIDX=0; trIDX < MAX; trIDX++) {
TR = document.createElement('TR');
Space = Math.abs(trIDX - parseInt(radius));
for (tdIDX=0; tdIDX < MAX; tdIDX++) {
TD = document.createElement('TD');

styleWidth = '1px'; styleHeight = '1px';
if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
else if (radius > 2) {
if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
}

if (styleWidth != null) TD.style.width = styleWidth;
if (styleHeight != null) TD.style.height = styleHeight;

if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
else if (tdIDX > Space && Space < MAX - tdIDX - 1) TD.style.backgroundColor = bgcolor;

if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
TR.appendChild(TD);
}
TBody.appendChild(TR);
}

/*
}}
*/

Table.appendChild(TBody);

// insert table and remove original table
Parent.insertBefore(Table, objTmp);
}
//라운드테이블끝//

//플래시테두리//
function flash(src, w, h, bg, wmode){
var str = src.split('.');
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'  width='"+w+"' height='"+h+"' id='"+str[0]+"' align='middle'>");
document.write("<param name='movie' value='"+src+"' />");
document.write("<param name='quality' value='high' />");
document.write("<param name='bgcolor' value='"+bg+"' />");
if(wmode == "yes"){
	document.write("<param name='wmode' value='transparent' />");
}
document.write("<embed src='"+src+"' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+str[0]+"' align='middle'  type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.write("</object>");
}
//플래시테두리끝//

//오늘하루~//
function promotion_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 promotion_setCookie( name, value, expiredays )
{
var todayDate = new 
Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + 
todayDate.toGMTString() + ";"
}

function promotion_closeWin() 
{ 
if ( document.form1.promotion.checked )
	promotion_setCookie( "promotion", "done" , 1); 
// 1=하룻동안 열지 않음
	promotion.style.display='none'; 
}

function promotion_closeWin2() 
{ 
//if ( document.form1.promotion.checked )
	promotion_setCookie( "promotion", "done" , 1);
	self.close();
// 1=하룻동안 열지 않음
//	promotion.style.display='none'; 
}

function regSearch(){
	var regOk = confirm("즐겨찾기에 등록 하시겠습니까?");
	if ( regOk){
		window.external.AddFavorite('http://www.ethink.co.kr', '전문유학원 이싱크');
	}
}