//*****************************************************************************
// Description :
// Parameter:
// Return: 없음
// 호출페이지 : quick_search.jsp
//*****************************************************************************
function partnum() {

	form = document.quicksearch;

	var webpartnum = form.search1.value;
	var cdnpartnum = form.search2.value;
	
	// Trim
	webpartnum = webpartnum.replace(/^\s*|\s*$/g, "");
	cndpartnum = cdnpartnum.replace(/^\s*|\s*$/g, "");

	if(webpartnum == "" && cdnpartnum == ""){

		alert(msgAllNumBlank);
		return false;

	}else if(webpartnum == "" && cdnpartnum != ""){

		alert(msgWebNumBlank);
		return false;

	} else {
		
		if(webpartnum.length < 4) {

			alert(msgWebNumLength);
			return false;

		} else {

			form.action = "/global/business/semiconductor/partnumberSearch.do?webpartnum="+webpartnum+"&cdnpartnum="+cdnpartnum+"&ppmi=PartnoSearch";
			form.submit();

		}

	}

}


//*****************************************************************************
// Description : 선택된 파일 New Window로 열어준다.
// Parameter:  선택된 파일 URI
// Return: 없음
// 호출페이지 : productinfo.js
//*****************************************************************************
function fileAction(url) {
	var vUrl = "http://www.samsung.com" + url;
	newWindow(650,	500, vUrl, 1);
}


//*****************************************************************************
// Description : 선택된 파일을 다운로드
// Parameter: key(package key값)
// Return: 없음
// 호출페이지 : quick-search.jsp
//*****************************************************************************
function filedown(doc_file){

	var frm = document.quicksearch;

	frm.action = "/global/business/semiconductor/productRightMenuDown.do?doc_file="+doc_file;
	frm.submit();
}



function parametricSearch(){
	document.location = "/global/business/semiconductor/productsearch/parametricsearch/ProductSearch_ParametricSearch_List.html";
}

function orderingInformation(){


	var frm = document.quicksearch;

	frm.action = "/global/business/semiconductor/partnumberDecoder.do";
	frm.submit();


}

function tip(){

	var vUrl = "/global/business/semiconductor/productsearch/partno_search/ProductSearch_Tip.html";
	openWindow(580,	480, vUrl, 1);

}

var chkmouseout = 0;

function chkselectview(obj){
	obj.focus();
	if(document.getElementById('selectfstpartnumber').style.display== 'none'){
		document.getElementById('selectfstpartnumber').style.display= 'block'
	}else if(document.getElementById('selectfstpartnumber').style.display== 'block'){
		document.getElementById('selectfstpartnumber').style.display = 'none'
	}

}
			
function changecolor(mode, obj){
	obj.style.cursor='default';
	if(mode == 'over'){
		chkmouseout = 1;
		obj.style.backgroundColor = '#eee9e5';
	}else if(mode == 'out'){
		obj.style.backgroundColor = '#ffffff';
	}
	

}

function clickcodevalue(obj){
	document.getElementById("outfstvalue").value = obj.id;
	document.getElementById("codesearch").submit();

}

function checkfocusout(){
	obj = document.getElementById('selectfstpartnumber');
	if(chkmouseout == 1){
		obj.style.display ='block';
	}else if( chkmouseout == 0 ){
		obj.style.display ='none';
	}

}