
function popup(pPage,wName,Opt){
		popUpWin = window.open(pPage,wName,Opt);
}

function refresh(){
	top.frames["main"].location.reload();
}

	
function form1_checkWalkin (frm) {
frm.gubun.disabled = !frm.gubun ['1'].checked;

			if (frm.gubun ['1'].checked == false) {

				frm.fromyy.style.background = "silver";
				frm.frommm.style.background  = "silver";
				frm.fromdd.style.background  = "silver";
				frm.toyy.style.background = "silver";
				frm.tomm.style.background  = "silver";
				frm.todd.style.background  = "silver";
				frm.fromyy.disabled=true;
				frm.frommm.disabled=true;
				frm.fromdd.disabled=true;
				frm.toyy.disabled=true;
				frm.tomm.disabled=true;
				frm.todd.disabled=true;
			}
			else {
				frm.fromyy.style.background = "white";
				frm.frommm.style.background  = "white";
				frm.fromdd.style.background  = "white";
				frm.toyy.style.background = "white";
				frm.tomm.style.background  = "white";
				frm.todd.style.background  = "white";
				frm.fromyy.disabled=false;
				frm.frommm.disabled=false;
				frm.fromdd.disabled=false;
				frm.toyy.disabled=false;
				frm.tomm.disabled=false;
				frm.todd.disabled=false;
			}
		}
		


// Ã¼Å©¹Ú½º Ã¼Å© À¯¹«
function checkboxvalue(checkbox) {
        for(var i=0;i<checkbox.length;        i++) {
                if (checkbox[i].checked == true) { 
				return true;
                }
        }
        if(i==checkbox.length) { 
		return false;
        }

}		
	

// ÀÌ¸ÞÀÏ °Ë»ç
 function emailSelect(formname,form)
{
	var addr = formname.Emailist.value;
	
	if(addr != "user") {
		formname.EmailAddr.style.background = "#efefef";
		formname.EmailAddr.readOnly = true;
		formname.EmailAddr.value = addr;
	} else {
		formname.EmailAddr.style.background = "white";
		formname.EmailAddr.value = "";
		formname.EmailAddr.readOnly = false;
		formname.EmailAddr.focus();
	}
}

function check_mail(emailad)
{
if (emailad.indexOf(".")==-1)
{
return false
}
}

// ÇÑ±Û Æ¯¹® ÀÔ·Â ±ÝÁö
function hanCheck(x) {
	for(i=0;i<x.length;i++) {
	var a=x.charCodeAt(i);
		if (a > 128) {
		x="";
		return false;
		}
	}
}

// ¼ýÀÚ¸¸À» ±âÀÔ¹Þ°Ô ÇÏ´Â ¹æ¹ý
function onlyNumber()
{
   if((event.keyCode<48)||(event.keyCode>57))
      event.returnValue=false;
}		

// ¾ÆÀÌµð Ã¹¹®ÀÚ ¼ýÀÚ±ÝÁö
function firstnonum(m_id)
{	
var bReturn;
if((m_id >= '0' && m_id <= '9'))
{
    bReturn=false;
}
else
{
	bReturn = true;
}
	return bReturn;
}

function id_no_chk(obj1,obj2)	
{
	// CheckSum Ã¼Å©
	if (chksumID(obj1,obj2) == false)
		return false;
		
	// »ý¼º±â·Î ¸¸µç°Ô ¾Æ´Ñ°¡ »ý³â¿ùÀÏ°ú ³²³àÇÊµå Ã¼Å©
	if (ValidRegNo(obj1,obj2) == false)
		return false;
	
	// YYMMDD°¡ ¸Â´ÂÁö È®ÀÎÇÑ´Ù.
	if (ValidRegNo2(obj1) == false)
		return false;
}

function ValidRegNo(obj1,obj2)	
{
    strReg1 = obj1.value;
    strReg2 = obj2.value;
    sGender = strReg2.substring(0,1);
    sYear = strReg1.substring(0,2);
    
    // µÎ¹øÂ° ´Ü¶ô Ã¹¹øÂ° ¼ýÀÚ´Â 4º¸´Ù Å¬ ¼ö ¾ø´Ù.
	if (sGender > 4) {
		return false;
	}
	
    // 2000³âµµ ÀÌÀüÀº ³²ÀÚ´Â 1, ¿©ÀÚ´Â 2
    // 2000³âµµ ÀÌÈÄ´Â ³²ÀÚ´Â 3, ¿©ÀÚ´Â 4
	if (sYear != '00') {
		if ((sGender != '1') && (sGender != '2')&& (sGender != '3') && (sGender != '4')) {
			return false;
		}
	}
    
    return true;
}

// YYMMDD°¡ ¸Â´ÂÁö È®ÀÎÇÑ´Ù.
function ValidRegNo2(obj1)	
{
    strReg1 = obj1.value;

	a = new String(strReg1);

	if(a == '') return false;
	if(a.length != 6 ) return false;

	intYear = parseInt(a.substring(0,2) , 10);
	intMonth = parseInt(a.substring(2,4) , 10);
	intDay = parseInt(a.substring(4,6) , 10);
	
	if(intMonth < 0 || intMonth > 12){ 
		return false;
	}
		
	switch(intMonth){
		case 2 :
			if(intDay < 0 || intDay > 29){
				return false;
				breake;
			}
		case 4 :
			if(intDay < 0 || intDay > 30){
				return false;
				breake;
			}
		case 6 :
			if(intDay < 0 || intDay > 30){
				return false;
				breake;
			}
		case 9 :
			if(intDay < 0 || intDay > 30){
				return false;
				breake;
			}
		case 11 :
			if(intDay < 0 || intDay > 30){
				return false;
				breake;
			}
		default :
			if(intDay < 0 || intDay > 31){
				return false;
				breake;
			}
	}
    
    return true;
}

function chksumID(obj1,obj2)	
{
    str1 = obj1.value;
    str2 = obj2.value;
    var li_lastid,li_mod,li_minus,li_last;
    var value0,value1,value2,value3,value4,value5,value6;
    var value7,value8,value9,value10,value11,value12;
    
    if (IsInteger(str1) &&  IsInteger(str2)) {
        li_lastid    = parseFloat(str2.substring(6,7));
        value0  = parseFloat(str1.substring(0,1))  * 2;
        value1  = parseFloat(str1.substring(1,2))  * 3;
        value2  = parseFloat(str1.substring(2,3))  * 4;
        value3  = parseFloat(str1.substring(3,4))  * 5;
        value4  = parseFloat(str1.substring(4,5))  * 6;
        value5  = parseFloat(str1.substring(5,6))  * 7;
        value6  = parseFloat(str2.substring(0,1))  * 8;
        value7  = parseFloat(str2.substring(1,2))  * 9;
        value8  = parseFloat(str2.substring(2,3))  * 2;
        value9  = parseFloat(str2.substring(3,4))  * 3;
        value10 = parseFloat(str2.substring(4,5))  * 4;
        value11 = parseFloat(str2.substring(5,6))  * 5;
        value12 = 0;
        
        value12 = value0+value1+value2+value3+value4+value5+value6+value7+value8+value9+value10+value11+value12 ;
        
        li_mod = value12 %11;
        li_minus = 11 - li_mod;
        li_last = li_minus % 10;
        if (li_last != li_lastid){
            obj2.select();
            obj2.focus();
            return false;
        } else
            return true;
	} else
    obj2.select();
    obj2.focus();
    return false;
}

// ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ¼ýÀÚ·Î¸¸ ÀÌ·ç¾îÁ®ÀÖ´ÂÁö °Ë»çÇÑ´Ù.
function IsInteger(st)
{
	if (!IsEmpty(st)) {
		for (j = 0; j < st.length; j++)
			if (((st.substring(j, j+1) < "0") || (st.substring(j, j+1) > "9")))
				return false;
	}
	else
		return false;

	return true;
}

// ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ºñ¾îÀÖ´ÂÁö °Ë»çÇÑ´Ù.
function IsEmpty(toCheck)
{
	var chkstr = toCheck + "";
	var is_Space = true;

	if (( chkstr == "") || (chkstr == null))
		return false;

	for (j = 0; is_Space && j < chkstr.length; j++) {
		if (chkstr.substring(j, j+1) != " ")
			is_Space = false ;
	}

	return is_Space;
}

// ÆÐ½º¿öµå ±æÀÌ °Ë»ç
function IsPassword( strPassword )
{
	var bRetNo;

	// check for all numbers and length  4 and 8
	if ( strPassword.length >= 4 && strPassword.length <= 8  )
	{
		if ((strPassword == document.theform.m_id.value) || (strPassword == "1234") || (strPassword == document.theform.m_id.value + "1234") || (strPassword == "1111") || (strPassword == "aaaa") || (strPassword == "11111") || (strPassword == "aaaaa") || (strPassword == "111111") || (strPassword == "aaaaaa") || (strPassword == "1111111") || (strPassword == "aaaaaaa") || (strPassword == "admin") || (strPassword == "sunchun") || (strPassword == "administrato") || (strPassword == "sysadmin") || (strPassword == "gnmbc"))
		{
			return false;
		}
		bRetNo = true;
	}
	else
	{
		bRetNo = false;
	}
	return bRetNo;
}


//-- ÀÎÀÚ textarea, byteÇ¥½Ã textÇÊµå, Á¦ÇÑByte
function textCounter(theField,theCharCounter,maxChars)
{
        var strCharCounter = 0;
        var intLength = theField.value.length;

        for (var i = 0; i < intLength; i++)
        {
                var charCode = theField.value.charCodeAt(i);
//ÇÑ±ÛÀÏ °æ¿ì
                if (charCode > 128)        {
                        strCharCounter += 2;
                } else {
                        strCharCounter++;
                }

                if(strCharCounter < (maxChars+1)) {
                        theCharCounter.value = strCharCounter;
                } else {
                        eval("alert('ÇÑ±Û" + maxChars/2 + ", ¿µ¹®" + maxChars+ "ÀÚ Á¦ÇÑÀÔ´Ï´Ù. ÃÊ°úµÈ ¹®ÀÚ´Â Àß¸³´Ï´Ù.')");
                        if(!cutStr(theField, i, theCharCounter, maxChars)) {
                                alert("¹®ÀÚ¿­ Ä¿Æ® ÇÔ¼ö°¡ ÀÛµ¿µÇÁö ¾Ê½À´Ï´Ù.");
                        }
                        break;
                }
        }
}

function cutStr(theField, i, theCharCounter, maxChars)
{
        var intLength = theField.value.length;        //-- ½ÇÁ¦ ¹®ÀÚÀÇ ±æÀÌ¸¦ ±¸ÇÑ´Ù.

        var strChar = theField.value.substring(0,i);                //¸¶Áö¸· ¹®ÀÚ¸¦ Àß¶ó³½´Ù.
        
        theField.value = strChar;
        textCounter(theField,theCharCounter,maxChars);
        return true;
}
 
// ¾ÆÀÌµð °Ë»ç
	function Isuser_id(struser_id)
{
	var nIndex;
	var chrCurrent;
	var ascChrCurrent;
	var strInvalid;
	var bReturn;

	bReturn = true;

	// for the length of the string...
	for ( nIndex = 0; nIndex < struser_id.length; nIndex++)
	{
		// check each character
		ascChrCurrent = struser_id.charAt(nIndex);
		// user_id should be alphanumeric
		if ( (ascChrCurrent >= '0' && ascChrCurrent <= '9'	) || (ascChrCurrent >= 'a' && ascChrCurrent <= 'z') || (ascChrCurrent >= 'A' && ascChrCurrent <= 'Z') )
		{
			bReturn = true;
		}
		else
		{
			bReturn = false;
			break;
		}
	}

	if ( bReturn && ( ( struser_id.length < 4) || ( struser_id.length > 12 ) ) )
	{
		bReturn = false;
	}
	return bReturn;
} 

// »ç¿ë ºÒ°¡´É ¾ÆÀÌµð
function iduse(m_id)
{	
var bReturn;
if((m_id == 'admin')||(m_id == 'club')||(m_id == 'administrato')||(m_id == 'mate')||(m_id == 'clubmate')||(m_id == 'sysadmin')||(m_id == 'member')||(m_id == 'sysop')||(m_id == 'company')||(m_id == 'host')||(m_id == 'hostmaster')||(m_id == 'master')||(m_id == 'hostname')||(m_id == 'hostman')||(m_id == 'system'))
{
    bReturn=false;
}
else
{
	bReturn = true;
}
	return bReturn;
}


// ¾÷·Îµå ÆÄÀÏ ÀÌ¹ÌÁö Å¸ÀÔÀÎÁö °Ë»ç
function checkImgFormat(imgPath) {
        
  if ( imgPath.indexOf(".JPG") != -1 ||
  imgPath.indexOf(".jpg") != -1 ||
  imgPath.indexOf(".GIF") != -1  ||
  imgPath.indexOf(".gif") != -1  ||
  imgPath.indexOf(".PNG") != -1  ||
  imgPath.indexOf(".png") != -1 ) {
       
    return true;
  }
  else {
    if ( imgPath != "" )      
      alert("Áö¿øÇÏ´Â ±×¸² ÀÌ¹ÌÁö Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.\n\n ±×¸² ÀÌ¹ÌÁö Çü½Ä(jpg,gif,png) ÆÄÀÏÀ» ¼±ÅÃÇÏ¼¼¿ä!");
    return false;
  }
} 
	
//´Þ·Â
var action_global = ""; //actionÀÇ Àü¿ªº¯¼ö
var now = new Date();
var now_year = now.getYear();
var now_month = now.getMonth()+1;
var now_day = now.getDate();

function calendar(action){
	cal(now_year,now_month,now_day,action);
}

function cal(year, month, day, action){

    var i, j, day_num=1;
    var last_week, month_link="";
    var calDate = new Date(year, month-1, day_num);
    var checkDate = new Date();
    var date_array = new Array(6);
    for(i=0;i<6;i++) date_array[i] = new Array("","","","","","","");

    //½ºÅ©¸³Æ® ÃßÃâ ¹× º¯È¯, ³»¿ëÀÌ ¾øÀ¸¸é ¸¶Áö¸· action »ç¿ë
    if(action == ""){
            script = action_global;
    }else{
            var script = action;
            var action_mode = action.substring(0,3);
            if(action_mode.toLowerCase()=="url") script = "document.location.href='"+action.substring(4,action.length)+"'";
            action_global = script;
    }

    for(j=0;j<6;j++){
            for(i=0;i<7;i++){
                    if(j==0 && i==0)i = calDate.getDay();
                    date_array[j][i]=day_num+"";
                    day_num++;

                    //ÇØ´ç ³¯Â¥°ª¿¡ ´ëÇÑ À¯È¿¼º °Ë»ç
                    checkDate.setFullYear(year, month-1, day_num);
                    if(checkDate.getDate() != day_num) break;
            }
            if(checkDate.getDate() != day_num) break;
    }
    last_week = (date_array[5][0])?6:5;

    outStr = "<table width=160 height=140 border=0 cellpadding=0 cellspacing=0 bgcolor=#DADADA>\n";
    outStr += "<tr><td colspan=7 height=9><img src='/admin/images/calendar_01.gif' width='160'></td></tr>\n";
    outStr += "<tr><td bgcolor=#ffffff align=center>\n";
	outStr += "<table width=100% height=100% border=0 cellpadding=0 cellspacing=1 bgcolor=#DADADA>\n";
    outStr += "<col width=20 align=center></col><col width=20 align=center></col><col width=20 align=center></col><col width=20 align=center></col><col width=20 align=center></col><col width=20 align=center></col><col width=20 align=center></col>\n";
//    outStr += "<tr><td class=calendar style='color:red'>ÀÏ<td class=calendar>¿ù<td class=calendar>È­<td class=calendar>¼ö<td class=calendar>¸ñ<td class=calendar>±Ý<td class=calendar style='color:blue'>Åä</tr>\n";

    for(j=0;j<last_week;j++){
		outStr += "<tr>";
        for(i=0;i<7;i++){
        //½ºÅ©¸³Æ® ÀÚ·áº¯È¯
            if(date_array[j][i]!=""){
                    action_script = script.replace("{y}", year);
                    action_script = action_script.replace("{m}",(month < 10)?"0"+month:month);
                    action_script = action_script.replace("{d}", (date_array[j][i]<10)?"0"+date_array[j][i]:date_array[j][i]);
            }
            else action_script = "";
            today=date_array[j][i];

            if(today=="") today="&nbsp;";
            //³¯Â¥º°·Î ½ºÅ©¸³Æ® Ãâ·Â
//			if(now_year==year && now_month==month && now_day>today) {
//	            if(now_year==year && now_month==month && now_day==today) today="<b>"+today+"</b>";
//				if(i==0){ outStr += "<td style='font-size:9pt;font-family:±¼¸²;color=#A7A7A7;background=#FBF8F5'>"+today+"</td>"; continue; }
//	            if(i==6){ outStr += "<td style='font-size:9pt;font-family:±¼¸²;color=#A7A7A7;background=#FBF8F5'>"+today+"</td>"; continue; }
//	            outStr += "<td style='font-size:9pt;font-family:±¼¸²;color=#A7A7A7;background=#FBF8F5'>"+today+"</td>";
//			} else {
	            if(now_year==year && now_month==month && now_day==today) today="<b>"+today+"</b>";
				if(i==0){ outStr += "<td class=calendar style='color:ED1C24;cursor:hand' onMouseover=this.style.backgroundColor='#DEDEDE' onMouseout=this.style.backgroundColor='' onClick=\""+action_script+"\">"+today+"</td>"; continue; }
	            if(i==6){ outStr += "<td class=calendar style='color:0000FF;cursor:hand' onMouseover=this.style.backgroundColor='#DEDEDE' onMouseout=this.style.backgroundColor='' onClick=\""+action_script+"\">"+today+"</td>"; continue; }
	            outStr += "<td class=calendar style='cursor:hand' onMouseover=this.style.backgroundColor='#DEDEDE' onMouseout=this.style.backgroundColor='' onClick=\""+action_script+"\">"+today+"</td>";
//			}
		}
        outStr += "</tr>\n";
    }
    outStr += "</table></td></tr></table>";

//	if(now_year==year && now_month==month) {
//	    month_link = (month > 1)? "<font style='text-decoration:none;color:#474747;'>¢·</font> <font color=#474747>ÀÌµ¿":"<a onClick=\"cal("+(year-1)+",12,"+day+",'')\" style='text-decoration:none; color:#474747; cursor:hand'>¢·</a> <font color=#474747>ÀÌµ¿";
//	} else {
		month_link = (month > 1)? "<a onClick=\"cal("+year+","+(month-1)+","+day+",'')\" style='text-decoration:none; color:#474747; cursor:hand'>¢·</a> <font color=#474747>ÀÌµ¿":"<a onClick=\"cal("+(year-1)+",12,"+day+",'')\" style='text-decoration:none; color:#474747; cursor:hand'>¢·</a> <font color=#474747>ÀÌµ¿";
//	}
    month_link += (month < 12)? "</font> <a onClick=\"cal("+year+","+(month+1)+","+day+",'')\" style='text-decoration:none; color:#474747; cursor:hand'>¢¹</a>":"</font> <a onClick=\"cal("+(year+1)+",1,"+day+",'')\" style='text-decoration:none; color:#474747; cursor:hand'>¢¹</a>";

    //HTML ´ëÀÔ
    document.all.G_cal_body.innerHTML = outStr;
//    document.all.G_cal_year.innerHTML = "<a onClick=\"cal("+(year-1)+","+month+","+day+",'')\" style='text-decoration:none; color:#909090; cursor:hand'>¢·</a> <font color=black>"+year+"</font> <a onClick=\"cal("+(year+1)+","+month+","+day+",'')\" style='text-decoration:none; color:#909090; cursor:hand'>¢¹</a>";
	document.all.G_cal_year.innerHTML = "<b><font color=#F26522>"+year+"³â "+month+"¿ù</font></b> &nbsp;";
    document.all.G_cal_month.innerHTML = month_link;
}

function onoff_Gcal(){
    document.all.G_cal.style.top = event.clientY+window.document.body.scrollTop+10;
    document.all.G_cal.style.left = event.clientX+window.document.body.scrollLeft-50;
    document.all.G_cal.style.visibility = (document.all.G_cal.style.visibility=="hidden")?"":"hidden";
}

document.writeln("<style>td.calendar{font-size:9pt;font-family:±¼¸²;color:4B4B4B; background-color:white}</style>");
document.writeln(""
+"<div id=G_cal style='width=160;position:absolute;visibility:hidden'>"
+"<table bgcolor=#EEEEEE width=160 height=22 border=0 cellpadding=3 cellspacing=0 style='border:1x solid #DADADA'>"
+" <tr><td style='font-size:9pt;font-family:±¼¸²;background:#ffffff'><span id=G_cal_year></span></td>"
+" <td style='font-size:9pt;font-family:±¼¸²;background:#ffffff;text-align:right'><span id=G_cal_month></span>"
+" </td></tr>"
+"</table>"
+"<div id=G_cal_body style='width:160'>"
+"</div></div>");



function getReal(el,type,value){
	temp=el;
	
	while((temp!=null)&&(temp.tagName!="BODY")){
		if(eval("temp."+type)==value){
			el=temp;return el;
		}
		
		temp=temp.parentElement;
	}
	return el;
}

function findChildren(el,type,value){
	var children=el.children;
	var tmp=new Array();
	var j=0;
	
	for(var i=0;i<children.length;i++){
		
		if(eval("children[i]."+type+"==\""+value+"\"")){
			tmp[tmp.length]=children[i];
		}
		
		tmp=tmp.concat(findChildren(children[i],type,value));
	}
	
	return tmp;
}

function disable(el){
	
	if(document.readyState!="complete"){
		window.setTimeout("disable("+el.id+")",100);
		return;
	}
	
	var cDisabled=el.cDisabled;
	cDisabled=(cDisabled!=null);
	
	if(!cDisabled){
		el.cDisabled=true;
		
		if(document.getElementsByTagName){
			el.innerHTML="<span style='background: buttonshadow; filter: chroma(color=red) dropshadow(color=buttonhighlight, offx=1, offy=1); height: 100%;'>"+"<span style='filter: mask(color=red); height: 100%;'>"+el.innerHTML+"</span>"+"</span>";
		}else{
			el.innerHTML='<span style="background: buttonshadow; width: 100%; height: 100%; text-align: center;">'+'<span style="filter:Mask(Color=buttonface) DropShadow(Color=buttonhighlight, OffX=1, OffY=1, Positive=0); height: 100%; width: 100%; text-align: center;">'+el.innerHTML+'</span>'+'</span>';
		}
		
		if(el.onclick!=null){
			el.cDisabled_onclick=el.onclick;el.onclick=null;
		}
	}

	// if button is not pressed
	if(el.style.backgroundImage=="") makeFlat(el);
}


//CoolButton
function enable(el){
	var cDisabled=el.cDisabled;
	cDisabled=(cDisabled!=null);
	if(cDisabled){
		el.cDisabled=null;
		el.innerHTML=el.children[0].children[0].innerHTML;
		
		if(el.cDisabled_onclick!=null){
			el.onclick=el.cDisabled_onclick;
			el.cDisabled_onclick=null;
		}
	}
}

function addToggle(el){
	var cDisabled=el.cDisabled;
	cDisabled=(cDisabled!=null);
	var cToggle=el.cToggle;
	cToggle=(cToggle!=null);
	
	if(!cToggle&&!cDisabled){
		el.cToggle=true;
		
		if(el.value==null) el.value=0;

		if(el.onclick!=null) el.cToggle_onclick=el.onclick;
		else el.cToggle_onclick="";
		
		el.onclick=new Function("toggle("+el.id+"); "+el.id+".cToggle_onclick();");
	}
}


function removeToggle(el){
	
	var cDisabled=el.cDisabled;
	cDisabled=(cDisabled!=null);
	var cToggle=el.cToggle;
	cToggle=(cToggle!=null);
	
	if(cToggle&&!cDisabled){
		el.cToggle=null;
		
		if(el.value){
			toggle(el);
		}
		
		makeFlat(el);
		
		if(el.cToggle_onclick!=null){
			el.onclick=el.cToggle_onclick;
			el.cToggle_onclick=null;
		}
	}
}

function toggle(el){
	
	el.value=!el.value;
	
	if(el.value) el.style.background="URL(/images//tileback.gif)";
	else el.style.backgroundImage="";
}

function makeFlat(el){
	
	with(el.style){
		background="";
		border="1px solid buttonface";
		padding="1px";
	}
}

function makeRaised(el){
	with(el.style){
		borderLeft="1px solid buttonhighlight";
		borderRight="1px solid buttonshadow";
		borderTop="1px solid buttonhighlight";
		borderBottom="1px solid buttonshadow";
		padding="1px";
	}
}

function makePressed(el){
	with(el.style){
		borderLeft="1px solid buttonshadow";
		borderRight="1px solid buttonhighlight";
		borderTop="1px solid buttonshadow";
		borderBottom="1px solid buttonhighlight";
		paddingTop="2px";
		paddingLeft="2px";
		paddingBottom="0px";
		paddingRight="0px";
	}
}

function makeGray(el,b){
	var filtval;
	if(b) filtval="gray()";
	else filtval="";
	var imgs=findChildren(el,"tagName","IMG");
	for(var i=0;i<imgs.length;i++){
		imgs[i].style.filter=filtval;
	}
}
	
document.write("<style>");
document.write(".coolBar	{background: buttonface;border-top: 1px solid buttonhighlight;	border-left: 1px solid buttonhighlight;	border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; padding: 2px; font: menu;}");
document.write(".coolButton {border: 1px solid buttonface; padding: 1px; text-align: center; cursor: default;}");
document.write(".coolButton IMG	{filter: gray();}");
document.write("</style>");
