//<![CDATA[
var imgUrl				=	"http://image.mgame.com/mgamezzang/games/popstage";

// °ÔÀÓ ´Ù¿î·Îµå
function popstageDownload() {
		if(thisDomain == "buddybuddy") {
			var fileUrl	=	"http://popstage.nefficient.co.kr/popstage/install/BuddyPopStageSetup.exe";
		} else {
			var fileUrl	=	"http://popstage.nefficient.co.kr/popstage/install/popstagesetup.exe";
		}
		
		downLauncher_Nefficient(1,fileUrl,"popstage")
}

// ¸®½ºÆ®
function musicLink(idx) {
	var playNo		=	idx ? idx : 0;

	mgamePopup("/include/popup_player.mgame?idx="+ playNo,300,350);
}

// ³×ÀÌ°ÔÀÌ¼ÇÀº ´Þ¶óµµ ÇÔ¼ö´Â openURL~!
function openURL(bigNum,smallNum) {
	var filePath;
	
	bigNum = parseInt(bigNum);
	smallNum = parseInt(smallNum);

	if(bigNum == 1) {
		switch(smallNum) {
			case 2 :
				filePath	=	"/notice/update.mgame";
				break;
			case 3 :
				filePath	=	"/notice/event.mgame";
				break;
			case 4 :
				filePath	=	"/notice/pr.mgame";
				break;
			default :
				filePath	=	"/notice/notice.mgame";
				break;
		}
	} else if(bigNum == 2) {
		switch(smallNum) {
			case 2 :
				filePath	=	"/guide/special.mgame";
				break;
			case 3 :
				filePath	=	"/guide/guide_01.mgame";
				break;
			default :
				filePath	=	"/guide/intro_01.mgame";
				break;
		}
	} else if(bigNum == 3) {
		switch(smallNum) {
			case 2 :  //Ä£±¸±¸ÇØ¿ä
				//error("ÁØºñ ÁßÀÔ´Ï´Ù.");
				filePath	=	"/restroom/friend.mgame";
				break;
			case 3 :  //¸®ÇÃ³îÀÌ
				filePath	=	"/restroom/reply.mgame";
				break;
			case 4 : //¼Ò¹®³»±â
				filePath	=	"/restroom/rumor.mgame";
				break;
			case 5 :
				filePath	=	"/restroom/popszone.mgame";
				break;
			case 6 :
				filePath	=	"/restroom/minipops.mgame";
				break;
			case 7 :
				filePath	=	"/restroom/cartoon.mgame";
				break;
			default :
				filePath	=	"/restroom/freeboard.mgame";
				break;
		}
	} else if(bigNum == 4) {
		switch(smallNum) {
			case 2 :
				//filePath	=	"/radiostudio/vocal.mgame";
				filePath	=	"/radiostudio/evtucc_index.mgame";
				break;
			case 3 :
				filePath	=	"/radiostudio/newmusic.mgame";
				break;
			default :
				filePath	=	"/radiostudio/screenshot.mgame";
				break;				
		}
	} else if(bigNum == 5) {
		switch(smallNum) {
			
			case 2 :
				filePath	=	"/ranking/bymusic_ranking.mgame";
				break;
			case 3 :
				error("ÁØºñ ÁßÀÔ´Ï´Ù.");
				return;
				break;
			default :
				filePath = "/ranking/default.mgame";
				break;
		}
	} else if(bigNum == 6) {
		switch(smallNum) {
			case 2 :
				filePath	=	"/data/wallpaper.mgame";
				break;
			case 3 :
				filePath	=	"/data/vod.mgame";
				break;
			case 4 :
				//error("ÁØºñ ÁßÀÔ´Ï´Ù.");
				//return;
				filePath	=	"/data/gallery.mgame";
				break;
			default :
				filePath	=	"/data/download.mgame";
				break;
		}
	} else if(bigNum == 7) {
		if(!mgameUserCheck()) return;
		
		switch(smallNum) {
			case 1 :	//FAQ
				//filePath	=	"http://csweb.mgame.com/csagent/helpdesk/faq/faq_view.jsp?FC_ID=PS0401&CAT_ID=4480";
				filePath	=	"/customer/cs_mother.mgame?menu=1";
				break;
			case 2 :	//À¥»ó´ã¼¾ÅÍ
				//filePath	=	"http://csweb.mgame.com/csagent/helpdesk/member/index.jsp";
				filePath	=	"/customer/inquiry_center.mgame";
				break;
			case 3 :	//°èÁ¤µµ¿ë½Å°í¼¾ÅÍ
				//filePath	=	"http://csweb.mgame.com/csagent/helpdesk/member/index.jsp";
				filePath	=	"/customer/cs_mother.mgame?menu=9";
				break;
			case 4 :	//°èÁ¤»óÅÂÁ¶È¸
				filePath	=	"/customer/cs_mother.mgame?menu=8";
				break;
			case 5 :	//¹æ¹®»ó´ã
				filePath = "http://csweb.mgame.com/csagent/helpdesk/reservation/reservation_info.jsp";
				break;
			case 6 :	//¿î¿µÁ¤Ã¥
				//filePath	=	"/councel/helpdesk.mgame";
				filePath = "/customer/policy.mgame";
				break;
			default :
				filePath	=	"/customer/cs_mother.mgame?menu=1";
				break;
		}

	} else if(bigNum == 11) {
		window.open("http://know.mgame.com/");
		return;
	} else if(bigNum == 12) {
		window.open("http://cafe.mgame.com/popstage");
		return;
	} else if(bigNum == 15) {
		try {
			document.body.style.behavior	=	"url(#default#homepage)";
			document.body.setHomePage("http://"+ location.host +"/");
		} catch(e) {
			error("ÀÎÅÍ³Ý ÀÍ½ºÇÃ·Î·¯ 7¸¸ Áö¿øÇÕ´Ï´Ù.");
		}
		
		return;
	} else if(bigNum == 17) {
		window.external.AddFavorite("http://"+ location.host +"/",(thisDomain == 'buddybuddy') ? '¿ì¸®µéÀÇ ³×Æ®¿öÅ© - ¹öµð¹öµð' : '::: MGame ½Å³ª´Â ÀÎÅÍ³Ý ³îÀÌÅÍ :::');
		return;
	} else if(bigNum == 21) {
		if(!mgameUserCheck()) return;
		
		filePath			=	"/life/myinfo_04.mgame";
	} else {
		if(!mgameUserCheck()) return;

		filePath			=	"/life/myinfo_01.mgame";
	}

	location.href	=	filePath;
}

function viewVodStart(sURL, w, h, mode, auto)
{
	if(!w || w=='') w = '100%';
	if(!h || h=='') h = '100%';

	var strHtml = '';

	strHtml = '	<OBJECT ID="MediaPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase width="'+w+'"	height="'+h+'"  name="MediaPlayer" VIEWASTEXT>\n';
	strHtml += '	<PARAM name="URL" value="' + sURL + '"/>\n';
	strHtml += '	<PARAM name="defaultFrame" value="content"/>\n';
	strHtml += '	<PARAM name="uiMode" value="'+mode+'"/>\n';
	strHtml += '	<PARAM name="autoStart" value="'+auto+'"/>\n';
	strHtml += '	<PARAM name="enableContextMenu" value="false"/>\n';
	strHtml += '	<PARAM name="fullScreen" value="false"/>\n';
	strHtml += '	<PARAM name="enabled" value="True"/>\n';
	strHtml += '	<PARAM name="stretchToFit" value="true"/>\n';
	strHtml += '	<PARAM name="volume" value="30"/>\n';
	strHtml += '	</OBJECT>\n';

	return strHtml;
}

function getStrLength(val){var tmp="";var ilen=0;for(var i=0;i<val.length;i++){tmp=val.charAt(i);ilen+=(escape(tmp).length>4)?2:1;}return ilen;}

//]]>