<!--
/*******************************************************************************
* 마우스 우틀릭 금지 처리
********************************************************************************/

/*
if (window.Event) // 넷스케이프에서만 대문자 E. 

document.captureEvents(Event.MOUSEUP); // mouse up 이벤트를 잡음 

function nocontextmenu() { // IE4에서만 적용, 다른 브라우저는 무시 
	event.cancelBubble = true; 
	event.returnValue = false; 
	return false; 
} 

function norightclick(e) {// 다른 모든 브라우저에서 작동 
	if (window.Event) { 
		if (e.which == 2 || e.which == 3) {
			return false; 
		}
	}

	else {
		if (event.button == 2 || event.button == 3) { 
			event.cancelBubble = true; 
			event.returnValue = false; 
			return false; 
		} 
	}
} 

document.oncontextmenu = nocontextmenu; // IE5+ 용 
document.onmousedown = norightclick; // 다른 브라우저 용 
*/


/*******************************************************************************
* PNG img
*******************************************************************************/
function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='/images/default_imgs/blank.gif'; 
	return '';
    }

function autoblur() {
        if(event.srcElement.tagName == "A") document.body.focus();
	}
document.onfocusin = autoblur;

/*******************************************************************************
* ũ  ֱ
*******************************************************************************/
function autoblur() {
        if(event.srcElement.tagName == "A") document.body.focus();
	}
document.onfocusin = autoblur;

/*******************************************************************************
* հ˻-͸ũ
*******************************************************************************/
var watermarkTextId = "검색어를 입력하세요.";

function init(){
	//showWatermark(1);
}

function showWatermark(id){
 var objID = document.getElementById("watermark_text");
 
 switch(id){
  case 1:
   if(objID.value == ""){
    objID.value=watermarkTextId;
   }
   break;  
 }
}
function hideWatermark(id){
 var objID = document.getElementById("watermark_text");
 switch(id){
  case 1:
   if(objID.value==watermarkTextId){
    objID.value="";
   }
   break;
 }
}
/*******************************************************************************
* selectbox style
*******************************************************************************/
function ItemAdd(objname, textname, valuename)
{
	var obj = document.getElementById(objname);
	obj.add(new Option(document.getElementById(textname).value,document.getElementById(valuename).value));
	obj.reInitializeSelectBox();
}

/*******************************************************************************
* show,hidden(ü)
*******************************************************************************/
 //̾ ˾ 
 function openLayer(IdName, tpos, lpos){
  var pop = document.getElementById(IdName);
  pop.style.display = "block";
  pop.style.top = tpos + "px";
  pop.style.left = lpos + "px";
 }
 //̾ ˾ ݱ
 function closeLayer(IdName){
  var pop = document.getElementById(IdName);
  pop.style.display = "none";
 }

 function goMove(){ 
	   var form = document.sitemap; //form 이름과 같은 이름을 넣으세요. 
	   var txt= form.menuName.options[form.menuName.selectedIndex].text; 
	   var val= form.menuName.options[form.menuName.selectedIndex].value; 
		
	   if(val != ' '){ 
			   form.action= val; 
			   form.submit(); 
	   } 
} 


/*******************************************************************************
* pouup open()
*******************************************************************************/
function email_send(mailcode,maincode,no){//이메일 보내기
	window.open ('/contents_info/popup_email_send.asp?mailcode='+mailcode+'&maincode='+maincode+'&no='+no,'email_send','width=540px, height=470px, scrollbars=no');
}

function popup_print(printCode,maincode,no){//인쇄 미리보기
	window.open ('/contents_info/popup_print_view.asp?printCode='+printCode+'&maincode='+maincode+'&no='+no,'email_send','width=640px, height=750px, scrollbars=yes');
}

function openEmailSend() {
	window.open ('https://contactus.samsung.com/customer/contactus/formmail/mail/MailQuestionProduct.jsp?SITE_ID=2&PROD_ID=29','email_send','width=700px, height=800px, scrollbars=yes');
}

function popup_modelName() {
	window.open ('/contents_info/popup_ModelName_check.asp','popup_modelName','width=580px, height=500px, scrollbars=yes');
}

/*******************************************************************************
* 폼 자동 이동
*******************************************************************************/
function moveFocus(num,fromform,toform) {
  var str = fromform.value.length;
  if(str == num)
  toform.focus();
 }


/*******************************************************************************
* 숫자키 only
*******************************************************************************/
function onlyNum(){
	/*
	49 - 58 : 숫자							65 - 90 : a - z
	97 - 106: number pad 숫자		8  : 백스페이스
	9  : 탭										20 : Num Lock
	35 : HOME								36 : END
	37 : <- (좌화살표)						39 : -> (우화살표)
	46 : DEL									190: . (소숫점)
	110: . (number pad 소숫점)		229:한/영/한자 키
	*/

  if (event.ctrlKey || event.shiftKey || event.altKey) {
    event.cancelBubble = true;
	event.returnValue = false;
	return false;
	}

  if ((event.keyCode > 7 && event.keyCode < 11) || event.keyCode > 34 && event.keyCode < 40 || (event.keyCode > 46 && event.keyCode < 60) || (event.keyCode > 95 && event.keyCode <107) || (event.keyCode==110) ||(event.keyCode==190)){
    event.cancelBubble = true;
	event.returnValue= true;
	return true;
	}
  else {
    event.cancelBubble = true;
	event.returnValue = false;
	return false;
	}
  }


/*******************************************************************************
* 제품검색 페이지 이동
*******************************************************************************/
function gotoFirstAction(lang,mainCode) {
	if (mainCode == "") {
		document.location.href='/index_productsSearch.asp';
	
	}else {
		if (mainCode == "Y") {
			//우측메뉴의 다운로드 를 클릭하고 제품군 및 제품 검색시 다운로드 항목이 페이지 최상단에 위치하기 위한 처리
			document.location.href='/index_productsSearch.asp?isDownload='+mainCode
		}else {
			
			document.location.href='/index_productsSearch.asp?mainCode='+mainCode;
		}
	}
}


/*******************************************************************************
* 언어설정 변경
*******************************************************************************/
function goChangeLang() {
	var frm = document.changeLangFrm;
	frm.method='post';
	frm.action='/common/lang/language.asp';
	frm.submit();
}


/*******************************************************************************
* 파일다운로드
*******************************************************************************/

function file_download(arg) {
	var frm = document.fileFrm;
	frm.filename.value = arg;
	
	//alert(frm.filename.value);
	frm.method='post';
	frm.action = '/include/FileDownload.asp';
	frm.submit();
}

/*******************************************************************************
//download Tab
*******************************************************************************/
function TabMenu(index) {
        for (i=1; i<=4; i++)
        if (index == i) {
        thisMenu = eval("tab" + index + ".style");
        thisMenu.display = "";
        } 
        else {
        otherMenu = eval("tab" + i + ".style"); 
        otherMenu.display = "none"; 
	}
}

//-->
