  /*window.onload=function(){
  	var width_max = 400;
  	var height_max = 300;
  	var resize = document.getElementsByTagName('img');
  	var num = resize.length;
  	var i;
  	for(i=0;i<num;i++){
    	if(resize[i].width > width_max) {
    	  resize[i].height = parseInt(resize[i].height*width_max/resize[i].width);
    	  resize[i].width = width_max;
    	}
    	if(resize[i].height > height_max) {
    	  resize[i].width = parseInt(resize[i].width*height_max/resize[i].height);
    	  resize[i].height = height_max;
    	}
  	}
  }*/

function move_box(an, box) {
//링크된 위치에서 부터의 설정값 지정
  var cleft = 20;  //왼쪽마진  
  var ctop = -10;  //상단마진
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv);

  return false;
    }

  function clipboard_copy(str){
    if(window.clipboardData){
      return window.clipboardData.setData("Text",str);
    }
    return false;
  }
  function radio_value(form,tname){
    var f=document.getElementById(form);
    var obj=f.getElementsByTagName('input');
    for(var i=0;i<obj.length;i++){
      if(obj[i].name==tname && obj[i].checked==true) return obj[i].value;
    }
    return false;
  }
  var file_add_no=2;
  function upload_add_file(){
    if(file_add_no == 9999){alert('당신의 근성은 최고입니다 ㅠㅠ)b\n이제 더이상 추가는 하지 말아주세요');}
    var upload=document.getElementById('upload');
    /*var tn=document.createTextNode(file_add_no+'. ');
    var name=file_add_no-1;
    upload.appendChild(tn);
    var cinput = document.createElement('input');

    cinput.type='file';
    cinput.name='file_' + name;
    cinput.size=65;
    cinput.className='files';
    //cinput.style.width='450px';

    upload.appendChild(cinput);

    var br = document.createElement('br');
    upload.appendChild(br);*/
    upload.innerHTML+=file_add_no+'. <input type="file" name="file_'+(file_add_no-1)+'" class="files" size="65" /><br />\n';
    file_add_no=file_add_no+1;
    return true;
  }
  function fade(obj){
    if(obj.style.display=='block'){
      obj.style.display='none';
    } else {
      obj.style.display='block';
    }
    return true;
  }
  var google_ad_client = "pub-7847180432870173";
  /* 336x280, 작성됨 09. 1. 28 */
  var google_ad_slot = "3818833386";
  var google_ad_width = 336;
  var google_ad_height = 280;
