var S, Sb, s1, s2
function RI(a){
S=a
Sb=a.style.backgroundColor
a.style.color="white"
a.style.backgroundColor="black"
a.style.cursor="hand"
a.onmouseout=new Function('S.style.backgroundColor=Sb;S.style.color=""')
}
function move(fbox, tbox){
var arrFbox=new Array()
var arrTbox=new Array()
var arrCName=new Array()
var arrLookup=new Array()
var c,i
for(i=0; i<tbox.options.length; i++){
  arrLookup[tbox.options[i].text] = tbox.options[i].value
  arrCName[tbox.options[i].text] = tbox.options[i].className
  arrTbox[i] = tbox.options[i].text}
var fLength = 0
var tLength = arrTbox.length
for(i=0; i<fbox.options.length; i++){
  arrLookup[fbox.options[i].text] = fbox.options[i].value;
  arrCName[fbox.options[i].text] = fbox.options[i].className;
  if(fbox.options[i].selected && fbox.options[i].value != "") {
    arrTbox[tLength] = fbox.options[i].text
    tLength++}
  else{
    arrFbox[fLength] = fbox.options[i].text
    fLength++
  }}
fbox.length = tbox.length = 0
for(c=0; c<arrFbox.length; c++){
  var no = new Option()
  no.value = arrLookup[arrFbox[c]]
  no.className = arrCName[arrFbox[c]]
  no.text = arrFbox[c]
  fbox[c] = no}
for(c=0; c<arrTbox.length; c++){
  var no = new Option()
  no.value = arrLookup[arrTbox[c]]
  no.className = arrCName[arrTbox[c]]
  no.text = arrTbox[c]
  tbox[c] = no}
}
function selectAll(box){
for(var i=0; i<box.length; i++)
  if (!box[i].selected) box[i].selected = true
}
function sortAll(box, ch, R){
var arrbox = new Array()
var subbox = new Array()
var arrLookup = new Array()
var arrCName = new Array()
var i, c, v
if (ch){
  for(i=0; i<box.options.length; i++){
	v = (box.options[i].text.substring(2, 3) == " ") ? box.options[i].text.substring(3) : box.options[i].text.substring(4);
	v += " " + box.options[i].value
	arrLookup[v] = box.options[i].value
	arrbox[v] = box.options[i].text
	arrCName[v] = box.options[i].className
	subbox[i] = v}
  subbox.sort()
  if (R.textContent.substring(4) == "¡¶"){
	subbox.reverse()
	R.textContent = R.textContent.substring(0, 4) + "¡¿"}
  else
	R.textContent = R.textContent.substring(0, 4) + "¡¶";
  box.length = 0
  for(c=0; c<subbox.length; c++){
	var no = new Option()
	no.value = arrLookup[subbox[c]]
	no.className = arrCName[subbox[c]]
	no.text = arrbox[subbox[c]]
	box[c] = no}
} else {
  for(i=0; i<box.options.length; i++){
	arrLookup[box.options[i].text] = box.options[i].value
	arrCName[box.options[i].text] = box.options[i].className
	arrbox[i] = box.options[i].text}
  arrbox.sort()
  if (R.textContent.substring(4) == "¡¶"){
	arrbox.reverse()
	R.textContent = R.textContent.substring(0, 4) + "¡¿"}
  else
	R.textContent = R.textContent.substring(0, 4) + "¡¶";
  box.length = 0
  for(c=0; c<arrbox.length; c++){
	var no = new Option()
	no.value = arrLookup[arrbox[c]]
	no.className = arrCName[arrbox[c]]
	no.text = arrbox[c]
	box[c] = no}
  }
}
function See(a,b){
if (a){
 cbox.box1.style.visibility=cbox.box2.style.visibility="hidden"
 PNG.innerHTML="<img src="+a+">"
 PNG.style.zIndex=""
 DOC.innerHTML="«ö·Æ¹«¥kÁäÃö³¬ "+b.textContent
}else{
 cbox.box1.style.visibility=cbox.box2.style.visibility=PNG.innerHTML=DOC.innerHTML=""
 PNG.style.zIndex=-3
}
}
