var RequestControl = {
	setWinnerAdmin: function(seq) {
		if (!confirm('해당 앨범을 운영자 베스트로 선정하시겠습니까?')) {
			return;
		}
		
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=setWinnerAdmin'
			+ '&seq=' + seq;

		var url = '/main/freedvd/setWinnerProc.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var result = xmlHttp.responseText.trim();
				
				if (result == 'nologin') {
					alert('로그인 안되어 있거나 관리자 권한이 없습니다.');
					return;
				}
				
				if (result == '1') {
					alert('당첨작으로 선정 되었습니다');
					document.location.reload();
					return;
				}
				
				alert('처리 실패, 다시 시도 해주세요');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},
	
	setWinnerRecommend: function(seq) {
		if (!confirm('해당 앨범을 최다추천 베스트로 선정하시겠습니까?')) {
			return;
		}
		
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=setWinnerRecommend'
			+ '&seq=' + seq;

		var url = '/main/freedvd/setWinnerProc.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var result = xmlHttp.responseText.trim();
				
				if (result == 'nologin') {
					alert('로그인 안되어 있거나 관리자 권한이 없습니다.');
					return;
				}
				
				if (result == '1') {
					alert('당첨작으로 선정 되었습니다');
					document.location.reload();
					return;
				}
				
				alert('처리 실패, 다시 시도 해주세요');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},
	
	setValueWinnerRecommend: function(seq) {
		var rcdCnt = parseInt($('rcdCnt'+seq).value);
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=setValueWinnerRecommend'
			+ '&seq=' + seq +"&rcdCnt="+rcdCnt;

		var url = '/main/freedvd/setWinnerProc.jsp'; 
		if (rcdCnt == null || isNaN(rcdCnt)) {
			alert('추천수를 정확히  입력해주세요');
			$('rcdCnt'+seq).value ='';
			$('rcdCnt'+seq).focus();
			return;
		}
		if (!confirm('해당 앨범에 추천수를 추가 하시겠습니까?')) {
			return;
		}
		
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var result = xmlHttp.responseText.trim();
				
				if (result == 'nologin') {
					alert('로그인 안되어 있거나 관리자 권한이 없습니다.');
					return;
				}
				
				if (result == '1') {
					alert('추천수가 입력 되었습니다');
					document.location.reload();
					return;
				}
				
				alert('처리 실패, 다시 시도 해주세요');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},
	
	delRequest: function(seq) {
		if (!confirm('해당 신청 내역을 삭제 하시겠습니까?')) {
			return;
		}
		
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=delete'
			+ '&seq=' + seq;

		var url = '/main/freedvd/setWinnerProc.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var result = xmlHttp.responseText.trim();
				
				if (result == 'nologin') {
					alert('로그인 안되어 있거나 관리자 권한이 없습니다.');
					return;
				}
				
				if (result == '1') {
					alert('삭제 되었습니다');
					document.location.reload();
					return;
				}
				
				alert('처리 실패, 다시 시도 해주세요');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},

	quickViewAlbumList: function(seq) {
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=order'
			+ '&seq=' + seq;

		var url = '/main/freedvd/albumList.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				RequestControl.printAlbumList(xmlHttp, 'order');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},
	
	printAlbumList: function(xmlHttp, type) {
		var xml = xmlHttp.responseXML;
		var record_data = xml.getElementsByTagName("free-dvd");
		var freeDvd;
		
		if(record_data){
			for(var row=0;row<record_data.length;row++){
				if (record_data.item(row).hasChildNodes() 
					&& record_data.item(row).childNodes.length > 1)
				{
					var rows = record_data.item(row);
					
					freeDvd = new FreeDvd(
						GetValue(rows, "seq")
						,GetValue(rows, "title")
						,GetValue(rows, "contents")
						,GetValue(rows, "week-date")
						,GetValue(rows, "id")
						,GetValue(rows, "nick-name")
						,GetValue(rows, "recommend-cnt")
						,GetValue(rows, "comment-cnt")
						,GetValue(rows, "album-seqs")
						,GetValue(rows, "regdate")
					);
				} else {
					alert('존재하지 않는 앨범이거나 이미 삭제된 앨범입니다.');
					return;
				}
			}
		}
		
		var albumSeqs = freeDvd.albumSeqs;
		
		if (albumSeqs == '') {
			alert('앨범이 삭제 되었습니다.');
			return;
		}
		
		var windowOtherWidth = 14;
		var windowOtherHeight = 28;

		var windowWidth = 0;
		var windowHeight = 0;
		
		var albumWidth = 640;
		var albumHeight = 510;

		windowWidth = 680;
		windowHeight = 700;
		
		var objTag = "";
		objTag = "<embed src='" + pepboxUrl + "/MediaPlayer/core.swf?albumList="+ pepboxUrl 
			+"&service=6&userSeq=0&albumTitle=1" 
			+"&albumSeq=" + albumSeqs 
			+"&adInfoPath=coreconfig/local.xml"
			+"&uiPath=/MediaPlayer/coreUI/coreUI_00006.swf"
			+"&skinPath=/MediaPlayer/coreskin2.swf"
			+"&pepInfoPath=coreconfig/pepboxInfo.xml"
			+"&rootDomain="+ pepboxUrl +"' ";
		objTag += "	 quality='high' allowFullScreen='true' bgcolor='#ffffff' width='"+ albumWidth +"' height='" + albumHeight + "' name='pepbox' scale='noscale' align='LT' allowScriptAccess='always' ";
		objTag += "	 type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";

		var body = "";
		
		body += '<div id="layerFlash">' + objTag + '</div>';
		
		// 정보
		body += '<div class="layerFreeDvdTopBar">';
		
		body += '	<div class="layerFreeDvdTitle">'+ freeDvd.title +'</div>\n';
		
		body += '	<div class="layerFreeDvdRegdate">'+ freeDvd.regdate +'</div>\n';
		
		body += '</div>\n';
		
		body += '<div class="layerFreeDvdContents">'+ freeDvd.contents +'</div>\n';
		
		body += '<div class="layerFreeDvdBottom">';
		
		body += '	<div class="layerFreeDvdButton">';
		
		body += '<a href="javascript:RequestControl.popLink('+freeDvd.seq+');" class="btnPopLink" title="친구에게 알리기"></a>'

		body += '<a href="javascript:RequestControl.goRecommend('+freeDvd.seq+');" class="btnRecommend" title="추천하기"></a> ';			
		
		body += '	<span id="recommendCount">' + freeDvd.recommendCnt + '</span>';
		
		body += '	</div>\n';
		
		body += '</div>\n';
		
		body += '</div>\n';
		
		// 댓글
		body += '<div id="commentDiv" class="commentDivView" style="display:block;"><iframe scrolling="no" frameborder="no" name="ifrm_cmt" id="ifrm_cmt" src="commentList.jsp?fdSeq=' + freeDvd.seq + '" width="660" height="0" title="코멘트 출력"></iframe></div>\n';
		
		var quickViewHtml = '';
		// header
		quickViewHtml += '<table width="'+ windowWidth +'" border="0" cellpadding="0" cellspacing="0">\n';
		quickViewHtml += '<tr>\n';
		quickViewHtml += '<td width="4" height="24" style="line-height:0px;">\n';
		quickViewHtml += '<img src="/image/pepy/view_01.gif" width="4" height="24" alt=""></td>\n';
		quickViewHtml += '<td id="quickViewDivTitleBar" width="787" background="/image/pepy/view_02.gif">\n';
		quickViewHtml += '<a href="javascript:GlobalPopup.closeQuickViewDiv();"><img src="/image/pepy/btn_winclose.gif" width="52" height="24" border="0" align="right"></a></td>\n';
		quickViewHtml += '<td width="4" height="24" style="line-height:0px;">\n';
		quickViewHtml += '<img src="/image/pepy/view_03.gif" width="4" height="24" alt=""></td>\n';
		quickViewHtml += '</tr>\n';
		
		// body 
		quickViewHtml += '<tr>\n';
		quickViewHtml += '<td width="4" background="/image/pepy/view_04.gif"></td>\n';
		quickViewHtml += '<td background="/image/pepy/view_05.gif" style="line-height:normal;">\n';
		quickViewHtml += body;
		quickViewHtml += '</td>\n';
		quickViewHtml += '<td width="4" background="/image/pepy/view_06.gif"></td>\n';
		quickViewHtml += '</tr>\n';
		
		// footer
		quickViewHtml += '<tr>\n';
		quickViewHtml += '<td  width="4" height="4" style="line-height:0px;">\n';
		quickViewHtml += '<img src="/image/pepy/view_07.gif" width="4" height="4" alt=""></td>\n';
		quickViewHtml += '<td height="4" background="/image/pepy/view_08.gif"></td>\n';
		quickViewHtml += '<td width="4" height="4" style="line-height:0px;">\n';
		quickViewHtml += '<img src="/image/pepy/view_09.gif" width="4" height="4" alt=""></td>\n';
		quickViewHtml += '</tr>\n';
		quickViewHtml += '</table>\n';
		
		GlobalPopup.closeQuickViewDiv();

		RequestControl.makeGrayBackDiv();

		var oBody = getBody();
							
		// left, top 계산 : 화면 중앙에 오도록
		var windowTop = (document.documentElement.clientHeight - windowHeight) / 2;
		if (windowTop <0)
		{
			windowTop = 0;
		}

		windowTop = oBody.top + windowTop;

		var windowLeft = (document.documentElement.clientWidth - windowWidth) / 2;
		if (windowLeft <0)
		{
			windowLeft = 0;
		}

		var quickViewDiv = document.createElement('div');
		quickViewDiv.innerHTML = quickViewHtml;
		quickViewDiv.id = 'quickViewDiv';
		quickViewDiv.style.position = 'absolute';
		quickViewDiv.style.top = windowTop + 'px';
		quickViewDiv.style.left = windowLeft + 'px';
		quickViewDiv.style.width = windowWidth + 'px';
		quickViewDiv.style.height = windowHeight + 'px';
		quickViewDiv.style.textAlign = 'center';
		quickViewDiv.style.zIndex = '500000';
		document.body.appendChild(quickViewDiv);
	},
	
	quickViewCartList: function() {
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&cmd=cart';

		var url = '/main/freedvd/albumList.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				RequestControl.printAlbumListForCart(xmlHttp, 'cart');
			},
			onFailure: function(xmlHttp) {
				alert('서버 연결에 실패했습니다. 새로고침 후 다시 이용해 주세요.');
			}
		});
	},
	
	printAlbumListForCart: function(xmlHttp, type) {
		var xml = xmlHttp.responseXML;
		var record_data = xml.getElementsByTagName("free-dvd");
		
		var albumSeqs = '';
		
		if(record_data){
			for(var row=0;row<record_data.length;row++){
				if (record_data.item(row).hasChildNodes() 
					&& record_data.item(row).childNodes.length > 0)
				{
					var rows = record_data.item(row);
					
					albumSeqs = GetValue(rows, "album-seqs");
				} else {
					alert('존재하지 않는 앨범이거나 이미 삭제된 앨범입니다.');
					return;
				}
			}
		}

		if (albumSeqs == '') {
			alert('앨범이 삭제 되었습니다.');
			return;
		}
		
		var windowOtherWidth = 14;
		var windowOtherHeight = 28;

		var windowWidth = 0;
		var windowHeight = 0;
		
		var albumWidth = 640;
		var albumHeight = 510;

		windowWidth = albumWidth*1 + windowOtherWidth;
		windowHeight = albumHeight*1 + windowOtherHeight;
		
		var objTag = "";
		objTag = "<embed src='" + pepboxUrl + "/MediaPlayer/core.swf?albumList="+ pepboxUrl 
			+"&service=6&userSeq=0&albumTitle=1" 
			+"&albumSeq=" + albumSeqs 
			+"&adInfoPath=coreconfig/local.xml"
			+"&uiPath=/MediaPlayer/coreUI/coreUI_00006.swf"
			+"&skinPath=/MediaPlayer/coreskin2.swf"
			+"&pepInfoPath=coreconfig/pepboxInfo.xml"
			+"&rootDomain="+ pepboxUrl +"' ";
		objTag += "	 quality='high' allowFullScreen='true' bgcolor='#ffffff' width='"+ albumWidth +"' height='" + albumHeight + "' name='pepbox' scale='noscale' align='LT' allowScriptAccess='always' ";
		objTag += "	 type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";

		var quickViewHtml = '';
		quickViewHtml += '<table width="'+ windowWidth +'" height="'+ windowHeight +'" border="0" cellpadding="0" cellspacing="0">\n';
		quickViewHtml += '	<tr>\n';
		quickViewHtml += '		<td width="7" height="21" style="line-height:0px;">\n';
		quickViewHtml += '			<img src="../../image/view/quickview_01.gif" width="7" height="21" alt=""></td>\n';
		quickViewHtml += '		<td id="quickViewDivTitleBar" align="right" valign="middle" style="line-height:0px;" background="../../image/view/quickview_02.gif"><a href="javascript:GlobalPopup.closeQuickViewDiv();"><img src="../../image/view/quickview_close.gif" border="0" align="absmiddle"></a></td>\n';
		quickViewHtml += '<td width="7" height="21" style="line-height:0px;">\n';
		quickViewHtml += '			<img src="../../image/view/quickview_03.gif" width="7" height="21" alt=""></td>\n';
		quickViewHtml += '	</tr>\n';
		quickViewHtml += '	<tr>\n';
		quickViewHtml += '		<td width="7" background="../../image/view/quickview_04.gif">&nbsp;</td>\n';
		quickViewHtml += '  <td style="line-height:0px;">' + objTag + '</td>\n';
		quickViewHtml += '		<td width="7" background="../../image/view/quickview_06.gif"></td>\n';
		quickViewHtml += '  </tr>\n';
		
		quickViewHtml += '	<tr>\n';
		quickViewHtml += '		<td  width="7" height="7" style="line-height:0px;">\n';
		quickViewHtml += '			<img src="../../image/view/quickview_07.gif" width="7" height="7" alt=""></td>\n';
		quickViewHtml += '		<td height="7" background="../../image/view/quickview_08.gif"></td>\n';
		quickViewHtml += '  <td width="7" height="7" style="line-height:0px;">\n';
		quickViewHtml += '			<img src="../../image/view/quickview_09.gif" width="7" height="7" alt=""></td>\n';
		quickViewHtml += '	</tr>\n';
		quickViewHtml += '</table>\n';
		
		GlobalPopup.closeQuickViewDiv();

		GlobalPopup.makeGrayBackDiv();

		var oBody = getBody();
							
		// left, top 계산 : 화면 중앙에 오도록
		var windowTop = (document.documentElement.clientHeight - windowHeight) / 2;
		if (windowTop <0)
		{
			windowTop = 0;
		}

		windowTop = oBody.top + windowTop;

		var windowLeft = (document.documentElement.clientWidth - windowWidth) / 2;
		if (windowLeft <0)
		{
			windowLeft = 0;
		}

		var quickViewDiv = document.createElement('div');
		quickViewDiv.innerHTML = quickViewHtml;
		quickViewDiv.id = 'quickViewDiv';
		quickViewDiv.style.position = 'absolute';
		quickViewDiv.style.top = windowTop + 'px';
		quickViewDiv.style.left = windowLeft + 'px';
		quickViewDiv.style.width = windowWidth + 'px';
		quickViewDiv.style.height = windowHeight + 'px';
		quickViewDiv.style.textAlign = 'center';
		quickViewDiv.style.zIndex = '500000';
		document.body.appendChild(quickViewDiv);
	},
	
	makeGrayBackDiv:function(calTop) {
		// select 박스 제거
		GlobalPopup.hideElement('SELECT');

		var bg = $('GrayBackDiv');
		if(!bg)
		{
			bg = document.createElement('div');
			bg.setAttribute('id','GrayBackDiv');
			bg.className = 'GrayBackDiv';
			bg.style.zIndex = '400000';
			document.body.appendChild(bg);
		}

		var oBody = getBody();
		var height = 0;
		var minHeight = 800;
		
		if(oBody.height > document.body.scrollHeight) {
			height = oBody.height + 80;
		} else {
			height = (document.body.scrollHeight + 80);
		}
		
		if (height < minHeight) height = minHeight;
		
		if (calTop) {
			height = height + calTop;
		}
		
		bg.style.height = height +'px';
		
		bg.style.display = 'block';
		document.body.width = '100%';
	},
	
	updateCommentCount: function(commentCount) {
		if ($('commentCount')) {
			$('commentCount').innerHTML = commentCount;
		}
	},
	
	goRecommend: function(seq) {
		// Ajax Call
		var param = '_uid=' + (new Date()).getTime()
			+ '&seq=' + seq;
		
		var url = 'recommend.jsp';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var rst = xmlHttp.responseText.trim();
				if (rst == 'result=-1') {
					alert('이미 추천한 앨범입니다.');	
				} else if (rst == 'result=-2') {
					alert('본인 앨범은 추천할 수 없습니다.');
				} else if (rst == 'result=-3') {
					alert('존재하지 않는 앨범입니다.');
				} else if (rst == 'result=-4') {
					RequestControl.goLogin(seq);
				} else if (rst == 'result=-5') {
					alert('추천할 수 없습니다.\n\n금주의 신청작품에 대해서만 베스트 앨범으로 추천 할 수 있습니다.');
				} else if (rst == 'result=1') {
					if ($('recommendCount')) {
						var recommendCount = $('recommendCount').innerHTML;
						recommendCount = recommendCount * 1 + 1;
						$('recommendCount').innerHTML = recommendCount;
					} 
					alert('추천하였습니다.');	
				} else {
					alert('알 수 없는 에러 발생. 다시 시도 해주세요.');
				}
			},
			onFailure: function(xmlHttp) {
				alert('요청 실패! 다시 시도 해주세요.');
			}
		});
	},
	
	popLink: function(seq) {
		GlobalPopup.PopWindow('popLink.jsp?seq=' + seq,'popLink', '', '520','228','true');
	},
	
	showRecommendLog: function(seq) {
		GlobalPopup.PopWindow('popRecommendLog.jsp?seq=' + seq,'showRecommendLog', 'scrollbars=yes,resizable=yes', '750','500','true');
	},
	
	goLogin: function(seq){
		if (confirm("로그인 페이지로 이동하겠습니까?")) {
			document.location.href = "../global/login.jsp?returnURL=../freedvd/requestList.jsp?seq=" + seq;
		}		
	}
}

var OrderControl = {
	getProductName: function() {
		var i = document.f1.productSeq.selectedIndex;
		return document.f1.productSeq.options[i].text;
	},
	
	getPrice: function() {
		var productSeq = document.f1.productSeq.value;
		var productName = this.getProductName();
		
		document.f1.productType.value = this.getProductType(productSeq);
		document.f1.productSubType.value = this.getProductSubType(productSeq);
		
		var productSubType = document.f1.productSubType.value;
		var productType = document.f1.productType.value;
		
		var albumSeqs = arrayToString(document.f1.albumSeqs);
		var quantity = $('quantity').value;
		
		var deliveryOption = GetRadioValue(document.f1.option3);
		
		// Ajax Call
		var param = 'cmd=getOrderAmount' +
			'&productType=' + productType +
			'&productSubType=' + productSubType +
			'&albumSeqs=' + albumSeqs +
			'&quantity=' + quantity +
			'&deliveryOption=' + deliveryOption +
			'&_uid=' + (new Date()).getTime();
			
		var url = '/main/shop/order';
		new Ajax.Request(url, {
			parameters: param,
			onSuccess: function(xmlHttp) {
				var rst = xmlHttp.responseText.trim();
				OrderControl.printPrice(rst);
			},
			onFailure: function(xmlHttp) {
				alert('서버에 응답이 없습니다. 잠시 후 다시 시도해주세요.');
			}
		});
	},
	
	getProductType: function(productSeq) {
		var productType = 1;
		if (productSeq == 1 || productSeq == 2 || productSeq == 3) {
			productType = 1;
		} else if (productSeq == 4 || productSeq == 5 || productSeq == 6) {
			productType = 2;
		} else if (productSeq == 7 || productSeq == 8 || productSeq == 9) {
			productType = 3;
		}
		
		return productType;
	},
	
	getProductSubType: function(productSeq) {
		var getProductSubType = 1;
		if (productSeq == 1 || productSeq == 4 || productSeq == 7) {
			getProductSubType = 1;
		} else if (productSeq == 2 || productSeq == 5 || productSeq == 8) {
			getProductSubType = 2;
		} else if (productSeq == 3 || productSeq == 6 || productSeq == 9) {
			getProductSubType = 3;
		}
		return getProductSubType;
	},
	
	setDeliveryAmount: function(deliveryOption) {
		if (deliveryOption == 1) {
			$('msgDeliveryAdd').style.display = 'block';
			$('deliveryDiv').style.display = 'block';
		} else if (deliveryOption == 2) {
			$('msgDeliveryAdd').style.display = 'none';
			$('deliveryDiv').style.display = 'none';
		}
		
		this.getPrice();
	},
	
	setOption: function(productSeq) {
		var productType = document.f1.productType.value = this.getProductType(productSeq);
		var productSubType = document.f1.productSubType.value = this.getProductSubType(productSeq);
		
	},
	
	printPrice: function(amount) {
		var quantity = $('quantity').value;
		
		quantity = parseInt(quantity,10);

		if (isNaN(quantity) || quantity <= 0) {
			quantity = 1;
		}
		
		var productType = document.f1.productType.value;
		
		if (productType == 1 && quantity > 1) {
			alert('"PC 저장하기" 상품은 수량을 1개만 선택 가능합니다.');
			$('quantity').selectedIndex = 0;
			quantity = 1;
		}
		
		$('amount').innerHTML = Comma(amount);
	},
	
	preview: function() {
		
		var albumSeqs = this.makePreviewStringAlbumSeq($('f1').albumSeqs);
		var albumTitle = $('album_title').value;
		var openingSeq = GetRadioValue(document.f1.openingSeq);
		var skinPath = $('openUrl' + openingSeq).value;
		
		var url = '/main/order/popPcSavePreview.jsp?'
			+ 'albumSeq=' + albumSeqs
			+ '&skinPath=' + skinPath
			+ '&albumTitle=' + encodeURIComponent(albumTitle);
		
		GlobalPopup.PopWindow(url,'preview', '', '1004','698','true');
	},

	makePreviewStringAlbumSeq: function(obj) {
		var result = '';
		if(obj.length){
			for (var i=0;i<obj.length;i++) {
				result = result + obj[i].value + ';';
			}
		} else {
			result = obj.value + ';';
		}
		return result;
	}, 
	
	downloadAblum: function(orderSeq) {
		GlobalPopup.PopWindow('/main/center/albumDownload.jsp?orderSeq=' + orderSeq + '&_uid=' + (new Date()).getTime(),'application', '', '458','386','true');
	},
	
	setMemberInfo: function() {
		$('receiverName').value = $('memberName').value;
		$('receiverPhone1_1').value = $('cellphone_1').value;
		$('receiverPhone1_2').value = $('cellphone_2').value;
		$('receiverPhone1_3').value = $('cellphone_3').value;
	}
}

function FreeDvd(seq, title, contents, weekDate, id
	, nickName, recommendCnt, commentCnt, albumSeqs, regdate) {
	this.seq				= seq;
	this.title 				= title;
	this.contents			= contents;
	this.weekDate			= weekDate;
	this.id					= id;
	this.nickName           = nickName;
	this.recommendCnt		= recommendCnt;
	this.commentCnt			= commentCnt;
	this.albumSeqs			= albumSeqs;
	this.regdate			= regdate;
}