// JavaScript Document
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_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_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 pop_idfind(){
	var newwin=window.open("id_find.php", "attricreate", "width=660, height=400, resizable=no, status=no, scrollbars=no");
}
	
function pop_mainidfind(){
	var newwin=window.open("intranet/id_find.php", "attricreate", "width=660, height=400, resizable=no, status=no, scrollbars=no");
}
	
function pop_post(){
	var newwin=window.open("pop_post.php", "attricreate", "width=600, height=300, resizable=no, status=no, scrollbars=no");
}
	
function pop_postadmin(){
	var newwin=window.open("../recruit/pop_post.php", "attricreate", "width=600, height=300, resizable=no, status=no, scrollbars=no");
}
		
function preview1(){
	var newwin=window.open("register_preview1.php", "attricreate", "width=810, height=700, top=0, resizable=no, status=no, scrollbars=yes");
}
	
function preview2(){
	var newwin=window.open("register_preview2.php", "attricreate", "width=810, height=700, top=0, resizable=no, status=no, scrollbars=yes");
}
		
function closewin(){
	window.close();
}

function loginform_clearbg(type) {
	if (type == "id") {
		document.loginForm.user_id.style.backgroundImage = '';
		document.loginForm.user_id.style.backgroundColor  = '#ffffff';

	} else if (type == "pw") {
		document.loginForm.user_passwd.style.backgroundImage = '';
		document.loginForm.user_passwd.style.backgroundColor  = '#ffffff';
	}
}

function initPage(){
	if(loginForm.user_id.value.length>0)
		loginForm.user_passwd.focus();
	else
		loginForm.user_id.focus();
}

function checkForm(form){
	if(form.user_id.value==""){
		alert("È¸¿ø¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		form.user_id.focus();
		return false;
	}

	if(form.user_passwd.value==""){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		form.user_passwd.focus();
		return false;
	}
	return true;
}

function service_msg(){
	alert("ÁË¼ÛÇÕ´Ï´Ù. ¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù. ");
}

//ÄÁÅÙÃ÷ ÇÁ¸°Æ®
function contentPrint() {
    var windowLeft = (screen.width-640)/2;
    var windowTop = (screen.height-480)/2;
    var printURL = "../common/forPrint.html";

    window.open(printURL,"pop_print",'width=700, height=500, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}

//========================================================================//
// for ÀÌ¿Ã¶ó½º¹®Á¦ÇØ°á°Ç                                                 //
// playObject( swf_filepath, width, height, wtransparent¸é 1, ¾Æ´Ï¸é 0 );
//========================================================================//
function playObject( sObjSrc, nWidth, nHeight, sWMode ){
  document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
  document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0' ");
  document.write("width='" + nWidth + "' height='" + nHeight + "'>");
  document.write("<param name='movie' value='" + sObjSrc + "'>");
  document.write("<param name='quality' value='high'>");
  if( sWMode == 1 )
    document.write("<param name='wmode' value='transparent'>");
  document.write("<embed src='" + sObjSrc + "' ");
  document.write("quality='high' ");
  document.write("pluginspage='http://www.macromedia.com/go/getflashplayer' ");
  document.write("type='application/x-shockwave-flash' ");
  document.write("width='" + nWidth + "' height='" + nHeight + "'></embed> ");
  document.write("</object>");
}