/*navi*/
//company
function company01() {document.location.href='/company/about.php';}
function company02() {document.location.href='/company/today_list.php';}
function company03() {document.location.href='/company/contact.php';}
//products
function products01() {document.location.href='/products/oncology.php';}
function products0102() {document.location.href='/products/oncology_02.php';}
function products0103() {document.location.href='/products/oncology_03.php';}
function products0104() {document.location.href='/products/oncology_04.php';}
function products0105() {document.location.href='/products/oncology_05.php';}

function products02() {document.location.href='/products/trans.php';}
function products0202() {document.location.href='/products/trans_02.php';}
function products0203() {document.location.href='/products/trans_03.php';}
function products0204() {document.location.href='/products/trans_04.php';}

function products03() {document.location.href='/products/virology.php';}
function products0302() {document.location.href='/products/virology_02.php';}

function products04() {document.location.href='/products/quality.php';}

function products05() {document.location.href='/products/research.php';}

function products06() {document.location.href='/products/brand.php';}
function products0602() {document.location.href='/products/brand_02.php';}
function products0603() {document.location.href='/products/brand_03.php';}
//careers
function careers01() {document.location.href='/careers/lifedow_list.php';}
function careers02() {document.location.href='/careers/joining.php';}
function careers0201() {document.location.href='/careers/joining_01.php';}
function careers0202() {document.location.href='/careers/recruitment_list.php';}
function careers0203() {document.location.href='/careers/joining_03.php';}
//newsroom
function newsroom01() {document.location.href='/newsroom/advertis_list.php';}
function newsroom02() {document.location.href='/newsroom/news_list.php';}










function SetSkin(Skin_Color){ 
	setCookie( "skin_ck", Skin_Color , 1000); 	
	self.location.reload()
}

function setCookie( name, value, expiredays )
{
 var todayDate = new Date(); 
 todayDate.setDate( todayDate.getDate() + expiredays );
 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name ){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
			endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		
		x = document.cookie.indexOf( " ", x ) + 1;
		
		if ( x == 0 ) break;
	}
			return "";
}


//ÀÎÇ²¹Ú½º Å¬¸¯½Ãº¸´õ°ª º¯°æ
function focus_on1_blue(str) {
	(str).style.border='1px solid #006DD2';
	(str).style.background='#ffffff';
}
function focus_on1_orange(str) {
	(str).style.border='1px solid #F7883D';
	(str).style.background='#ffffff';
}
function focus_on1_sky(str) {
	(str).style.border='1px solid #38A8E7';
	(str).style.background='#ffffff';
}
function focus_on1_green(str) {
	(str).style.border='1px solid #07B91C';
	(str).style.background='#ffffff';
}
function focus_on1_gray(str) {
	(str).style.border='1px solid #8F8F8F';
	(str).style.background='#ffffff';
}

function focus_off1(str) {
	(str).style.border='1px solid #cdcdcd';
	(str).style.background='#ffffff';
}

function focus_on2(str) {
	(str).style.border='1px solid #8F8F8F';
	(str).style.background='#F7F5F7';
}

function focus_off2(str) {
	(str).style.border='1px solid #cdcdcd';
	(str).style.background='#F7F5F7';
}


//2´Ü°è¸Þ´º ÆîÄ§
function leftMenu(menuIdx){
 for(i=1 ; i<=12 ; i++){
 try{
 objLayer = document.getElementById("leftSubMenu"+i);
// objImg = document.getElementById("leftMenuImg"+i);

 if(i == menuIdx){
// objImg.src = objImg.src.replace(".gif", "_on.gif");
 objLayer.style.display = "block";
 }else{
// objImg.src = objImg.src.replace("_on.gif", ".gif");
 objLayer.style.display = "none";
 }
 }catch(e){ }
 }
}



//Äü ¸Þ´º
QuickMenu = function(element, startPoint, endPoint) {
 var STATICMENU = element;
 var stmnScrollSpeed = 1;
 var stmnTimer;

 RefreshStaticMenu = function ()
 {
 var stmnStartPoint = parseInt(STATICMENU.style.top, 10);
 var stmnEndPoint = parseInt(document.documentElement.scrollTop, 10)+endPoint;
 var stmnRefreshTimer = 1;

 if ( stmnStartPoint != stmnEndPoint ) {
 stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 17 );
 STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ) + "px";
 stmnRefreshTimer = stmnScrollSpeed;
 }
 stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
 }

 this.InitializeStaticMenu = function ()
 {
 STATICMENU.style.top = startPoint + "px";
 RefreshStaticMenu();
 }
}


//±ÛÀÚÅ©±â
function wdSetFontSize(a) {
 var defaultFontSize = 1;//em
 var minFontSize = 1;//em
 var maxFontSize = 2;//em
 obj = document.getElementById("sub");
 var objFontSize = obj.style.fontSize;
 if (!objFontSize) { objFontSize = parseFloat(defaultFontSize)+"em"; }
 var checkFontSize = (Math.round(12*parseFloat(objFontSize))+(a*2))/12;
 if (checkFontSize >= maxFontSize) { checkFontSize = maxFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ´Ã¸± ¼ö ¾ø½À´Ï´Ù."); }
 else if (checkFontSize <= minFontSize) { checkFontSize = minFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ÁÙÀÏ ¼ö ¾ø½À´Ï´Ù."); }
 else { obj.style.fontSize = checkFontSize+"em"; }
// alert(checkFontSize);
}
function wdSetFontSize_main(a) {
 var defaultFontSize = 1;//em
 var minFontSize = 1;//em
 var maxFontSize = 2;//em
 obj = document.getElementById("main_body");
 var objFontSize = obj.style.fontSize;
 if (!objFontSize) { objFontSize = parseFloat(defaultFontSize)+"em"; }
 var checkFontSize = (Math.round(12*parseFloat(objFontSize))+(a*2))/12;
 if (checkFontSize >= maxFontSize) { checkFontSize = maxFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ´Ã¸± ¼ö ¾ø½À´Ï´Ù."); }
 else if (checkFontSize <= minFontSize) { checkFontSize = minFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ÁÙÀÏ ¼ö ¾ø½À´Ï´Ù."); }
 else { obj.style.fontSize = checkFontSize+"em"; }
// alert(checkFontSize);
}

//ÀÎ¼â
var initBody;
function BeforePrint() {
	initBody = document.body.innerHTML;
	document.body.innerHTML = print_area.innerHTML;
}

function AfterPrint() {
	document.body.innerHTML = initBody;
}

function ReportPrint() {
	window.onbeforeprint = BeforePrint;
	window.onafterprint = AfterPrint;
	window.print();
} 



//ÆË¾÷Á¸
function popupZone(){
	for(i=1;i<=popupItemCount;i++){
		if(popupZoneTmpVal!=1) {
			popupZoneVal = popupZoneTmpVal;
			popupZoneTmpVal = 1;
		}
		if(popupZoneVal == popupItemCount+1)	popupZoneVal = 1;
		if(popupZoneVal==0) popupZoneVal = 1;
		id1 = "popnum"+i
		id2 = "popBanner_"+i
		if(popupZoneVal==i){
			document.getElementById(id1).setAttribute('src',"/img/main/pop_m0"+i+"_on.gif");
			document.getElementById(id2).style.display	= "";
		}else{
			document.getElementById(id1).setAttribute('src',"/img/main/pop_m0"+i+".gif");
			document.getElementById(id2).style.display	= "none";
		}
	}

	popupZoneVal = popupZoneVal + 1;
	autocontrolvar=setTimeout("popupZone()",4000);
}

function popupZoneStop(chk){
	if(chk){
		clearTimeout(autocontrolvar);
	}else{
		clearTimeout(autocontrolvar);
		popupZone();
	}
}

function popupZoneMove(num){
	for(i=1;i<=popupItemCount;i++){
		id1 = "popnum"+i
		id2 = "popBanner_"+i
		if(num==i){
			document.getElementById(id1).setAttribute('src',"/img/main/pop_m0"+i+"_on.gif");
			document.getElementById(id2).style.display	= "";
		}else{
			document.getElementById(id1).setAttribute('src',"/img/main/pop_m0"+i+".gif");
			document.getElementById(id2).style.display	= "none";
		}
	}
	popupZoneVal = num;
	popupZoneTmpVal = num;
	popupZoneStop(1);
}


function popupZoneShow(type){
	if(type){
		document.getElementById("spot_1").style.display = "none";
		document.getElementById("spot_2").style.display = "";
	}else{
		document.getElementById("spot_1").style.display = "";
		document.getElementById("spot_2").style.display = "none";
	}
}


//ÁÖ¸Þ´º ÆîÄ§
function menuMouseOver(idx){
	var objImage;
	var objLayer;
	var objLayer2;

	for(i=1 ; i<=8 ; i++){
	try{objImage = document.getElementById("menuimg"+i);}catch(err){objImage=null;}
	try{objLayer = document.getElementById("menu"+i+"01");}catch(err){objLayer=null;}
	try{objLayer2 = document.getElementById("menuz"+i+"01");}catch(err){objLayer=null;}

		if(i == idx){
			if(objImage){objImage.src = objImage.src.replace(i+".gif", i+"_on.gif");}
			if(objLayer){objLayer.style.display = "block";}
			if(objLayer2){objLayer2.style.display = "block";}
		}else{
			if(objImage){objImage.src = objImage.src.replace(i+"_on.gif", i+".gif");}
			if(objLayer){objLayer.style.display = "none";}
			if(objLayer2){objLayer2.style.display = "none";}
		}
	}
}

function submenuimgMouseOver(idx, subIdx){
	objImage = document.getElementById("submenuimg"+idx+""+subIdx);
	objImage.src = objImage.src.replace("menu"+idx+"0"+subIdx+".", "menu"+idx+"0"+subIdx+"_on.");
}

function submenuimgMouseOut(idx, subIdx){
	objImage = document.getElementById("submenuimg"+idx+""+subIdx);
	objImage.src = objImage.src.replace("menu"+idx+"0"+subIdx+"_on.", "menu"+idx+"0"+subIdx+".");
}


//ÀüÃ¼¸Þ´ºÆîÄ§
function if_showhidden(zz) {
 var obj = document.getElementById(zz);
 if(obj.style.display == "none" || obj.style.display == "") {
 obj.style.display = "block";
 } else {
 obj.style.display = "none";
 }
}


//¹è³Ê
var mtickerEl = new Array();
function initmTicker(mtickerContainer, mtickerContent, delay) {
 mtickerEl[mtickerEl.length] = mtickerContainer;
 var speed = 10; 
 var mtickerElsum = 1; 
 mtickerContainer.delay = delay/(speed/mtickerElsum); 
 mtickerContainer.moveOffset = mtickerContainer.offsetHeight;
 mtickerContainer.count = 0;
 mtickerContainer.mtickerOver = false;
 mtickerContainer.cont = mtickerContent;
 mtickerContainer.cont.currentHeight = 0;
 mtickerContainer.move = setInterval("movemTicker()", speed);
 for (i=0; i<mtickerEl.length; i++) {
 mtickerEl[i].onmouseover = function() { this.mtickerOver=true; }
 mtickerEl[i].onmouseout = function() { this.mtickerOver=false; }
 }
}
function movemTicker() {
 for (i=0; i<mtickerEl.length; i++) {
 if (mtickerEl[i].cont.currentHeight % mtickerEl[i].moveOffset == 0 && mtickerEl[i].count < mtickerEl[i].delay) {
 if(!mtickerEl[i].mtickerOver) mtickerEl[i].count++;
 } else {
 mtickerEl[i].count = 0;
 mtickerEl[i].cont.currentHeight -= mtickerEl[i].moveOffset;
 if (mtickerEl[i].cont.currentHeight % (mtickerEl[i].cont.offsetHeight) == 0) {
 mtickerEl[i].cont.currentHeight = 0;
 }
 mtickerEl[i].cont.style.top = mtickerEl[i].cont.currentHeight + "px";
 }
 }
}
function prevmTicker(mtickerElnum) {
 var mtickerElnum = mtickerElnum-1;
 mtickerEl[mtickerElnum].count = 0;
 mtickerEl[mtickerElnum].cont.currentHeight+= mtickerEl[mtickerElnum].moveOffset;
 if (-mtickerEl[mtickerElnum].cont.currentHeight < 0) {
 mtickerEl[mtickerElnum].cont.currentHeight = mtickerEl[mtickerElnum].moveOffset-mtickerEl[mtickerElnum].cont.offsetHeight;
 }
 mtickerEl[mtickerElnum].cont.style.top = mtickerEl[mtickerElnum].cont.currentHeight + "px";
}
function nextmTicker(mtickerElnum) {
 var mtickerElnum = mtickerElnum-1;
 mtickerEl[mtickerElnum].count = 0;
 mtickerEl[mtickerElnum].cont.currentHeight-= mtickerEl[mtickerElnum].moveOffset;
 if (-mtickerEl[mtickerElnum].cont.currentHeight >= mtickerEl[mtickerElnum].cont.offsetHeight) {
 mtickerEl[mtickerElnum].cont.currentHeight = 0;
 }
 mtickerEl[mtickerElnum].cont.style.top = mtickerEl[mtickerElnum].cont.currentHeight + "px";
}


//¸ÞÀÎ °øÁö»çÇ×
function viewList(a){
 for(var i=1;i<3;i++){
 obj = document.getElementById("hlist"+i);
 obj2 = document.getElementById("tab"+i);
	if (i>1)
	{
		 obj3 = document.getElementById("tab"+(i-1));
	}
 if(a==i){
 obj.style.display = "block";
 obj2.setAttribute("src","/img/main/notice0"+i+"_on.gif");
 }else{
 obj.style.display = "none";
 obj2.setAttribute("src","/img/main/notice0"+i+".gif");
 }
 }
}

//±¹Á¤
function viewListt(a){
 for(var i=1;i<3;i++){
 obj = document.getElementById("hlistt"+i);
 obj2 = document.getElementById("tabt"+i);
 if(a==i){
 obj.style.display = "block";
 obj2.setAttribute("src","/img/main/briping0"+i+"_on.gif");
 }else{
 obj.style.display = "none";
 obj2.setAttribute("src","/img/main/briping0"+i+".gif");
 }
 }
}


//±³À°º¹Áö ¸ÞÀÎ °øÁö»çÇ×
function viewList2(a){
 for(var i=1;i<4;i++){
 obj = document.getElementById("hlist"+i);
 obj2 = document.getElementById("tab"+i);
	if (i>1)
	{
		 obj3 = document.getElementById("tab"+(i-1));
	}
 if(a==i){
 obj.style.display = "block";
 obj2.setAttribute("src","/edu/imgs/notice0"+i+"_on.gif");
 }else{
 obj.style.display = "none";
 obj2.setAttribute("src","/edu/imgs/notice0"+i+".gif");
 }
 }
}


//ÀÌ¹ÌÁö·Ñ¸µ

// ÇØ´ç Å¸°ÙÀÇ ÀÌ¹ÌÁö º¯°æ
function oversubimg(id) {
 document.getElementById(id).src = document.getElementById(id).src.replace("_off.gif", "_on.gif");
}
// ÇØ´ç Å¸°ÙÀÇ ÀÌ¹ÌÁö º¯°æ
function outsubimg(id) {
 document.getElementById(id).src = document.getElementById(id).src.replace("_on.gif", "_off.gif");
}




//·¹ÀÌ¾î ·Ñ¿À¹ö½Ã ³ª¿À°Ô...2010-04-01 ¿ÀÈÄ 7:59
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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

