//±âº» ÀÚ¹Ù½ºÅ©¸³Æ®
// ±âº» ¼³Á¤
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";
// ÁöÁ¤µÈ ´ë»óÀ» ã´Â´Ù.
function getRef(id)
{
if(isDOM) return document.getElementById(id);
if(isIE4) return document.all[id];
if(isNS4) return document.layers[id];
}
// ¹®ÀÚ¿ÀÇ ±æÀÌ
function strlen(str)
{
var len = 0;
for(i=0; i < str.length; i++)
{
var ch = str.charAt(i);
// 2bytes ¹®ÀÚ
if(escape(ch).length > 4)
{
len += 2;
}
// ÁÙ¹Ù²Þ Ç¥½Ã
else if(ch == '\n')
{
if(str.charAt(i-1) != '\r')
len += 1;
}
/*
// HTML ÅÂ±× º¯È¯ (<, >)
else if(ch == '<' || ch == '>')
{
len += 4;
}
*/
else
{
len += 1;
}
}
return len;
}
// ƯÁ¤±æÀÌÀ̳»·Î ¹®ÀÚ¿ ÀÚ¸£±â
function cut_str(str, limit)
{
var new_str = "";
var len = 0;
for(i=0; i < str.length; i++)
{
var ch = str.charAt(i);
// 2bytes ¹®ÀÚ
if(escape(ch).length > 4)
{
len += 2;
}
// ÁÙ¹Ù²Þ Ç¥½Ã
else if(ch == '\n')
{
if(str.charAt(i-1) != '\r')
len += 1;
}
/*
// HTML ÅÂ±× º¯È¯ (<, >)
else if(ch == '<' || ch == '>')
{
len += 4;
}
*/
else
{
len += 1;
}
if(len > limit)
break;
new_str += ch;
}
return new_str;
}
// ¹öư ¸¸µé±â
//
function button(func, text, icon, width, type)
{
if(icon)
icon = "
";
else
icon = "";
var button_style = "background-color:transparent; color:transparent; cursor:hand; border:none; width:" + width;
var btn = "";
if(type == "a")
{
// A Type
btn += "";
}
else if(type == "b")
{
// B Type
btn += "";
}
else
{
// Default Type
btn += "";
}
document.write(btn);
}
// ¹Ù·Î°¡±â ¹öư ¸¸µé±â
function go_button(url, text, icon, width, type)
{
if(url)
{
button("document.location.href='" + url + "'", text, icon, width, type);
}
}
// »õâ ¿±â
function open_window(url, title, option)
{
window.open(url, title, option);
}
// »õâ ¿±â
function newWindow(url, title, option)
{
window.open(url, title, option);
}
// ¾Ù¹üº¸±â
function albumWindow(url, title, option)
{
window.open(url, title, option + ',top=0,left=0,width=780,height=580,scrollbars=yes,status=yes,resizable');
}
// ƯÁ¤ ÄÚµå Ãâ·Â
function write_tag(tag)
{
document.write(tag);
}
// Ç÷¡½Ã ÄÚµå Ãâ·Â
function write_flash(movie, width, height, quality, scale, wmode, FlashVars)
{
var tag = "";
document.write(tag);
}