function goPage(pageName){
	window.location.href=pageName;
}
function isOverSize(fieldName, obj, maxSize) {
	var textLength = 0;
	var returnValue = false;
	for(var i=0;i<obj.value.length;i++){
		if(escape(obj.value.charAt(i)).length>4){
			textLength += 2;
		}else if(obj.value.charAt(i)!='\r'){
			textLength++;
		}
	}
	if(textLength>maxSize){
		alert(filedName+": ÃÖ´ë "+maxSize+" ±ÛÀÚ±îÁö ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
		returnValue = true;
	}
	return returnValue;
}
function trim(stringValue){
	while(stringValue.substring(0, 1)==' ') stringValue = stringValue.substring(1, stringValue.length);
	while(stringValue.substring(stringValue.length-1, stringValue.length)==' ') stringValue = stringValue.substring(0, stringValue.length-1);
	return stringValue;
}
function isNumeric(stringValue){
	var validCharacters = "0123456789";
	var char;
	var returnValue = true;
	if(stringValue.length == 0) return false;
	for(i=0;i<stringValue.length && returnValue==true;i++){
		char = stringValue.charAt(i);
		if(validCharacters.indexOf(char) == -1) returnValue = false;
	}
	return returnValue;
}
function pleaseWait(){
	animateMessage();
	body.style.display = "none";
	processing.style.display = "block";
}
function animateMessage(){
	if (!message.style.color){
		message.style.color="white";
	}
	if (message.style.color=="white"){
		message.style.color="black";
	}else{
		message.style.color="white";
	}
	timer=setTimeout("animateMessage()",500);
}
function printThisPage(){ 
	var bodyContent = document.getElementById('body').innerHTML; 
	var winPrint=window.open("", "", "");
	winPrint.document.open(); 
	winPrint.document.write("<html><head><style>body {background-color: #ffffff;color: #444444;font-family: verdana;font-size: 11px;margin: 5px;} table {background-color: none;color: #444444;font-family: verdana;font-size: 11px;border-collapse: collapse;border: 0px;padding: 0px;margin: 0px;}</style></head><body>");
	winPrint.document.write(bodyContent);
	winPrint.document.write('</body></html>');
	winPrint.document.close(); 
	winPrint.focus(); 
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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.0
  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 && document.getElementById) x=document.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 doTheClock() {
   window.setTimeout( "doTheClock()", 100 );
   t = new Date();
   if(document.all || document.getElementById){
      document.title = t.toString();
   }else{   
      self.status = t.toString();
   }
   window.status = t.toString();
}

function selectMenu1(page, item1, item2){
	menuSelector1.action = page;
	menuSelector1.selectedIndex1.value = item1;
	menuSelector1.selectedIndex2.value = item2;
	menuSelector1.submit();
}

function selectMenu2(page, item1, item2){
	menuSelector2.action = page;
	menuSelector2.selectedIndex1.value = item1;
	menuSelector2.selectedIndex2.value = item2;
	menuSelector2.submit();
}

function expand(index){
	if(index==1){
		nav1.style.visibility='visible';
	}else if(index==2){
		nav2.style.visibility='visible';
	}else if(index==3){
		nav3.style.visibility='visible';
	}else if(index==4){
		nav4.style.visibility='visible';
	}
}

function collapse(index){
	if(index==1){
		nav1.style.visibility='hidden';
	}else if(index==2){
		nav2.style.visibility='hidden';
	}else if(index==3){
		nav3.style.visibility='hidden';
	}else if(index==4){
		nav4.style.visibility='hidden';
	}
}
