	
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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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 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_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_showHideTables() { //v3.0
  var i,p,d,v,obj,args=MM_showHideTables.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  	if ((obj=MM_findObj(args[i]))!=null) 
	{ 
	
	obj.onMouseOut="";
	
		v=args[i+2];
   		if (obj.style) 
		{ 
			obj=obj.style; 
			v=(v=='show')?'visible':(v='hide')?'hidden':v; 
		}
	    obj.visibility=v; 
		d=(v=='visible')?'inline':'none';
		obj.display=d;
	}
}

function MM_showHideTables2() { //v3.0
  var i,p,d,v,obj,args=MM_showHideTables2.arguments;

  if ((obj=MM_findObj(args[0]))!=null)
  {
	obj.onMouseOut = "";
	
	if (obj.style)
	{
		obj=obj.style;
		v=obj.visibility;
		d=obj.display;
		
		v=(v=='hidden')?'visible':'hidden';
		obj.visibility = v;
		
		d=(v=='visible')?'inline':'none';
		obj.display=d;

	}
  }
  /*  
  
  for (i=0; i<(args.length-2); i+=3) 
  	if ((obj=MM_findObj(args[i]))!=null) 
	{ 
	
	obj.onMouseOut="";
	
		v=args[i+2];
   		if (obj.style) 
		{ 
			obj=obj.style; 
			v=(v=='show')?'visible':(v='hide')?'hidden':v; 
		}
	    obj.visibility=v; 
		d=(v=='visible')?'inline':'none';
		obj.display=d;
	}
	*/
}

function MM_ResetImages()
{
	var i,p,v,obj,args=MM_ResetImages.arguments;
	for(i=0; i<(args.length-1); i+=2)
	{
		if ((obj=MM_findObj(args[i]))!=null)
		{
			v=args[i+1];
			obj.src = v;
		}
	}	
}

function na_open_window(url)
{
  window.open(url,'win','height=380, width=490, toolbar=no, menubar=no, statusbar=no, scrollbars=auto, resizable=yes');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Open_ArticlePrivateWindow(url)
{
	var fullurl = "/sh_web/pds_upload/tblarticleprivate/" + url + "/issue/index.html";
	MM_openBrWindow(fullurl,'magazine','width=740,height=580,status=no,scrollbars=no,top=200,left=150');
}

function Open_ArticlePrivateWindow2(url)
{
	var fullurl = "/sh_web/pds_upload/tblarticleprivate/" + url + "/issue/index.html";
	MM_openBrWindow(fullurl,'magazine','width=1010,height=710,status=no,scrollbars=no,top=0,left=0');
}

function Get_NewsLink(sType)
{
	var newstype = GetControl("Ntype");
	
	newstype.value = sType;
}

function go_news()
{
	var ntype = GetControl("Ntype");

	if (ntype.value == "N")
		location.href = "/sh_web/04_Company/02_Public/01_News_01.aspx";
	else if (ntype.value == "P")
		location.href = "/sh_web/04_Company/02_Public/01_News_02.aspx";
	
}


/* Àü´ÞµÈ ID¿¡ ÇØ´çÇÏ´Â ÄÁÆ®·ÑÀ» ¹ÝÈ¯ */
function GetControl(sCID)
{
	var objItem = document.getElementById(sCID);
	
	if(objItem)
		return objItem;
	else
		return null;
}

/* ÀÔ·Â ¿¡·¯°¡ ¹ß»ýÇÒ °æ¿ì */
/* ÇØ´ç ÄÁÆ®·Ñ·Î Æ÷Ä¿½º¸¦ ÀÌµ¿ÇÏ°í, false¸¦ ¸®ÅÏ */
function ErrInputProc(objCont)
{
	objCont.focus();
	return false;	
}

/* ¹®ÀÚ¿­ÀÇ °ø¹é Á¦°Å */
function trim(strIn)
{
	var strOut = "";

	if (strIn)
		strOut = strIn.replace(/^\s*/,'').replace(/\s*$/, ''); 
	
	return strOut;
}

/*	Null °Ë»ç */
function isNull(objChk)
{
	if(objChk == null)	
		return true;
	else
		return false;
}

/* "" °ø¹é °Ë»ç */
function isEmpty(objChk)
{
	if(trim(objChk.value) == "")	
		return true;
	else
		return false;
}


/* ÀÌ¸ÞÀÏ ÁÖ¼Ò °Ë»ç */
function valid_email(email)
{
	if(trim(email) == "")
		return false;
		
	if(email.match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9]+)+$") == null)
		return false;

	return true;
}

/* °ªÀÇ ¼ýÀÚÇü À¯È¿¼º °Ë»ç */
function valid_numeric(number)
{
	if (number.match(/\D/) != null)
		return false;
	else
		return true;
}

/* °ªÀÇ ¼Ò¼öÇü À¯È¿¼º °Ë»ç */
function valid_dot(number)
{
	if (number.match(/^\d{1}\.\d+/) == null)
		return false;
	else
		return true;
}

/* ÇÏÀÌÇÂ Á¦°Å */
function ReplaceHypen(keyword) 
{
	var st_num,key;
	st_num = keyword.indexOf("-");	
	while (st_num != -1)
	{
		keyword = keyword.replace("-", "");
		st_num  = keyword.indexOf("-");
	}
	key=keyword;
	return key;
}

/*	ÁÖ¹Î¹øÈ£ °Ë»ç */
function valid_KRN(krn) 
{   
	IDtot = 0;
	IDAdd="234567892345";
	
	for(i=0;i<12;i++)
	{
		IDtot=IDtot+parseInt(krn.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1)); 
	}
	
	IDtot = 11-(IDtot%11);
	
	if(IDtot==10) 
		IDtot=0;	
	else if(IDtot==11)
		IDtot=1;	

	if (parseInt(krn.substring(12,13))==IDtot) 
		return true;
	else
		return false;
}

//	Äí±â °¡Á®¿À±â
function GetCookie(name)
{
	var Found = false
	var start, end
	var i=0
	
	while (i <= document.cookie.length)
	{
		start = i
		end = start + name.length
		
		if (document.cookie.substring(start,end) == name)
		{
			Found = true;
			break
		}
		i++
	}
	
	if (Found == true)
	{
		start = end + 1
		end = document.cookie.indexOf(";",start)
		
		if (end < start)
			end = document.cookie.length
			
		return document.cookie.substring(start,end)
	}
	
	return ""
}

//	À¥Áø º¯°æ
function webzine_change(itm)
{
	var objItm = GetControl(itm);
	var arItm = objItm.value.split("|");
	
	if (objItm.value != "")
		location.href="02_Webzine_Column.aspx?sseq=" + arItm[0] + "&category=" + arItm[1] + "&profcode=" + arItm[2];

}


function ClubWin_Load1(club)
{
	switch (club)
	{
		case "cerec":
			MM_openBrWindow("http://www.dentalseminar.co.kr/ds07_cerec/default.aspx","Win_Cerec","height=690, width=920, toolbar=no, menubar=no, statusbar=no, scrollbars=yes, resizable=yes");
			break;
		case "ses":
			MM_openBrWindow("http://www.dentalseminar.co.kr/ds07_ses/default.aspx","Win_Ses","height=690, width=920, toolbar=no, menubar=no, statusbar=no, scrollbars=yes, resizable=yes");
			break;
		case "kplc":
			MM_openBrWindow("http://www.dentalseminar.co.kr/ds07_kplc/default.aspx","Win_Kplc","height=690, width=920, toolbar=no, menubar=no, statusbar=no, scrollbars=yes, resizable=yes");
			break;
	}
}
