/******************************************************************************
 Copyright (c) 2007 Samsung Electronics. All Rights Reserved.
 Project: Samsung.com Site Renewal(2007.01~07)

 File Name : ecosearch.js
 Description : ecosearch JavaScript
 Author : 유재명
 Since : 2007.05.01
 
 Modification Information
 Mod Date Modifier Description
 ---------- -------- ---------------------------
 2007.05.01 유재명   최초 생성
 2007.08.22 김현성   팝업관련 hazardousMaterials_open() 수정
******************************************************************************/

function comp_redirect(){
	window.open('http://c-dance2.samsungsemi.com:443/EcologinCheck.jsp','','width=520,height=250,toolbars=no,status=no,menu=no,scroller=no');
}

//*****************************************************************************
// Description : Material Declaration Sheet 처리    
// Parameter: 없음 
// Return: 없음 
// Usage: onclick="javascript:material_open(vPartNum);" 
//*****************************************************************************
function material_open(vPartNum) {
	var vUrl = "/global/business/semiconductor/ecoMaterialInfoList.do?partnum=" + vPartNum;
	openWindow(816,	760, vUrl, 1); 
}

//*****************************************************************************
// Description : Declaration Letter 처리    
// Parameter: 없음 
// Return: 없음 
// Usage: onclick="javascript:declaration_open(vPartNum, vLead_yn);"  
//*****************************************************************************
function declaration_open(vPartNum, vLead_yn) {
	var vUrl = "/global/business/semiconductor/rohsRequest.do?partnumber=" + vPartNum + "&lead_yn=" + vLead_yn;
	openWindow(571,	760, vUrl, 1); 
}

//*****************************************************************************
// Description : hazardous materials defined in China RoHS 처리    
// Parameter: 없음 
// Return: 없음 
// Usage: onclick="javascript:hazardousMaterials_open(vType);"  
//*****************************************************************************
function hazardousMaterials_open(vType) {
	var vUrl = "/global/business/semiconductor/ecoHazardousMaterialsInfo.do?poptype=" + vType;
	if(vType == "A" || vType == "B" || vType == "C" || vType == "D") {
		openWindow(572,	800, vUrl, 0); 
	} else if(vType == "E" || vType == "F" || vType == "G" || vType == "H") {
		openWindow(572,	800, vUrl, 0); 
	}
}

//*****************************************************************************
// Description :   eco search again
// Parameter: 없음 
// Return: 없음 
// Usage: onclick="javascript:searchAgain();" 
//*****************************************************************************
function searchAgain() {
	this.window.location.replace("/global/business/semiconductor/ecoSearch.do");	
}

//*****************************************************************************
// Description : productInfo 로 이동
// Parameter: 
// Return: 없음
// Usage: onclick="javascript:productInfo_link(vPartnum);"
//*****************************************************************************
function productInfo_link(vFmly_id, vPartnum) {
	var frmObj = document.Form1;
	
	frmObj.action = "/global/business/semiconductor/productInfo.do?fmly_id=" + vFmly_id + "&partnum=" + vPartnum;
	frmObj.submit();
}

//*****************************************************************************
//Description : download ExcelSheet
//Parameter: 
//Return: 없음
//Usage: onclick="javascript:downloadExcelSheet(vType, vVal1, vVal2, vVal3, vVal4, vPartnum);"
//*****************************************************************************
function downloadExcelSheet(vType, vVal1, vVal2, vVal3, vVal4, vPartnum) {
	var frm = document.Form1;

	frm.action = "/global/business/semiconductor/ecoSearchExcelDown.do?search_type=" + vType 
																		+ "&val1=" + vVal1
																		+ "&val2=" + vVal2
																		+ "&val3=" + vVal3
																		+ "&val4=" + vVal4
																		+ "&partnum=" + vPartnum;
	frm.submit();
}



//*****************************************************************************
// Description : Partnumber search tab 이동 
// Parameter: 
// Return: 없음
// Usage: 
//*****************************************************************************
function ChangePartnumber() {
	var lead_yn = document.getElementById("lead_yn").value;
	this.window.location.replace("/global/business/semiconductor/rohsCatgegorySearch.do?tab_type=partnumber&lead_yn="+lead_yn);
}

//*****************************************************************************
// Description : category search tab 이동
// Parameter: 
// Return: 없음
// Usage: 
//*****************************************************************************
function ChangeCategory() {
	var lead_yn = document.getElementById("lead_yn").value;
	this.window.location.replace("/global/business/semiconductor/rohsCatgegorySearch.do?tab_type=category&lead_yn="+lead_yn);
}



//*****************************************************************************
// Description : search tab 이동 - Halogen-free
// Parameter: 
// Return: 없음
// Usage: 
//*****************************************************************************
function ChangeHalogen() {
//	var search_type = document.getElementById("search_type_H").value;
	this.window.location.replace("/global/business/semiconductor/ecoSearch.do?search_type=Halogen");
}

//*****************************************************************************
// Description : search tab 이동 - RoHS
// Parameter: 
// Return: 없음
// Usage: 
//*****************************************************************************
function ChangeRoHS() {
//	var search_type = document.getElementById("search_type_R").value;
	this.window.location.replace("/global/business/semiconductor/ecoSearch.do?search_type=RoHS");
}