﻿


/* 상단 메뉴제어 */
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/* 마우스를 대었을때의 셀 배경색 */

function myColor(num) {
  if (document.all) {
    eval('document.all.cell'+num+'.style.background = "#B30068"');
  }
}

/*마우스를 떼었을때의 셀 배경색 */

function myColorOut(num) {
  if (document.all) {
    eval('document.all.cell'+num+'.style.background = "#FFFFFF"');
  }
}



function swapImage(arg_obj, arg_num, arg_size, arg_flag, arg_option, arg_type){
		
		var oldImgSrc = document.all[arg_obj+"0"].src;
		var newImgSrc = document.all[arg_obj+arg_num].src;

		var tmpTitle = arg_obj + "_title";
		if (arg_obj.substring(0,4) == "PG_I") {
			if (arg_type == 1) {
				document.all[arg_obj+"0"].width = '225';
				document.all[arg_obj+"0"].height = '180';
			}
			else {
				document.all[arg_obj+"0"].width = '551';
				document.all[arg_obj+"0"].height = '414';
			}
		}

		document.all[arg_obj+"0"].src = newImgSrc;	

		if (arg_obj.substring(0,4) == "PIMG") {
			pk_img_title.innerText	= arg_option;
		}	
		
		if (arg_obj.substring(0,4) == "HIMG") {
			document.all[arg_obj+"_title"].innerText = arg_option;
		}
	}



// Gallery script.
// With image cross fade effect for those browsers that support it.
// Script copyright (C) 2004 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
function LoadGallery(pictureName,imageFile,titleCaption,captionText)
{
  if (document.all)
  {
    document.getElementById(pictureName).style.filter="blendTrans(duration=1)";
    document.getElementById(pictureName).filters.blendTrans.Apply();
  }
  document.getElementById(pictureName).src = imageFile;
  if (document.all)
  {
    document.getElementById(pictureName).filters.blendTrans.Play();
  }
  document.getElementById(titleCaption).innerHTML=captionText;
}


/***********************************************
* Center of Page Content link- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}

function centerLay(box, type){
var firefox=document.getElementById&&!document.all
var posX=firefox? pageXOffset+window.innerWidth/2-box.offsetWidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-box.offsetWidth/2
var posY=firefox? pageYOffset+window.innerHeight/2-box.offsetHeight/2 : ietruebody().scrollTop+ietruebody().clientHeight/2-box.offsetHeight/2
if (type=="left")
return posX
else
return posY
}

function overlay(curobj, subobj){
if (document.getElementById){
var subobj=document.getElementById(subobj)
subobj.style.left=centerLay(subobj, "left")+"px"
subobj.style.top=centerLay(subobj, "top")+"px"
subobj.style.visibility="visible"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.visibility="hidden"
}






imgout=new Image(9,9);
imgin=new Image(9,9);

/////////////////BEGIN USER EDITABLE///////////////////////////////
imgout.src="/icons/u.gif";
imgin.src="/icons/d.gif";
///////////////END USER EDITABLE///////////////////////////////////

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide funtion depends on if element is shown or hidden
function shoh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');			
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}
