
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function NewWindow(mypage, myname, w, h, scroll)
{
	var win = null;
	
	LeftPosition=(screen.width) ? (screen.width-w)/2 : 0;
	TopPosition=(screen.height) ? (screen.height-h)/2 : 0;				
	settings='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',resizable=no, scrollbars=' + scroll;

	win=window.open(mypage,myname,settings);
	return win;
}


//경고창 띄우기 s=>메세지, t=>제목, 
function clubErrMessage(s,t){
	window.showModalDialog("/park/club/error.jsp?title="+t+"&msg="+s,"","dialogHeight:256px;dialogWidth:288px;edge:raised;center:yes;help:no;resizable:no;status:no;scroll:no;unadorned:no");
}

//이미지 사이즈 변환
function resize_image(e, max_width){
	var max_width, max_width;
	var width = e.width;
	if(e.width > max_width) 
	{
		e.width = max_width;
		e.hegith = (e.height * max_width) / width;
	}	
}


// 메인 팝업창 
function mainOpenPop(theURL, winName, features){
	var replacePopup = true;
	var PopupWin = window.open(theURL, winName, features, replacePopup);
	PopupWin.focus();
}

// 이미지 보기 팝업, 2004.06.25
function viewImgPop(path,file){
	var popname = 'ImgView';
	var url =  '/common/pop_img_view.asp?fPath='+ path +'&fName='+ file;
	var imgFile = path +'/'+file;
	var scrollYN='1';
	var popstate = '';
		popstate += 'width=100,';
		popstate += 'height=100,';
		popstate += 'left=100,';
		popstate += 'top=100,';
		popstate += 'fullscreen=no,';
		popstate += 'channelmode=no,';
		popstate += 'toolbar=no,';
		popstate += 'location=no,';
		popstate += 'directories=no,';
		popstate += 'status=no,';
		popstate += 'menubar=no,';
		popstate += 'scrollbars='+ scrollYN +', ';
		popstate += 'resizable=no,';
		popstate += 'titlebar=no,';
		popstate += 'hotkeys=no';
	var PopupWin = window.open(url,popname,popstate);
	PopupWin.focus();
	return;
}

// Modeless형식의 메시지를 보여줌, 2004.06.25
function errModeless(msg){
	if(msg=='') msg='오류가 발생하였습니다';
	window.showModelessDialog("/library/popup/notice.php",msg,"dialogWidth:296px; dialogHeight:220px; center=yes; screenTop=yes; scroll=no; status=no; help=no;");
}
// window open 형식의 메시지를 보여줌, 2006.06.25
function openErrPop(msg){
	if(msg=='') msg='오류가 발생하였습니다';
	window.open('/common/message_pop.asp?msg='+ msg ,'err_page','width=290,height=195,left=100,top=100');
}

// 우편번호검색 , 2004.06.26, hoon
// => searchZipCode('1',document.PageForm)
function searchZipCode(flag,obj){
//	window.open('/pop/zip_search.asp','','width=418, height=300, scrollbars=yes');
	var intWidth = 418;
	var intHeight = 300;
	var urlPopup = '/pop/zip_search.asp?flag='+flag;
	var namePopup = 'SearchPostCode';
	var featuresPopup = '';
		featuresPopup += 'width='+intWidth+',';
		featuresPopup += 'height='+intHeight+',';
		featuresPopup += 'left='+((window.document.body.clientWidth-intWidth)/2)+',';
		featuresPopup += 'top='+((window.document.body.clientHeight-intHeight)/2)+',';
		featuresPopup += 'fullscreen=no,';
		featuresPopup += 'channelmode=no,';
		featuresPopup += 'toolbar=no,';
		featuresPopup += 'location=no,';
		featuresPopup += 'directories=no,';
		featuresPopup += 'status=1,';
		featuresPopup += 'menubar=no,';
		featuresPopup += 'scrollbars=yes,';
		featuresPopup += 'resizable=no,';
		featuresPopup += 'titlebar=no,';
		featuresPopup += 'hotkeys=no';
	var replacePopup = true;

	var PopupWin = window.open(urlPopup, namePopup, featuresPopup, replacePopup);
	PopupWin.focus();
	window.status = window.defaultStatus;
	return ;
}

// 아이디 찾기
function goSearchMemId(gubn){
	var opSearchMemId = window.open('/pop/id_search.asp','','width=400, height=270, status=1');
	opSearchMemId.focus();
	if(gubn=='1'){
		window.close();
	}
}

// 비밀번호 찾기
function goSearchMemPwd(gubn){
	var opSearchMemPwd = window.open('/pop/pw_search.asp','','width=400, height=270, status=1')
	opSearchMemPwd.focus();
	if(gubn=='1'){
		window.close();
	}
}


// 메인 팝업창 
function mainOpenPop(theURL, winName, features){
	var replacePopup = true;
	var PopupWin = window.open(theURL, winName, features, replacePopup);
	PopupWin.focus();
}



// 파일 업로드 팝업, 2005/07/04 
function openUploadPopup(menuCd,headIdx){
	var WIP = window.open("/silicone2007/kcc_webadmin/common/fileupload/popup_fileupload.asp?menuCd="+ menuCd +"&heaIdx="+ headIdx,"IWin","menubar=no,scrollbars=no,width=350,height=250,status=1");	
	WIP.focus();
}


// 파일 업로드 팝업, 2005/07/04 
function openBbsPreview(obj){
	var WIP = window.open("/silicone2007/kcc_webadmin/common/bbs/bbs_preview.asp?obj="+obj,"IWin","menubar=no,scrollbars=1,width=714,height=600,status=1");
	WIP.focus();
}

function winPrint(){
	if(confirm("인쇄시에는 왼쪽여백 : 4.5, 오른쪽여백 : 4.5로 설정해 주세요.")){
		print();	
	}
}

// 회원정보 보기 팝업 띄우기
function memView(seq,Flag){
//	window.open('/pop/zip_search.asp','','width=418, height=300, scrollbars=yes');
	var intWidth = 800;
	var intHeight = 470;
	if (Flag == 'Y'){
		var urlPopup = '/webadmin/member/memView.asp?MIDX='+ seq ;
	}else if (Flag == 'N'){
		var urlPopup = '/webadmin/member/memOutView.asp?MIDX='+ seq ;
	}

	var namePopup = 'memInfoView';
	var featuresPopup = '';
		featuresPopup += 'width='+intWidth+',';
		featuresPopup += 'height='+intHeight+',';
		featuresPopup += 'left='+((window.document.body.clientWidth-intWidth)/2)+',';
		featuresPopup += 'top='+((window.document.body.clientHeight-intHeight)/2)+',';
		featuresPopup += 'fullscreen=no,';
		featuresPopup += 'channelmode=no,';
		featuresPopup += 'toolbar=no,';
		featuresPopup += 'location=no,';
		featuresPopup += 'directories=no,';
		featuresPopup += 'status=1,';
		featuresPopup += 'menubar=no,';
		featuresPopup += 'scrollbars=yes,';
		featuresPopup += 'resizable=no,';
		featuresPopup += 'titlebar=no,';
		featuresPopup += 'hotkeys=no';
	var replacePopup = true;

	var PopupWin = window.open(urlPopup, namePopup, featuresPopup, replacePopup);
	PopupWin.focus();
	window.status = window.defaultStatus;
	return ;
}

// 회원정보 보기 팝업 띄우기
function memView2(id,Flag){
//	window.open('/pop/zip_search.asp','','width=418, height=300, scrollbars=yes');
	var intWidth = 800;
	var intHeight = 470;
	var urlPopup = '/webadmin/member/memView2.asp?id='+ id ;

	var namePopup = 'memInfoView';
	var featuresPopup = '';
		featuresPopup += 'width='+intWidth+',';
		featuresPopup += 'height='+intHeight+',';
		featuresPopup += 'left='+((window.document.body.clientWidth-intWidth)/2)+',';
		featuresPopup += 'top='+((window.document.body.clientHeight-intHeight)/2)+',';
		featuresPopup += 'fullscreen=no,';
		featuresPopup += 'channelmode=no,';
		featuresPopup += 'toolbar=no,';
		featuresPopup += 'location=no,';
		featuresPopup += 'directories=no,';
		featuresPopup += 'status=1,';
		featuresPopup += 'menubar=no,';
		featuresPopup += 'scrollbars=yes,';
		featuresPopup += 'resizable=no,';
		featuresPopup += 'titlebar=no,';
		featuresPopup += 'hotkeys=no';
	var replacePopup = true;

	var PopupWin = window.open(urlPopup, namePopup, featuresPopup, replacePopup);
	PopupWin.focus();
	window.status = window.defaultStatus;
	return ;
}

function alertEnjoy() {
  alert('응모기간이 마감되었습니다.');
}

var con_home_https = "https://www.vita500.com:8184";
var con_home_http = "http://www.vita500.com";