alertMessage = function(msg){
	alert(msg);
}
anotherLogin = function(){
	var myParent = document;
	var retObj = window.showModalDialog('/front/pop_login.jsp?cbs=pumabycbs', myParent , 'dialogWidth:400px; dialogHeight:380px; center:1; scroll:0; help:0; status:0');
	if(retObj=="SUCCESS") window.location.reload(); return;

};
anotherLogout = function(){

	
	$.ajax({
			url					:'/front/logout.jsp'
			,type				:"get"
			,error 			: function(){alert("ERR");}
			,success			: function(){
				alert("·Î±×¾Æ¿ô µÇ¾ú½À´Ï´Ù.");
				window.top.location.reload();
			}		
		});
};
tshirtExec = function(){
	if($("#title").val()==""){
		alert("ÀÛÇ°¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		$("#title").focus();
		return false;
	}else if($("#info").val()==""){
		alert("ÀÛÇ°¼Ò°³¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		$("#info").focus();
		return false;
	}else if($("#file1Text").val()==""){
		alert("ÆÄÀÏÀ» Ã·ºÎÇØ ÁÖ¼¼¿ä.");
		$("#file1Text").focus();
		return false;
	}else if(!confirm("1ÀÎ 2È¸¸¸ µî·Ï °¡´ÉÇÏ¸ç\nÇÑ¹ø µî·ÏÇÏ¸é ¼öÁ¤/»èÁ¦°¡ ºÒ°¡´ÉÇÕ´Ï´Ù\nµî·ÏÇÏ½Ã°Ú½À´Ï±î?")){
		return false;
	}
};

tshirtOpen = function(){
	$("#cont").css("display", "block");
};
tshirtClose = function(){
	$("#cont").css("display", "none");
	
};
musicCnt = function(cd, ty){
	$.ajax({
		url					:'./cbs/musicCnt.jsp'
		,type				:"get"
		,dataType	 	:"txt"
		,data				:{"mCode" : cd, "ty" : ty}
		,error 			: function(){alert("ERR");}
		,success			: function(rtn){
/**			if(cd=="A1"){
				cd="Real Jam Music";
			}else if(cd=="A2"){
				cd="Oh!Records/Soul Vouse";
			}else if(cd=="A3"){
				cd="Out of Context";
			}else if(cd=="A4"){
				cd="Oh!Records";
			}else if(cd=="A5"){
				cd="Oh!Records";
			}else if(cd=="A6"){
				cd="Key Recordings";
			}else if(cd=="A7"){
				cd="Blue Note/Appletree Records";
			}else if(cd=="A8"){
				cd="DIM MAK Records";
			}
**/			if(ty=="play"){
				ty="À½¾ÇÀÌ ÇÃ·¹ÀÌµË´Ï´Ù.";
			}else if(ty=="bgm" ){
				ty="¹è°æÀ½¾ÇÀ¸·Î ¼³Á¤ µÇ¾ú½À´Ï´Ù.";
			}
			
			alert(ty);
		}		
	});
};

musicVote = function(cd){
	//alert(cd);
	$.ajax({
		url					:'./cbs/musicVote.jsp'
		,type				:"get"
		,dataType	 	:"txt"
		,data				:{"mCode" : cd}
		,error 			: function(){alert("ERR");}
		,success			: function(rtn){
		//	alert("¿Ï·á");
			if(rtn=="ENDDATE"){
				alert("ÀÌº¥Æ® ±â°£ÀÌ Áö³µ½À´Ï´Ù.");
			}else if(rtn=="LOGIN"){
				alert("·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.");
				anotherLogin();
			}else if(rtn=="CNT"){
				alert("ÀÌ¹Ì ÃßÃµÇÑ À½¾ÇÀÔ´Ï´Ù.");
			}else if(rtn=="SUCCESS"){
				alert("ÃßÃµÇØ ÁÖ¼Å¼­ °¨»çÇÕ´Ï´Ù.");
			}else{
				alert("Error :"+ rtn);
			}
		}		
	});
};

partyExec = function(){
	$.ajax({
		url					:'./cbs/partyExec.jsp'
		,type				:"get"
		,dataType	 	:"txt"
		,error 			: function(){alert("ERR");}
		,success			: function(rtn){
			if(rtn=="ENDDATE"){
				alert("ÀÌº¥Æ® ±â°£ÀÌ Áö³µ½À´Ï´Ù.");
				parent.Shadowbox.close()
			}else if(rtn=="LOGIN"){
				alert("·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.");
				anotherLogin();
			}else if(rtn=="CNT"){
				alert("ÀÌ¹Ì ÆÄÆ¼ ½ÅÃ»À» ÇÏ¼Ì½À´Ï´Ù.");
				parent.Shadowbox.close()
			}else if(rtn=="SUCCESS"){
				alert("½ÅÃ»ÇØ ÁÖ¼Å¼­ °¨»çÇÕ´Ï´Ù.");
				parent.Shadowbox.close()
			}else{
				alert("Error : ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù..."+ rtn);
			}
		}		
	});
};


//1. BGM ÃÊ±âÈ­ °ü·Ã ÄíÅ° Á¦¾î
var ing = "false";
var swfName = 'contents';

function getIng() {
	thisMovie(swfName).firstPage(ing);
}

function checkCookie() {
	if(getCookie("ing") != "true") {
		setCookie("ing","true");
		ing = "true";
	}
}

function getCookie($prop) {
	var filter = $prop+"=";
	var myCookie = document.cookie+";"
	var start = myCookie.indexOf(filter);
	if(start != -1) {
		var end = myCookie.indexOf(";",start);
		return unescape(myCookie.substring(start+filter.length,end));
	}
	
	return false;
}

function setCookie($prop,$value,$exp) {
	var newCookie = $prop+"="+escape($value);
	if($exp != null) newCookie+=";expires="+$exp+";";
	document.cookie = newCookie;
}


//2. swf ÆÄÀÏÀÇ ³ôÀÌ°ª Á¦¾î : footerÀÇ À§Ä¡ Á¦¾î

function setHeight($h) {
	// swf ÆÄÀÏÀÇ ³ôÀÌ°ªÀ» Á¦¾îÇÏ¿© Ç²ÅÍÀÇ À§Ä¡ ¸ÂÃß±â
}


function popupOpen(w,h,url) {
	Shadowbox.open({
		  player		: 'iframe'
		, content	: url
		, width		: w
		, height		: h
		, options		:{
							displayNav	: false
							,modal			: false
						}
	});
}
