/**
 * <pre>
 * ¹®ÀÚ¿­ Valid °Ë»çÃ³¸®
 * StringÀÌ "" ÀÌ³ª nullÀÌ¸é ¹«Á¶°Ç false
 * ¸¸¾à space ÀÎ¼öÀÇ °ªÀÌ trueÀÌ¸é
 * StringÀÌ "" ÀÌ³ª nullÀÌ ¾Æ´Ò¶§ space°¡ ÀÖ¾î¾ß¸¸ true
 * ¸¸¾à space ÀÎ¼öÀÇ °ªÀÌ falseÀÌ¸é
 * stringÀÌ "" ÀÌ³ª nullÀÌ ¾Æ´Ò¶§ space°¡ ¾Æ´Ñ ±ÛÀÚ°¡ ÀÖ¾î¾ß¸¸ true
 * </pre>
 * @param str ¹®ÀÚ¿­
 * @param space spaceÇã¿ë ¿©ºÎ (true, false)
 * @return boolean
 */
function checkValid(str, space){

   var retvalue = false;

   for (var i=0; i<str.length; i++)
   {		//StringÀÌ 0("" ÀÌ³ª null)ÀÌ¸é ¹«Á¶°Ç false
      if (space == true)
      {
         if (str.charAt(i) == ' ')
         {			//StringÀÌ 0ÀÌ ¾Æ´Ò¶§ space°¡ ÀÖ¾î¾ß¸¸ true(valid)
            retvalue = true;
            break;
         }
      } else {
         if (str.charAt(i) != ' ')
         {			//stringÀÌ 0ÀÌ ¾Æ´Ò¶§ space°¡ ¾Æ´Ñ ±ÛÀÚ°¡ ÀÖ¾î¾ß¸¸ true(valid)
            retvalue = true;
            break;
         }
      }
   }

   return retvalue;
}

/**
 * <pre>
 * field Empty ¹× °ø¹é Ã³¸®
 * error_msg°¡ ""ÀÌ¸é alert¿Í focusingÀ» ÇÏÁö ¾Ê´Â´Ù
 * </pre>
 * @param field form.element
 * @param error_msg ¿¡·¯ Message
 * @return boolean
 */
function isEmpty(field, error_msg)
{
	// error_msg°¡ ""ÀÌ¸é alert¿Í focusingÀ» ÇÏÁö ¾Ê´Â´Ù
	if(error_msg == "") {
		if(!checkValid(field.value, false)) {
			return true;
		} else {
			return false;
		}
	} else {
		if(!checkValid(field.value, false)) {
			alert(error_msg);
			field.focus() ;
			return true;
		} else {
			return false;
		}
	}
}

/**
 * <pre>
 * ÇÊµå(String) ±æÀÌ¸¦ °¡Á®¿Â´Ù
 * ÇÑ±Û ÇÑ±ÛÀÚ¸¦ 2byte·Î ÀÎ½ÄÇÏ¿©, IEµç Netscapeµç Á¦´ë·Î byte±æÀÌ¸¦ ±¸ÇØ ÁÝ´Ï´Ù.
 * </pre>
 * @param field form.element
 * @return int elementÀÇ  value byte Å©±â
 */
function getByteLength(field){
   var len = 0;
   var s = field.value;
   if ( s == null ) return 0;
   for(var i=0;i<s.length;i++){
      var c = escape(s.charAt(i));
      if ( c.length == 1 ) len ++;
      else if ( c.indexOf("%u") != -1 ) len += 2;
      else if ( c.indexOf("%") != -1 ) len += c.length/3;
   }
   return len;
}

/***************************** ¸µÅ© ÁÖº¯ Á¡¼± ¾ø¾Ö±â ****************************************************/
var myAnchors=document.all.tags("A");
function allblur() {
    try{
    	for (i=0;i<myAnchors.length;i++) {
    		myAnchors[i].onfocus=new Function("blur()");
    	}
	}catch(e){}
}
allblur();
var bii = 0;
function bluring(){
    try{
        if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
    }catch(e){}
}
document.onfocusin=bluring;
/*********************************************************************************************************/



/***************************** ·¹ÀÌ¾î ¸Þ´º ****************************************************************/
/*
function view_item(num)
{
	var item = new Array();

	item[0] = SUB_1;
	item[1] = SUB_2;
	item[2] = SUB_3;
	item[3] = SUB_4;
	item[4] = SUB_5;
	item[5] = SUB_6;
	item[6] = SUB_7;

	for(var i=0 ; i<item.length ; i++)
	{
		if (i == num && eval(item[i].value) == 0)
		{
			item[i].style.display = '';
			item[i].value = 1;
		}
		else if (i == num && eval(item[i].value) == 1)
		{
			item[i].style.display = 'none'
			item[i].value = 0;
		}
		else
		{
			item[i].style.display = 'none';
			item[i].value = 0;
		}
	}
}
*/

function view_item3(num)
{
	var menu = new Array();
	var content = new Array();

	menu[0] = menu_01;
	menu[1] = menu_02;
	menu[2] = menu_03;
	menu[3] = menu_04;

	content[0] = content_01;
	content[1] = content_02;
	content[2] = content_03;
	content[3] = content_04;

	for(var i=0 ; i<menu.length ; i++)
	{
		if (i == num) {
			menu[i].style.display = '';
			content[i].style.display = '';
		}
		else {
  			menu[i].style.display = 'none';
			content[i].style.display = 'none';
		}
	}
}
/********************************************************************************************************/




/****************************************** ÀÌ¹ÌÁö¿À¹ö °ü¸® ***********************************************/
function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("on.gif", ".gif");
}
function imageOver2(imgEl) {
	imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
}
function imageOut2(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
}
/**********************************************************************************************************/


/********************************************* ÆË¾÷ ********************************************************/
function open_popup(url, wid, hei, scroll, winName)
{
	var url = url;
	var posi = "width="+ wid +",height="+hei+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	if (winName == "")
	{
		winName = popup;
	}
	window.open(url,winName,posi);
}
/**********************************************************************************************************/



/******************************* TR ¿À¹ö½Ã »ö»óº¯È­ - ÇÔ¼ö·Î Á¤ÀÇ ********************************************/
function overColor(tr_Name){
tr_Name.style.backgroundColor="#B6295F";//¸¶¿ì½º°¡ ¿Ã¶ó°¬À»¶§ÀÇ »ö»ó ¼³Á¤
}
function overColor_2(tr_Name){
tr_Name.style.backgroundColor="#F40F67";//¸¶¿ì½º°¡ ¿Ã¶ó°¬À»¶§ÀÇ »ö»ó ¼³Á¤
}

function outColor(tr_Name){
tr_Name.style.backgroundColor="#E45B90";//¸¶¿ì½º°¡ ³»·Á¿ÔÀ»¶§ÀÇ »ö»ó ¼³Á¤
}
function outColor_2(tr_Name){
tr_Name.style.backgroundColor="#FA9BC0";
}
/**************************************************************************************************************/


//À©µµ¿ìÃ¢ »çÀÌÁî °­Á¦ ¼³Á¤
function reSizeWin(nWidth,nHeight){
this.focus();
this.resizeTo((eval(nWidth)+10), (eval(nHeight)+28));
}



// ¹è³Ê ÀÌ¹ÌÁö Å©±â °Ë¼ö
function checkSize(imgobj)
{
 var limX = 116;
 var limY = 30;
 var img = new Image();
 img.src = imgobj.value;

 if(img.width != limX || img.height != limY )
 {
  alert("ÀÌ¹ÌÁö Å©±â´Â °¡·Î " + limX + ", ¼¼·Î " + limY + " Å©±âÀÇ ÀÌ¹ÌÁö¸¸ ¾÷·Îµå ÇÒ ¼ö ÀÖ½À´Ï´Ù.");
  imgobj.value = "http://";
 }

}

function goBrandList(category_id)
{
	if(category_id!="")
		self.location.href = "/shopping/brand.jsp?category_id=" + category_id;

	return
}

/** Constants. */
var MSG_WIN_CLOSE = "Ã¢À» ´ÝÀ¸½Ã°Ú½À´Ï±î?";
/** Constants. */

/**
 * Checks the field is empty. 'field' includes the text box, select, radio and check box.
 *
 * Return : true if the field has an empty value
 * Argument :
 *  + field : the form field (the text box, select, radio and check box)
 *  + error_msg : an error message
 */
function isEmpty(field, error_msg)
{
	if(field == null) {
		alert("[isEmpty] There is no such field. Check it."); return true;
	}

	var bEmpty = false;

	var isSelect = (field.type == "select-one");
	var isRadioS = (field.type == "radio"); // single
	var isChkboxS = (field.type == "checkbox"); // single
	var isRadio = (field.length > 1 && field[0].type == "radio"); // greater than 1
	var isChkbox = (field.length > 1 && field[0].type == "checkbox"); // greater than 1

	if(isSelect) {
		if(field.selectedIndex == -1)
			bEmpty = true;
	}
	else if(isRadioS || isChkboxS) {
		bEmpty = !(field.checked);
	}
	else if(isRadio || isChkbox) {
		var bTmp = true;
		for(i = 0; i < field.length; i++) {
			if(field[i].checked == true) {
				bTmp = false;
			}
		}
		if(bTmp) bEmpty = true;
	}
	else if(field.value == "") {
		bEmpty = true;
	}

	if(bEmpty) {
		alert(error_msg);

		if(isRadio) field[0].focus();
		else field.focus();

		if(!isRadio && !isSelect) field.select();

		return true;
	} else {
		return false;
	}
}

function isEmptySelect(field, error_msg)
{
	if(field == null) {
		alert("[isEmpty] There is no such field. Check it."); return true;
	}

	var bEmpty = false;

	var isSelect = (field.type == "select-one");
	var isRadio = (field.length > 1 && field[0].type == "radio"); // greater than 1

	if(isSelect) {
		if(field.selectedIndex < 1)
			bEmpty = true;
	}

	if(bEmpty) {
		alert(error_msg);

		if(!isRadio && !isSelect) field.select();

		return true;
	} else {
		return false;
	}
}

/**
 * Checks the field has a numeric value.
 *
 * Return : true if the field has a numeric value
 * Argument :
 *  + field : the form field
 *  + error_msg : an error message
 */
function isNumeric(field, error_msg)
{
	return checkNumber(field, error_msg);
}

/**
 * Checks the string is alphanumeric.
 *
 * Return : true if the string is alphanumeric
 * Argument :
 *  + str : the string
 */
function isAlphaNumeric(str)
{
	var check = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$^*()_\+-=||{}[]:;<>?/\\";

	for(i = 0; i < str.length; i++) {
		var ch = str.charAt(i);

		for(j = 0; j < check.length; j++)
			if(ch == check.charAt(j))
				break;

		if(j == check.length) return false;
	}

	return true;
}

/**
 * Checks the string is alphabet.
 *
 * Return : true if the string is alphabet
 * Argument :
 *  + str : the string
 */
function isAlpha(str)
{
	var check = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

	for(i = 0; i < str.length; i++) {
		ch = str.charAt(i);

		for(j = 0; j < check.length; j++)
			if(ch == check.charAt(j)) break;

		if(j == check.length) return false;
	}

	return true;
}

/**
 * Checks the value is positive.
 *
 * Return : true if the value is positive
 * Argument :
 *  + val : the value
 */
function isPositive(val)
{
	if(parseFloat(val) > 0)
		return true;
	else
		return false;
}

/**
 * Checks the field has a numeric value.
 *
 * Return : true if the field has a numeric value
 * Argument :
 *  + field : the form field
 *  + error_msg : an error message
 */
function checkNumber(field, error_msg)
{
	if(isNaN(field.value)) {
		alert(error_msg);

		field.focus();
		field.select();

		return false;
	} else {
		return true;
	}
}

/**
 * Checks the item by its value.
 *
 * Return :
 * Argument :
 *  + field : the field (the radio and check box)
 *  + value : the value
 */
function check(field, value)
{
	for(i = 0; i < field.length; i++) {
		if(value == field[i].value)
			field[i].checked = true;
	}
}

/**
 * Checks all items in the radio and check box.
 *
 * Return :
 * Argument :
 *  + field : the field (the radio and check box)
 */
function checkAll(field)
{
	for(i = 0; i < field.length; i++) {
		field[i].checked = true;
	}
}

/**
 * Unchecks the item by its value.
 *
 * Return :
 * Argument :
 *  + field : the field (the radio and check box)
 *  + value : the value
 */
function uncheck(field, value)
{
	for(i = 0; i < field.length; i++) {
		if(value == field[i].value)
			field[i].checked = false;
	}
}

/**
 * Unchecks all items in the radio and check box.
 *
 * Return :
 * Argument :
 *  + field : the field (the radio and check box)
 */
function uncheckAll(field)
{
	for(i = 0; i < field.length; i++) {
		field[i].checked = false;
	}
}

/**
 * Returns the selected value in the radio and check box. Returns the first selected value in the case of check box.
 *
 * Return : the selected value
 * Argument :
 *  + field : the field (the radio and check box)
 */
function getSelectedValue(field)
{
	for(i = 0; i < field.length; i++) {
		if(field[i].checked == true)
			return field[i].value;
	}

	return null;
}

/**
 * Returns the selected values in the radio and check box.
 *
 * Return : the selected values
 * Argument :
 *  + field : the field (the radio and check box)
 */
function getSelectedValues(field)
{
	var ret = null;
	var cnt = 0;

	for(i = 0; i < field.length; i++) {
		if(field[i].checked == true) {
			if(ret == null)
				ret = new Array();
			ret[cnt++] = field[i].value;
		}
	}

	return ret;
}

/**
 * Formats the value in the format of currency.
 *
 * Return : the value in the format of currency ("1,234,567")
 * Argument :
 *  + val : the value ("1234567")
 */
function formatCurrency(val)
{
	var modulus = val.length % 3;
	var currencyStr = val.substr(0, modulus);

	for(i = modulus; i < val.length; i = i + 3) {
		if(currencyStr != "")
			currencyStr += ",";
		currencyStr += val.substr(i, 3);
	}

	return currencyStr;
}

/**
 * Displays a message according to its type.
 *
 * Return :
 * Argument :
 *  + msg : a message
 *  + msgtype : the message type ::= 2 (alert) | 3 (confirm)
 */
function msg(msg, msgtype)
{
	if(msgtype == 2) // alert
		return alert(msg);
	else if(msgtype == 3) // confirm
		return confirm(msg);
	else
		return msg;
}

/**
 * Refreshes the current location.
 *
 * Return :
 * Argument :
 *  + win : a window object
 */
function refresh(win)
{
	// The argument to the location.reload function determines if the browser should retrieve the document from the web-server.
	win.location.reload(true);
}

/**
 * Closes the window.
 *
 * Return :
 * Argument :
 *  + isConfirm : whether or not to request a confirmation
 */
function closeWindow(isConfirm)
{
	var isClose = true;

	if(isConfirm == true) {
		isClose = confirm(MSG_WIN_CLOSE);
	}

	if(isClose)
		top.close(); // window.close() doesn't operate in frame
}

/**
 * Opens a new window.
 *
 * Return :
 * Argument :
 *  + file : the file to be displayed
 *  + width : the width of the new window
 *  + height : the height of the new window
 */
function openWindow(file, width, height)
{
	var win = window.open(file, '', "width=" + width + ",height=" + height);
}

/**
 * Opens a new window given style.
 *
 * Return :
 * Argument :
 *  + file : the file to be displayed
 *  + style : the style of the new window
 */
function openWindowWithStyle(file, style)
{
	var win = window.open(file, "", style);
}

/**
 * Opens a new pop-up window.
 *
 * Return :
 * Argument :
 *  + file : the file to be displayed
 *  + width : the width of the new window
 *  + height : the height of the new window
 */
function openPopupWindow(file, width, height)
{
	var win = window.open(file, "", "menubar=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height);
}

/**
 * Opens a new modal dialog window. (above IE 4.0)
 *
 * Return : a return value
 * Argument :
 *  + file : the file to be displayed
 *  + width : the width of the new window
 *  + height : the height of the new window
 */
function openModalDialog(file, width, height)
{
	return window.showModalDialog(file, null, "dialogWidth: " + width + "px; dialogHeight: " + height + "px; resizable: no; scroll: no;");
}

/**
 * Opens a new modal dialog window given style. (above IE 4.0)
 *
 * Return : a return value
 * Argument :
 *  + file : the file to be displayed
 *  + style : the style of the new window
 */
function openModalDialogWithStyle(file, style)
{
	return window.showModalDialog(file, null, style);
}

/**
 * Resets the form.
 *
 * Return :
 * Argument :
 *  + frm : the form object
 */
function reset(frm)
{
	frm.reset();
}

/**
 * Returns the current date.
 *
 * Return : the current date
 * Argument :
 *  + delim : the delimiter, if "-", yyyy-mm-dd
 */
function getDate(delim)
{
	var today = new Date();

	var ret = today.getYear() + delim;

	var month = today.getMonth() + 1;
	if(month < 10)
		ret += "0" + month + delim;
	else
		ret += month + delim;

	var date = today.getDate();
	if(date < 10)
		ret += "0" + date;
	else
		ret += date;

	return ret;
}

/**
 * Returns the current date in full format.
 *
 * Return : the current date in full format
 * Argument :
 */
function getFullDate()
{
	return new Date().toLocaleString();
}

/**
 * Checks the date.
 *
 * Return : true if the string is a date format
 * Argument :
 *  + str : the string (yyyymmdd, yyyy/mm/dd, yyyy-mm-dd)
 */
function isDate(str)
{
	var arrDate;

	if(str == "") return false;

	if(str.indexOf("-") != -1) arrDate = str.split("-");
	else if(str.indexOf("/") != -1) arrDate = str.split("/");
	else {
		if(str.length != 8) return false;
		str = str.substring(0, 4) + "/" + str.substring(4, 6) + "/" + str.substring(6, 8);
		arrDate = str.split("/");
	}

	if(arrDate.length != 3) return false;

	var chkDate = new Date(arrDate[0] + "/" + arrDate[1] + "/" + arrDate[2]);
	if(isNaN(chkDate) == true || (arrDate[1] != chkDate.getMonth() + 1 || arrDate[2] != chkDate.getDate()))
		return false;

	return true;
}

String.prototype.reverse = function() {
    var s = "";
    var i = this.length;
    while (i>0) {
        s += this.substring(i-1,i);
        i--;
    }
    return s;
}

// this trim was suggested by Tobias Hinnerup
String.prototype.trim = function() {
  return(this.replace(/^\s+/,'').replace(/\s+$/,''));
}

String.prototype.toInt = function() {
    var a = new Array();
    for (var i = 0; i < this.length; i++) {
        a[i] = this.charCodeAt(i);
    }
    return a;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function checkSpace( str )
{
     if(str.search(/\s/) != -1){
      return true;
     } else {
         return false;
     }
}

//°ø¹éÁ¦°Å ÇÔ¼ö
function java_both_trim(a) {
	var search = 0
	while ( a.charAt(search) == " ") {
		search = search + 1
	}
	a = a.substring(search, (a.length))
	search = a.length - 1

	while (a.charAt(search) ==" "){
		search = search - 1
	}
	return a.substring(0, search + 1)
}
//null°ª Ã¼Å©
function f_nul_chk(obj,lbl){
	if( java_both_trim(obj.value) == '' ){
		alert(lbl+'ÀÔ·ÂÇØÁÖ½Ê½Ã¿ä');
		obj.focus();
		return true;
	}
	return false;
}

// ±âÈ¹Àü°¡±â
function goShop(obj)
{
	var isSelect = (obj.type == "select-one");
	var value = (isSelect) ? obj.options[obj.selectedIndex].value : obj;

	if(value!='')
		window.location.href = "/shopping/specialShopList.jsp?shop_id=" + value;
}


// iframe resize function
function reSize(frm,frmNm,orgHeightSize)
{
	var objBody = frm.document.body;
	var objFrame = document.all[frmNm];
	var chgHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
	if( orgHeightSize > 0 && orgHeightSize > chgHeight ){
		objFrame.style.height = orgHeightSize;
	}else{
		objFrame.style.height = chgHeight;
	}
 	objFrame.style.width = '100%';
}

// MS»çÀÇ IE Patch¿¡ µû¸¥ ¼öÁ¤
function viewFlash(src,width,height,wmode)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">');
	document.write('<param name=movie value="' + src + '">');
	document.write('<param name=quality value=high>');
	document.write('<param name=allowScriptAccess value=always>');
	if(wmode == 0){ document.write('<param name="wmode" value="transparent">');}
	document.write('<embed src="' + src + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '">');
	document.write('</embed> ');
	document.write('</object>');
}

function viewFlash2(src, size, wmode)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ' + size + ' >');
	document.write('<param name=movie value="' + src + '">');
	document.write('<param name=quality value=high>');
	document.write('<param name=allowScriptAccess value=always>');
	if(wmode == 0){ document.write('<param name="wmode" value="transparent">');}
	document.write('<embed src="' + src + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ' + size + '>');
	document.write('</embed> ');
	document.write('</object>');
}

function viewFlash_TL(gubun)
{
	if (gubun == '1') {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1000" height="620" id="Main" align="middle">')
		document.write('<param name="allowScriptAccess" value="sameDomain" />')
		document.write('<param name="base" value="/event/transition/flash/" />')
		document.write('<param name="movie" value="/event/transition/flash/Main.swf" />')
		document.write('<param name="quality" value="high" />')
		document.write('<param name="bgcolor" value="#ffffff" />')
		document.write('<param name="wmode" value="transparent" />')
		document.write('<embed src="/event/transition/flash/Main.swf" quality="high" bgcolor="#ffffff" width="1000" height="620" name="Main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
		document.write('</object>')
	} else if (gubun == '0') {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1000" height="620" id="Event1" align="middle">')
		document.write('<param name="allowScriptAccess" value="sameDomain" />')
		document.write('<param name="base" value="/event/transition/flash/" />')
		document.write('<param name="movie" value="/event/transition/flash/Event1.swf" />')
		document.write('<param name="quality" value="high" />')
		document.write('<param name="bgcolor" value="#ffffff" />')
		document.write('<param name="wmode" value="transparent" />')
		document.write('<embed src="/event/transition/flash/Event1.swf" quality="high" bgcolor="#ffffff" width="1000" height="620" name="Event1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
		document.write('</object>')
	}
}

function viewMovie(src,width,height,wmode)
{
	document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="' + width + '" height="' + height + '">');
	document.write('<param name="Filename" value="' + src + '">');

	if(wmode == 0){document.write('<param name="AutoStart" value="0">');}
	if(wmode == 1){document.write('<param name="AutoStart" value="1">');}
	if(wmode != 0 && wmode != 1) { document.write('<param name="AutoStart" value="0">');}

	document.write('<param name="AllowScan" value="true">');
	document.write('<param name="ShowStatusBar">');
	document.write('<param name="ShowTracker">');
	document.write('</object>');
}

//images popup
function viewPic(img){
	 img1= new Image();
	 img1.src=(img);
	  call(img);
}
function call(img){
	  if((img1.width!=0)&&(img1.height!=0)){
		viewImg(img);
	  }else{
		funzione="call('"+img+"')";
		intervallo=setTimeout(funzione,20);
	  }
}
function viewImg(img){
	  WinW=img1.width+20;
	  WinH=img1.height+20;
	  LeftPosition =0 ;
	  TopPosition =0;
	  options = "";
	  if(img1.width > 990 || img1.height > 660){
			WinH = 660;
			WinW = 990;
			options = "height="+WinH+",width="+WinW+",scrollbars=yes,top="+TopPosition+",left="+LeftPosition+",";
	  }else{
			options ="height="+WinH+",width="+WinW+",top="+TopPosition+",left="+LeftPosition+",";
	  }
	  imgWin=window.open("","",options);
	  imgWin.document.write("<html><head><title>¢Æ¢Æ KOLONSPORT ¢Æ¢Æ</title><META HTTP-EQUIV='imagetoolbar' CONTENT='no'><LINK REL='STYLESHEET' type='text/css' href='/common/css/common.css'></head>");//»õÃ¢ÀÇ Å¸ÀÌÆ²¹®±¸
	  imgWin.document.write("<img src="+img+" onclick='self.close()' style='cursor:hand'>");//»õÃ¢ÀÇ ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ¸é Ã¢ÀÌ ´ÝÈ÷°Ô ÇÔ
}

// ÀÌ¹ÌÁö RESIZE
function imgresize(img, size){
	imgn= new Image();
	imgn.src=img.src;
	widthn = 600;
	if(size != undefined && size != null && size != "") widthn = size;
	var intervallo="";

	if(imgn.width == 0){
		funzione="imgresize('"+img+"', '"+size+"')";
		intervallo=window.setTimeout(funzione,300);
	}

	if(imgn.width > widthn) {
		img.width = widthn;
	}
}


/***** Çìµå¶óÀÎ ÇÃ·¡½Ã ¸µÅ©°ü·Ã (ÇöÀç ÀÓ½ÃÆäÀÌÁö ¸µÅ©) *********/
function season() /* top_05 */
{
	window.open("/contents/season/seasonConcept_06FW.jsp","_top","");	// ¿ÞÂÊ¹è³Ê
}
function technology() /* top_05 */
{
	window.open("/contents/technology/technologyListWear.jsp","_top","");	// ¿À¸¥ÂÊ ¹è³Ê
}

/** ÇÃ·¡½Ã º¸±â **/
function viewFlash(src,width,height,wmode)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">');
	document.write('<param name=movie value="' + src + '">');
	document.write('<param name=quality value=high>');
	document.write('<param name=allowScriptAccess value=always>');
	if(wmode == 0){ document.write('<param name="wmode" value="transparent">');}
	document.write('<embed src="' + src + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '">');
	document.write('</embed> ');
	document.write('</object>');
}

/** ¹«ºñº¸±â **/
function viewMovie(src,width,height,AutoStart)
{
	document.write('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="' + width + '" height="' + height + '">');
	document.write('<param name="Filename" value="' + src + '">');
	document.write('<param name="AutoStart" value="' + AutoStart + '">');
	document.write('<param name="AllowScan" value="true">');
	document.write('<param name="ShowStatusBar">');
	document.write('<param name="ShowTracker">');
	document.write('</object>');
}

function winHeadBall(headball_type, source_id)
{
	if(!checkLogin())
	{
		login('reload');
		return;
	}

	document.hbFrm.location.href = '/event/head_ball/winHeadBall.jsp?headball_type=' + headball_type + '&source_id=' + source_id;
}

//ÆË¾÷Ã¢¿¡ POST ¹æ½ÄÀ¸·Î Parameter º¸³¾ °æ¿ì FormÀ» ¸¸µç´Ù
function makeForm(formName, nameArray, valueArray){
    if(nameArray.length == valueArray.length){
        var newForm = document.createElement("<form name="+formName+" method=post></form>");
        document.body.insertBefore(newForm);
        for (var i = 0; i < nameArray.length; i++){
            newForm.insertBefore(document.createElement("<INPUT TYPE='hidden' NAME='"+nameArray[i]+"' VALUE='"+valueArray[i]+"'>"));
        }
        return newForm;
    }else{
        alert('»ý¼ºÇÏ·Á´Â formÀÇ input name °ú value ÀÇ °¹¼ö°¡ ´Ù¸¨´Ï´Ù.');
        return null;
    }
}

/***************************** 061024 Ãß°¡ ********************************************/
//object ÆÄÀÏ ÆÐÄ¡ ´ëºñ
var paramInfo = new Array;

function initParam()
{
  var oldSize = paramInfo.length;

	for (var i=0; i<oldSize; i++) {
		paramInfo.length--;
	}
}

function setParam(paramName, paramValue)
{
	var idx = paramInfo.length;

	paramInfo[idx] = [];
	paramInfo[idx][0] = paramName;
	paramInfo[idx][1]= paramValue;
}


function playFlash(objID, objSource, objWidth, objHeight, objStyle, cabVersion, embedAttr)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');

	if (cabVersion != '') {
		document.write('codebase="' + self.window.document.protocol + '"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + cabVersion + '" ');
	}
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
	}

	document.write('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + embedAttr + '>');
	document.write('</OBJECT>');
}

function playMedia(objID, objSource, objWidth, objHeight, objStyle)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
	}

	document.write('</OBJECT>');
}

// Ç²ÅÍ
// SaySelect Environment Constants

var SS_ENV = new Object();
SS_ENV.IE_Version = new Number(((window.navigator.appVersion.split('; '))[1].split(' '))[1]);
SS_ENV.CR = new Object();
SS_ENV.CR.ReverseBackground = '#F7F7F7';
SS_ENV.CR.ReverseText = '#919191';
SS_ENV.CR.Border = '#D2D3D3';
SS_ENV.CR.BorderActive = '#E7E7E7';
SS_ENV.ImgPrefix = 'img/';
SS_ENV.DefaultHeight =15;
SS_ENV.ButtonWidth = 17;
SS_ENV.OptionsDivStyle = ''
  + ' display:none;'
  + ' z-index:10;'
  + ' position:absolute;'
  + ' border:1 solid '+ SS_ENV.CR.Border+';'
  + ' background-color:#F7F7F7;'
  + ' scrollbar-face-color:#F3F3F3;'
  + ' scrollbar-shadow-color:#6C6C6C;'
  + ' scrollbar-highlight-color:#FFFFFF;'
  + ' scrollbar-3dlight-color:#C9C9C9;'
  + ' scrollbar-darkshadow-color:#FFFFFF;'
  + ' scrollbar-track-color:#F3F3F3;'
  + ' scrollbar-arrow-color:#C7C8C8;';
SS_ENV.MouseStyle = 'cursor:hand;'//¹Ú½ºÀ§¿¡¿Ã¶ó°¬À»¶§ÀÇ ¸¶¿ì½º¸ð¾ç
SS_ENV.OptionNobrStyle = ''
  + ' font-size:12px; padding:2 2 2 2; font-color:#919191;'
  + ' font-family:µ¸¿ò;';
// SaySelect Variables
var SS_VAR = new Object();
SS_VAR.DivDummy = document.createElement("DIV");
SS_VAR.SelectList = new Array();
SS_VAR.bEventAttached = false;

var SS_CreatedElements = new Object();

function unloadObjects()
{
  try {
    if (SS_VAR && SS_VAR.SelectList)
    {
      for (key in SS_VAR.SelectList)
      {
	if (SS_VAR.SelectList[key])
	{
	  try {
	   SS_VAR.SelectList[key].select.setAttribute('SS', 0);
	  } catch (e) {};
	  delete SS_VAR.SelectList[key];
	}
      }
    }
  } catch (e) {};
}

attachEvent("onunload", unloadObjects);

function SS_create (srcHTML, ListMax, bAutoDetect)
{
  // property
  this.ssID = SS_VAR.SelectList.length;
  this.bOriginalSelect = (bAutoDetect && SS_ENV.IE_Version < 5.5);
  this.select = SS_createElement(srcHTML);
  this.selectedIndex = this.select.selectedIndex;
  this.options = this.select.options;
  this.width = parseInt(this.select.style.width);
  this.height = (this.select.style.height) ? parseInt(this.select.style.height) : SS_ENV.DefaultHeight;
  this.OptionHeight = this.height ;
  this.bListDown = (ListMax && '-'==ListMax.toString().substr(0, 1)) ? false : true;
  this.ListMax = (!isNaN(parseInt(ListMax))) ? Math.abs(ListMax) : 100;

  this.Table;
  this.TitleDiv;
  this.TitleTable;
  this.TitleWrapper;
  this.OptionsDiv;
  this.OptionsWrapper;
  this.OptionsTable;
  this.bFocused = false;
  this.bExpanded = false;
  this.bReverse = false;

  // private method
  this.isThisEventToBeCanceled = SS_isThisEventToBeCanceled;
  this.toggleTitle = SS_toggleTitle;
  this.syncSelectedIndex = SS_syncSelectedIndex;
  this.toggleOptions = SS_toggleOptions;
  this.turnOnOption = SS_turnOnOption;
  this.turnOffOption = SS_turnOffOption;
  this.handleMousewheel = SS_handleMousewheel;
  this.handleOverTitle = SS_handleOverTitle;
  this.handleOutTitle = SS_handleOutTitle;
  this.handleOverOption = SS_handleOverOption;
  this.createTable = SS_createTable;
  this.createTitleDiv = SS_createTitleDiv;
  this.createOptionsDiv = SS_createOptionsDiv;
  this.createOptionTr = SS_createOptionTr;
  this.adjustOptionsDiv = SS_adjustOptionsDiv;
  this.syncOptions = SS_syncOptions;
  this.pressOption = SS_pressOption;
  this.moveOption = SS_moveOption;
  this.releaseOption = SS_releaseOption;
  this.pressTitle = SS_pressTitle;
  this.releaseTitle = SS_releaseTitle;

  // public method
  this.display = SS_display;
  this.insertOption = SS_insertOption;
  this.deleteOption = SS_deleteOption;
  this.changeOption = SS_changeOption;

  // initiate
  this.createTable();
  this.select.setAttribute('SS', this);
  if (!this.bOriginalSelect)
    this.select.onpropertychange = SS_handlePropertychange;
  SS_VAR.SelectList[this.ssID] = this;
}
function SS_display ()
{
  document.write("<div id=SS_TempDiv></div>\n");
  document.all.SS_TempDiv.appendChild(this.Table);
  document.all.SS_TempDiv.removeNode();
}
function SS_write (srcHTML, ListMax, bAutoDetect)
{
  var oSS = new SS_create(srcHTML, ListMax, bAutoDetect);
  oSS.display();
  return oSS;
}
function SS_insertOption (value, innerText, idx)
{
  var NewOption = document.createElement("OPTION");
  SS_CreatedElements[SS_CreatedElements.length] = NewOption;
  this.options.add(NewOption, idx);
  NewOption.innerText = innerText;
  NewOption.value = value;

  if (!this.bOriginalSelect)
    this.createOptionTr(idx);
  this.syncOptions();
  this.adjustOptionsDiv();
  this.syncSelectedIndex();
}
function SS_deleteOption (idx)
{
  this.options.remove(idx);
  if (!this.bOriginalSelect)
    this.OptionsTable.deleteRow(idx);
  this.syncOptions();
  this.adjustOptionsDiv();
  this.syncSelectedIndex();
}
function SS_changeOption (idx, value, innerText)
{
  this.options[idx].value = value;
  this.options[idx].innerText = innerText;
  this.syncOptions();
  this.syncSelectedIndex();
}

function SS_insertOption1 (obj, value, innerText, idx)
{
  var NewOption = document.createElement("OPTION");
  SS_CreatedElements[SS_CreatedElements.length] = NewOption;
  obj.options.add(NewOption, idx);
  NewOption.innerText = innerText;
  NewOption.value = value;

  if (!obj.bOriginalSelect)
    obj.createOptionTr(idx);

  obj.syncOptions();
  obj.adjustOptionsDiv();
  obj.syncSelectedIndex();
}


function SS_changeOption1 (obj, idx, value, innerText)
{
  obj.options[idx].value = value;
  obj.options[idx].innerText = innerText;
  obj.syncOptions();
  obj.syncSelectedIndex();
}

function SS_deleteOption1 (obj, idx)
{
  obj.options.remove(idx);
  if (!obj.bOriginalSelect)
    obj.OptionsTable.deleteRow(idx);
  obj.syncOptions();
  obj.adjustOptionsDiv();
  obj.syncSelectedIndex();
}


function SS_cancelEvent (event)
{
  event.cancelBubble = true;
  event.returnValue = false;
}
function SS_isThisEventToBeCanceled (event)
{
  if ('object' == typeof(event)) {
    switch (event.type) {
      case 'mousedown':
        if (!(event.button & 1)) return true;
        break;
      case 'mouseup':
        if (!(event.button & 1)) return true;
        if (SS_ENV.IE_Version >= 5.5 && event.srcElement != this.srcElementOfLastMousedown && this.srcElementOfLastMousedown != null) {
          this.srcElementOfLastMousedown = null;
          return true;
        }
        break;
      case 'mouseout':
        if (!(SS_ENV.IE_Version < 5.5 && event.srcElement == this.srcElementOfLastMousedown))
          return true;
        break;
      case 'mousemove':
        if (SS_ENV.IE_Version >= 5.5 && event.srcElement != this.srcElementOfLastMousedown && this.srcElementOfLastMousedown != null)
          return true;
        break;
    }
  }
  return false;
}
function SS_createElement (html)
{
  SS_VAR.DivDummy.insertAdjacentHTML('afterBegin', html);
  var oEl = SS_VAR.DivDummy.children(0);
  while (SS_VAR.DivDummy.children.length > 0) {
    SS_VAR.DivDummy.removeChild(SS_VAR.DivDummy.children(0));
  }
  return oEl;
}
function SS_blurExcept (except)
{
  SS_cancelEvent(window.event);

  except = ('number'==typeof(except)) ? except : -1;

  var bHasToDetachEvent = true;
  for (var i=0; i < SS_VAR.SelectList.length; i++) {
    if (-1==except && SS_VAR.SelectList[i].bFocused && SS_VAR.SelectList[i].bExpanded) {
      SS_VAR.SelectList[i].toggleOptions(false, true);
      SS_VAR.SelectList[i].toggleTitle(true);
      bHasToDetachEvent = false;
    }
    else if (i!=except) {
      if (SS_VAR.SelectList[i].bExpanded)
        SS_VAR.SelectList[i].toggleOptions(false, true);
      if (SS_VAR.SelectList[i].bReverse)
        SS_VAR.SelectList[i].toggleTitle(false);
      SS_VAR.SelectList[i].bFocused = false;
    }
  }

  if (SS_VAR.bEventAttached && bHasToDetachEvent) {
    document.detachEvent('onmousedown', SS_blurExcept);
    document.detachEvent('ondblclick', SS_blurExcept);
    SS_VAR.bEventAttached = false;
  }
}
function SS_syncSelectedIndex ()
{
  this.selectedIndex = this.select.selectedIndex;

  if (this.bOriginalSelect) return;

  if (this.TitleTable.cells(0).childNodes(0).innerText != this.options[this.selectedIndex].innerText)
    this.TitleTable.cells(0).childNodes(0).innerText = this.options[this.selectedIndex].innerText;
  if (this.bExpanded)
    this.toggleOptions(false);
}
function SS_syncSelectedIndex1 (obj)
{
  obj.selectedIndex = obj.select.selectedIndex;

  if (obj.bOriginalSelect) return;

  if (obj.TitleTable.cells(0).childNodes(0).innerText != obj.options[obj.selectedIndex].innerText)
    obj.TitleTable.cells(0).childNodes(0).innerText = obj.options[obj.selectedIndex].innerText;
  if (obj.bExpanded)
    obj.toggleOptions(false);
}
function SS_toggleTitle (bReverse)
{
  this.bReverse = ('undefined'!=typeof(bReverse)) ? bReverse: (!this.bReverse);
  this.TitleTable.cells(0).style.backgroundColor = this.bReverse ? SS_ENV.CR.ReverseBackground : '';
  this.TitleTable.cells(0).style.color = this.bReverse ? SS_ENV.CR.ReverseText : '';
}
function SS_toggleOptions (bExpanded, bStrict)
{
  if (!bStrict && !this.bFocused) {
    SS_blurExcept(this.ssID);
  }
  this.bExpanded = ('undefined'!=typeof(bExpanded)) ? bExpanded: (!this.bExpanded);
  if (this.bExpanded) {
    this.adjustOptionsDiv();
    this.OptionsDiv.style.display = 'block';
    if (!bStrict) {
      this.toggleTitle(false);
      this.handleOverOption(this.selectedIndex);
    }
    this.handleOutTitle();
  }
  else {
    this.OptionsDiv.style.display = 'none';
    if (!bStrict) {
      this.toggleTitle(true);
    }
  }
  if (!bStrict) {
    this.bFocused = true;

    if (!SS_VAR.bEventAttached) {
      document.attachEvent('onmousedown', SS_blurExcept);
      document.attachEvent('ondblclick', SS_blurExcept);
      SS_VAR.bEventAttached = true;
    }
  }
}
function SS_handlePropertychange ()
{
  if ('propertychange'==window.event.type && 'selectedIndex'==window.event.propertyName) {
    var oSS = window.event.srcElement.SS;
    oSS.syncSelectedIndex();

    if (null != oSS.select.onchange)
      oSS.select.onchange();
  }
}
function SS_handleMousewheel (event)
{
  var idx = this.selectedIndex;
  if ('mousewheel'==event.type && this.bFocused && this.bReverse) {
    for (var i=0; i < event.wheelDelta; i += 120)
      idx--;
    for (var i=0; i > event.wheelDelta; i -= 120)
      idx++;
  }
  idx = Math.max(idx, 0);
  idx = Math.min(idx, this.options.length - 1);
  this.select.selectedIndex = idx;
}
function SS_handleOverTitle ()
{
  if (this.bExpanded)
    return;

  this.TitleTable.style.borderColor = SS_ENV.CR.BorderActive;
  this.TitleTable.cells(1).style.display = 'none';
  this.TitleTable.cells(2).style.display = 'block';
}
function SS_handleOutTitle ()
{
  this.TitleTable.style.borderColor = SS_ENV.CR.Border;
  this.TitleTable.cells(2).style.display = 'none';
  this.TitleTable.cells(1).style.display = 'block';
}
function SS_handleOverOption (idx)
{
  for (var i=0; i < this.options.length; i++) {
    if (i==idx)
      this.turnOnOption(i);
    else
      this.turnOffOption(i);
  }
}
function SS_turnOnOption (idx)
{
  this.OptionsTable.cells(idx).style.color = SS_ENV.CR.ReverseText;
  this.OptionsTable.cells(idx).style.backgroundColor = SS_ENV.CR.ReverseBackground;
}
function SS_turnOffOption (idx)
{
  this.OptionsTable.cells(idx).style.color = '';
  this.OptionsTable.cells(idx).style.backgroundColor = '';
}
function SS_adjustOptionsDiv ()
{
  if (this.bOriginalSelect) return;

  this.OptionsDiv.style.width = this.width;
  this.OptionsDiv.style.height = Math.min(this.options.length, this.ListMax) * this.OptionHeight ;
  this.OptionsWrapper.style.height = this.options.length * this.OptionHeight;
  this.OptionsDiv.style.overflowY = (this.options.length > this.ListMax) ? 'scroll' : '';

  var top = this.Table.offsetTop;
  var left = this.Table.offsetLeft;
  for (var El = this.Table.offsetParent; 'BODY'!=El.tagName && 'absolute'!=El.style.position && 'relative'!=El.style.position; El = El.offsetParent) {
    if ('TABLE' != El.tagName) {
      top += El.clientTop;
      left += El.clientLeft;
    }
    top += El.offsetTop;
    left += El.offsetLeft;
  }
  this.OptionsDiv.style.top = (this.bListDown) ? (top + this.height) : (top - parseInt(this.OptionsDiv.style.height));
  this.OptionsDiv.style.left = left;

  this.TitleWrapper.style.top = 0;
  this.TitleWrapper.style.left = 0;
}
function SS_syncOptions ()
{
  if (this.bOriginalSelect) return;

  for (var i=0; i < this.options.length; i++) {
    this.OptionsTable.cells(i).setAttribute('index', i);
    if (this.OptionsTable.cells(i).childNodes(0).innerText != this.options[i].innerText)
      this.OptionsTable.cells(i).childNodes(0).innerText = this.options[i].innerText;
  }
}
function SS_pressTitle (event)
{
  SS_cancelEvent(event);

  this.srcElementOfLastMousedown = event.srcElement;

  this.toggleOptions();
}
function SS_releaseTitle (event)
{
  SS_cancelEvent(event);

  if (this.isThisEventToBeCanceled(event)) return;

  this.srcElementOfLastMousedown = null;
}
function SS_pressOption (event)
{
  SS_cancelEvent(event);

  this.srcElementOfLastMousedown = event.srcElement;
}
function SS_moveOption (event)
{
  SS_cancelEvent(event);

  if (this.isThisEventToBeCanceled(event)) return;
  if (!(event.offsetX >= 0 && event.offsetX <= this.OptionsTable.offsetWidth)) return;

  this.handleOverOption(Math.floor(event.offsetY / this.OptionHeight));
}
function SS_releaseOption (event)
{
  SS_cancelEvent(event);

  if (this.isThisEventToBeCanceled(event)) return;

  this.srcElementOfLastMousedown = null;

  if (event.offsetX >= 0 && event.offsetX <= this.OptionsTable.offsetWidth) {
    this.toggleOptions(false);
    this.select.selectedIndex = Math.floor(event.offsetY / this.OptionHeight);
  }
}
function SS_createTable ()
{
  this.Table = SS_createElement(""
    + "<table border=0 cellpadding=0 cellspacing=0 style='table-layout:fixed; "+SS_ENV.MouseStyle+"'>"
    + "<tr><td></td></tr>"
    + "</table>"
  );
  if (!isNaN(this.width))
    this.Table.style.width = this.width;
  this.Table.style.height = this.height;

  if (!this.bOriginalSelect) {
    this.createTitleDiv();
    this.createOptionsDiv();
    this.Table.cells(0).appendChild(this.TitleDiv);
    this.Table.cells(0).appendChild(this.OptionsDiv);
  }
  else {
    this.Table.cells(0).appendChild(this.select);
  }
}
function SS_createTitleDiv ()
{
  this.TitleDiv = SS_createElement(""
    + "<div style='position:relative; top:0; left:0;'>"
    + "  <table border=0 cellpadding=0 cellspacing=0"
    + "    height="+this.height
    + "    bgcolor=F7F7F7"
    + "    style='table-layout:fixed; border:1 solid "+SS_ENV.CR.Border+";'"
    + "    onmouseover='SS_VAR.SelectList["+this.ssID+"].adjustOptionsDiv()'"
    + "  >"
    + "  <tr>"
    + "    <td><nobr style='text-oveflow:hidden;"+SS_ENV.OptionNobrStyle+"'></nobr></td>"
    + "    <td width="+SS_ENV.ButtonWidth+" align=center style='word-wrap:normal'></td>"
    + "    <td style='display:none' width="+SS_ENV.ButtonWidth+" align=center style='word-wrap:normal'></td>"
    + "    <td style='display:none'></td>"
    + "  </tr>"
    + "  </table>"
    + "</div>"
  );
  this.TitleTable = this.TitleDiv.childNodes(0);
  this.TitleTable.cells(0).childNodes(0).innerText = this.options[this.selectedIndex].innerText;
  this.TitleTable.cells(1).innerHTML = "<img src='/brand/asset/images/diosfamily/butt_arrow.gif' border=0 align=absmiddle>";
  this.TitleTable.cells(2).innerHTML = "<img src='/brand/asset/images/diosfamily/butt_arrow.gif' border=0 align=absmiddle>";
  this.TitleTable.cells(3).appendChild(this.select);
  this.TitleWrapper = document.createElement(""
    + "<img src='"+SS_ENV.ImgPrefix+"null.gif'"
    + "  style='position:absolute; top:0; left:0; z-index:2; width:100%; height:"+this.height+";'"
    + "  onmouseover='SS_VAR.SelectList["+this.ssID+"].handleOverTitle()'"
    + "  onmouseout='SS_VAR.SelectList["+this.ssID+"].handleOutTitle(); SS_VAR.SelectList["+this.ssID+"].releaseTitle(window.event);'"
    + "  onmousedown='SS_VAR.SelectList["+this.ssID+"].pressTitle(window.event)'"
    + "  ondblclick='SS_VAR.SelectList["+this.ssID+"].pressTitle(window.event); SS_VAR.SelectList["+this.ssID+"].releaseTitle(window.event);'"
    + "  onmouseup='SS_VAR.SelectList["+this.ssID+"].releaseTitle(window.event)'"
    + "  onmousewheel='SS_VAR.SelectList["+this.ssID+"].handleMousewheel(window.event)'"
    + "  ondragstart='SS_cancelEvent(window.event)'"
    + ">"
  );
  SS_CreatedElements[SS_CreatedElements.length] = this.TitleWrapper;
  this.TitleDiv.appendChild(this.TitleWrapper);
}
function SS_createOptionsDiv ()
{
  this.OptionsDiv = SS_createElement(""
    + "<div style='"+SS_ENV.OptionsDivStyle+"'"
    + "  onscroll='SS_VAR.SelectList["+this.ssID+"].moveOption(window.event)'"
    + "  onmousedown='SS_cancelEvent(window.event)'"
    + ">"
    + "  <table border=0 cellpadding=3 cellspacing=0 width=100% style='table-layout:fixed'>"
    + "  </table>"
    + "</div>"
  );
  this.OptionsTable = this.OptionsDiv.childNodes(0);
  for (var i=0; i < this.options.length; i++) {
    this.createOptionTr(i);
  }
  this.syncOptions();
  this.OptionsWrapper = document.createElement(""
	+ "<img src='"+SS_ENV.ImgPrefix+"null.gif'"
    + "  style='position:absolute; top:0; left:0; width:100%;'"
    + "  onmousedown='SS_VAR.SelectList["+this.ssID+"].pressOption(window.event)'"
    + "  onmousemove='SS_VAR.SelectList["+this.ssID+"].moveOption(window.event)'"
    + "  onmouseup='SS_VAR.SelectList["+this.ssID+"].releaseOption(window.event)'"
    + "  onmouseout='SS_VAR.SelectList["+this.ssID+"].releaseOption(window.event)'"
    + "  ondragstart='SS_cancelEvent(window.event)'"
    + ">"
  );
  SS_CreatedElements[SS_CreatedElements.length] = this.OptionsWrapper;
  this.OptionsDiv.appendChild(this.OptionsWrapper);
}
function SS_createOptionTr (idx)
{
  idx = ('undefined'!=typeof(idx)) ? idx : this.options.length - 1;
  var OptionTr = this.OptionsTable.insertRow(-1);
  var OptionTd = document.createElement("<td height="+this.OptionHeight+"></td>");
  SS_CreatedElements[SS_CreatedElements.length] = this.OptionsTd;
  OptionTd.appendChild(document.createElement("<nobr style='"+SS_ENV.OptionNobrStyle+"'></nobr>"));
  OptionTr.appendChild(OptionTd);
}



function sectionChange(form)
{
	var idx_office = SS_office.selectedIndex;
	var office_section = section_list[idx_office];
	var tmp, i, len;

	len = SS_section.options.length;

	for (i = office_section.length - 1; i >= 0; i--) {
		tmp = office_section[i].split(",");
		SS_section.insertOption(tmp[1], tmp[0], 0);
	}

	offset = office_section.length;
	for (i = office_section.length; i < office_section.length + len; i++) {
		SS_section.deleteOption(offset);
	}
}


// rollover
var changedImg;

function EImgChg(flag)
{
	source=event.srcElement;
	if (source.name == "")
	{ return false;  }

	if(changedImg == source.name)
	return;

	else if (document.images && source.tagName=="IMG") {
		imgElement = source.name;  // ÀÌ¹ÌÁö name
		imgPath = source.src;   // ÀÌ¹ÌÁö src ¼Ó¼º°ª

		imgPathLen = imgPath.length;
		imgPathFlag = imgPath.lastIndexOf("/");
		imgName = imgPath.substring(0,imgPathFlag+1);

		document.images[imgElement].src =  imgName + imgElement + "_" + flag + ".gif";

	}
}


	function getTextNode( domObj, strTag, seq )
	{
		if( domObj.getElementsByTagName( strTag )[ ( seq != null ? seq : 0 ) ].childNodes.length > 0 )
			return domObj.getElementsByTagName( strTag )[ ( seq != null ? seq : 0 ) ].firstChild.nodeValue;
		else return "";
	}

//ÀÌ¹ÌÁö Å¬¸¯½Ã Å×Åõ¸® ¾Èº¸ÀÌ°Ô..
function autoBlur(){
  if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")
  document.body.focus();
}
  document.onfocusin=autoBlur;

//ÆË¾÷¶ç¿ì±â
function openWin(url,width,height){

	window.open(url,'','width='+width+',height='+height+',scrollbars=no,resized=no');

}

//ÆË¾÷¶ç¿ì±â02
function openWin02(url,width,height){

	window.open(url,'','width='+width+',height='+height+',scrollbars=yes,resized=no');

}

function openWinInfo(url,width,height){

	window.open(url,'','width='+width+',height='+height+',scrollbars=yes,resized=no');

}

function TopMove(x,y) {
    window.scroll(x,y);
}

function ViewStylePop(idx,num,seq){
	tb_show("layer", "#TB_inline?height=730&width=869&inlineId=stylePop&modal=true", true);
	document.getElementById("ViewStyle").src = idx
	var back = parseInt(num)-1;
	var img = "";
	var img2 = "";
	var tag = "";
	var rlt = "";
	var tag2 = "";
	var rlt2 = "";

	if(parseInt(num) > 1)
	{
		if(back < 10)
		{
			img = "'http://image.kolonsports.com/images/shopping/style/"+seq+"/L0"+back+".jpg'";
		}
		else
		{
			img = "'http://image.kolonsports.com/images/shopping/style/"+seq+"/L"+back+".jpg'";
		}
		tag = '<a href="javascript:ViewStylePop('+img+','+back+','+seq+');"><img src="http://image.qua.co.kr/images/shop/style/btn_pop_left.gif" alt="left" /></a>'
		rlt = document.getElementById("ViewStyle2")
		rlt.innerHTML = tag
	}
	else
	{
		tag = ''
		rlt = document.getElementById("ViewStyle2")
		rlt.innerHTML = tag
	}

	var next = parseInt(num)+1;

	if(num < 12)
	{
		if(next < 10)
		{
			img2 = "'http://image.kolonsports.com/images/shopping/style/"+seq+"/L0"+next+".jpg'";
		}
		else
		{
			img2 = "'http://image.kolonsports.com/images/shopping/style/"+seq+"/L"+next+".jpg'";
		}
		tag2 = '<a href="javascript:ViewStylePop('+img2+','+next+','+seq+');"><img src="http://image.qua.co.kr/images/shop/style/btn_pop_right.gif" alt="left" /></a>'
		rlt2 = document.getElementById("ViewStyle3")
		rlt2.innerHTML = tag2
	}
	else
	{
		tag2 = ''
		rlt2 = document.getElementById("ViewStyle3")
		rlt2.innerHTML = tag2
	}

//document.getElementById("ViewStyle2").src = idx
}