var isIE = (navigator.userAgent.indexOf("MSIE")>=0 && document.all);
var sMainDomain = 'http://www.gamesum.co.kr';
var sMainSSLDomain = 'https://www.gamesum.co.kr';
var sOgDomain = 'http://og.gamesum.co.kr';
var sFgDomain = 'http://fg.gamesum.co.kr';

/* ÀÌº¥Æ® */
function GoPage1() {
	goNoticeView('74');
}
function GoPage2() {
	window.open( sMainDomain + '/event0902/event.php', 'e0902', '' );
}
function GoPage3() {
	goFaqView('51');
}

String.prototype.trim = function(sStr) { 
	sStr = this != window ? this : sStr; 
	return sStr.replace(/^\s+/g,'').replace(/\s+$/g,''); 
}

function setCookieTime( sName, sValue, iExpireTime ) {
	var ObjTodayDate = new Date();
	ObjTodayDate.setSeconds( ObjTodayDate.getSeconds() + iExpireTime );

	var sSetDomain = '';
	if( arguments[3] ) sSetDomain = ' domain=' + arguments[3] + ';';

	document.cookie = sName + '=' + escape(sValue) + '; path=/; expires=' + ObjTodayDate.toGMTString() + ';' + sSetDomain;
}

function setCookie( sName, sValue, iExpireDays ) {
	var ObjTodayDate = new Date();
	ObjTodayDate.setDate( ObjTodayDate.getDate() + iExpireDays );

	document.cookie = sName + '=' + escape(sValue) + '; path=/; expires=' + ObjTodayDate.toGMTString() + ';';
}

function getCookie(name){
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while(i< clen){
		var j = i + alen;
		if(document.cookie.substring(i,j)==arg){
			var end = document.cookie.indexOf(";",j);
			if(end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(j,end));
		}
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}

function deleteCookie( sName ) {
	var ObjTodayDate = new Date();
  	ObjTodayDate.setDate( ObjTodayDate.getDate() - 1 );

	var sSetDomain = '';
	if( arguments[1] ) sSetDomain = ' domain=' + arguments[1] + ';';

  	document.cookie = sName + '=' + ';  path=/; expires=' + ObjTodayDate.toGMTString() + ';' + sSetDomain;
}

function getIEVersion(){
	g=navigator;
	a=g.userAgent;
	p=g.appVersion;
	m=p.indexOf("MSIE");
	if(m!=-1 && a.indexOf("Win") != -1){
		return parseFloat(p.substring(m+4));
	}
	return -1;
}

function openWindow( sUrl, sName, iWidth, iHeight ) {
	var sScroll = 'no';
	if( arguments[4] ) sScroll = arguments[4];
	return window.open( sUrl, sName, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,scrollbars='+sScroll+',width='+iWidth+',height='+iHeight+',top=70,left=650');
}

function selfClose(bReload) {
	try{
		if( bReload ) opener.location.reload();
	}catch(e){}
	window.close();
}

function HttpSock( sMethod, sUrl, sParameter, sFormName, fCallbackFunction ) {
	try{
        sMethod = sMethod.toLowerCase();
        switch ( sMethod ) {
                case 'post' :
                        sParameter = Form.serialize( sFormName );
                        break;
                case 'get' :
                        break;
        }

        var objHttp = new Ajax.Request(
                sUrl, {
                        method : sMethod,
                        parameters : sParameter,
                        onSuccess : function ( transport ) {
                                if ( fCallbackFunction != null ) { 
                                        fCallbackFunction( transport.responseText );
                                }
                        },
                        onFailure : function() {
                                if ( fCallbackFunction != null ) {
                                        fCallbackFunction( 'F' );
                                }
                        } 
                }
        );
	}catch(e){
		if ( fCallbackFunction != null ) {
			fCallbackFunction( 'F' );
		}
	}
}

function isValidId( sId ) {
	if(sId == 0) {
		alert('ÇÊ¼ö»çÇ×ÀÎ ¾ÆÀÌµð Á¤º¸°¡ ÀÔ·ÂµÇÁö ¾Ê¾Ò½À´Ï´Ù.');
		return false;
	}

	sId = sId.strip();
	if( !/^[a-z0-9]{4,12}$/i.test(sId) ) {
		alert('¾ÆÀÌµð´Â 4~12ÀÚ ÀÌ³»ÀÇ ¿µ¹®°ú ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.');
		return false;
	}

	return true;
}

function isValidNick( sNick ) {
	if(sNick == 0) {
		alert('ÇÊ¼ö»çÇ×ÀÎ º°¸í Á¤º¸°¡ ÀÔ·ÂµÇÁö ¾Ê¾Ò½À´Ï´Ù.');
		return false;
	}

	sNick = sNick.strip();
	if( /^[0-9~!@#$%^&*()_\-+=|\}\{\[\];:"'?\/><,.a-z]+$/.test( sNick ) ) {
		if( sNick.length > 14 || sNick.length <= 0 ) {
			alert('º°¸íÀº ÇÑ±Û 8ÀÚ ÀÌ³», ¿µ¹® 14ÀÚ ÀÌ³»·Î¸¸ ¸¸µå½Ç ¼ö ÀÖ½À´Ï´Ù.');
			return false;
		}
	}
	else {
		if( sNick.length > 8 || sNick.length <= 0 ) {
			alert('º°¸íÀº ÇÑ±Û 8ÀÚ ÀÌ³», ¿µ¹® 14ÀÚ ÀÌ³»·Î¸¸ ¸¸µå½Ç ¼ö ÀÖ½À´Ï´Ù.');
			return false;
		}
	}

	return true;
}

function isValidPasswd( sPasswd ) {
	if(sPasswd == 0) {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ½Ê½Ã¿À.');
		return false;
	}

	sPasswd = sPasswd.strip();
	if( !/^[a-z0-9]{4,12}$/i.test(sPasswd) ) {
		alert('ºñ¹Ð¹øÈ£´Â 4~12ÀÚ ÀÌ³»ÀÇ ¿µ¹®°ú ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.');
		return false;
	}

	return true;
}

function isValidTel( sTel ) {
	var sPattern = /^[0-9]{2,4}[\-\)\s]?[0-9]{3,4}[\-\s]?[0-9]{4}$/;
	if( !sPattern.test(sTel) ) {
		alert('ÀüÈ­¹øÈ£ Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.');
		return false;
	}

	return true;
}

function isValidEmail( sEmail ) {
	sEmail = sEmail.trim();
	var sPattern = /[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*@[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*/;
	if( !sPattern.test(sEmail) ) {
		alert('ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.');
		return false;
	}
	if( sEmail.length > 50 ) {
		alert('ÀÌ¸ÞÀÏ ÁÖ¼Ò´Â 50ÀÚ±îÁö À¯È¿ÇÕ´Ï´Ù.');
		return false;
	}

	return true;
}

function crop( sText, iLimitLen, sTrail ) {
        if( iLimitLen <= 0 ) return sText;
        if( sText.length > iLimitLen ) sText = sText.substring(0,iLimitLen) + sTrail;
        return sText;
}

function number_format( sStr ){
        var objRegExp = new RegExp('([0-9]+)([0-9]{3})');  
        while(objRegExp.test(sStr)) {
                sStr = sStr.replace(objRegExp, '$1,$2');
        }
        return sStr;
}

function winResize( iWidth, iHeight ) {
	window.resizeTo( iWidth+10, iHeight+49 );
}

function setPng24( Obj ) {
	Obj.width=Obj.height=1;
	Obj.className=Obj.className.replace(/\bpng24\b/i,'');

	Obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ Obj.src +"',sizingMethod='image');"
	Obj.src=''; 
	return '';
}

// µ¿¿µ»ó, ÇÃ·¡½¬ ÀÚµ¿ È°¼ºÈ­
function activate(id) {
	document.getElementById(id).innerHTML = document.getElementById(id).innerHTML;
}

function flashview(FlashIDName, FlashFileName, FlashWidth, FlashHeight, DNSSetting, WMODESetting, FlashBGColor, QSetting, FlashAlign) {	
	var sHtml = '';
	sHtml += '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	sHtml += 'CODEBASE="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" ';
	sHtml += ' ID="'+FlashIDName+'" WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" ALIGN="wmode">';
	sHtml += '<PARAM NAME="movie" VALUE="'+ FlashFileName +'">';
	sHtml += '<PARAM NAME="quality" VALUE="high">';
	sHtml += '<PARAM NAME="bgcolor" VALUE="'+FlashBGColor+'">';
	sHtml += '<PARAM NAME="wmode" VALUE="transparent">';
	sHtml += '<PARAM NAME="allowScriptAccess" VALUE="always">';
	sHtml += '<PARAM NAME="volume" VALUE="70">';
	sHtml += '<EMBED SRC="'+ FlashFileName +'"  NAME="'+FlashIDName+'"';
	sHtml += ' WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" QUALITY="high" BGCOLOR="'+FlashBGColor+'"';
	sHtml += ' ALLOWSCRIPTACCESS="always" ALIGN="wmode" WMODE="transparent" TYPE="application/x-shockwave-flash" VOLUME="70"';
	sHtml += ' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >';
	sHtml += '</EMBED>';
	sHtml += '</OBJECT>';
	document.write(sHtml);
}

function GetTemplate( sTplId ) {
        var sTemplate;
        sTemplate = $(sTplId).innerHTML;

        return sTemplate.replace(/(^\s*<!--(\/\/)?Template\s*|\s*(\/\/)?-->\s*$)/gi, "");
}


var bChkNick = false;
var sChkNick = '';
var sResNick = '';
function CheckOverlapNick( sNick ) {
	if( bChkNick ) {
		alert( '´Ð³×ÀÓ Áßº¹ Ã¼Å© Áß ÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ½Ê½Ã¿À.' );	
		return;
	}

	if( !isValidNick( sNick ) ) {
		return;
	}
	
	bChkNick = true;
	sChkNick = sNick;

	if( arguments[1] ) {
		var ObjScript = document.createElement("script");
		ObjScript.setAttribute( 'language', 'javascript' );
		ObjScript.setAttribute( 'src', '/member/chk_overlap_nick.php?nick=' + sNick + '&js=y' );
		
		document.body.appendChild(ObjScript);	
	}
	else {
		HttpSock( 'Get', '/member/chk_overlap_nick.php?nick=' + sNick, '', '', ResultNick );
	}
}

function ResultNick( sResponseText ) {
	if( sResponseText == 'E' ) {
		$('chk_nick').innerText = sChkNick;
		$('ovp_nick').style.display = '';
		$('vld_nick').style.display = 'none';
	}
	else if( sResponseText == 'S' ) {
		sResNick = sChkNick;
		$('ovp_nick').style.display = 'none';
		$('vld_nick').style.display = '';
	}
	else {
		alert( 'Áßº¹À» È®ÀÎÇÏ´Â µµÁß ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.\n\nÀá½Ã ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ½Ê½Ã¿À.' );
	}
	bChkNick = false;
	sChkNick = '';
}

function PopLoginAsk() {
	if( arguments[0] ) {
		if( arguments[1] ) setCookieTime( arguments[0], arguments[1], 600 ); 
		else setCookieTime( arguments[0], 'y', 600 ); 
	}
	location.href = sMainDomain + '/member/login_pop.php?chk=y&url=' + encodeURIComponent(location.href);
}

function LoginAsk() {
	if( arguments[0] ) {
		if( arguments[1] ) setCookieTime( arguments[0], arguments[1], 600 ); 
		else setCookieTime( arguments[0], 'y', 600 ); 
	}
	location.href = sMainDomain + '/member/login.php?chk=y&url=' + encodeURIComponent(location.href);
}

function Login() {
	if(arguments[0]) {
		var sQue = '';
		if( arguments[1] ) sQue = '?' + arguments[1];
		if( /^p([0-9]+)_([0-9])_([a-z]+)$/.exec( arguments[0] ) ) {
			openWindow( sMainDomain + '/member/login_pop.php' + sQue, '', RegExp.$1, RegExp.$2, RegExp.$3 );
		}
		else {
			window.open( sMainDomain + '/member/login.php' + sQue, '', '' );
		}
	}
	else
		location.href = sMainDomain + '/member/login.php?url=' + encodeURIComponent(location.href);
}
function LogOut() {
	location.href = sMainSSLDomain + '/member/logout.php';
}

function JoinMember() {
	var sQue = '';
	if( arguments[1] ) sQue = '?' + arguments[1];

	if(arguments[0]) {
		if( /^p([0-9]+)_([0-9])_([a-z]+)$/.exec( arguments[0] ) ) {
			if( arguments[1] ) sQue = '?pop=y&' + arguments[1];
			openWindow( sMainSSLDomain + '/member/join.php' + sQue, '', RegExp.$1, RegExp.$2, RegExp.$3 );
		}
		else {
			window.open( sMainSSLDomain + '/member/join.php' + sQue, '', '' );
		}
	}
	else {
		location.href = sMainSSLDomain + '/member/join.php' + sQue;
	}
}

function MemberInfo() {
	if(arguments[0]) 
		location.href = sMainSSLDomain + '/member/member_check.php';
	else
		window.open( sMainSSLDomain + '/member/member_check.php', '', '' );
}

function GoMain() {
	if(arguments[0]) 
		window.open( sMainDomain, '', '' );
	else
		location.href = sMainDomain;
}

function GoOldGame() {
	var sQue = '';
	if( arguments[0] ) sQue += '?cg=' + arguments[0];
	if( arguments[1] == 'pop' )
		window.open( sOgDomain + '/' + sQue, 'og', '' );
	else
		location.href = sOgDomain + '/' + sQue;
}

function GoFlashRank() {
	location.href = sFgDomain + '/rank/my_rank.php';
}

function OldGmPresentPop( iNo ) {
	var sf = 'y';
	if( arguments[1] ) sf = arguments[1];
	var win = openWindow( sOgDomain + '/game/game_present.php?sf=' + sf + '&no=' + iNo, 'gPresent', 700, 650, 'yes' );
	try{
	if( win != null ) win.focus();
	}catch(e){}
}

/*
function OldGmAutoStart( no ) {
	deleteCookie('st_no');
	gameStart(no,'');
}
*/

function GoOgSearch( sSw ) {
	if( arguments[1] == 'pop' ) 
		window.open( sOgDomain + '/index.php?sk=gt&sw=' + sSw, 'og', '' );
	else
		location.href = sOgDomain + '/index.php?sk=gt&sw=' + sSw;
}

function GoFlashGame() {
	var sUrl = '';
	if( arguments[0] == 99 ) 
		sUrl = sFgDomain + '/game/poisoning_game.php';
	else if( arguments[0] == 2 ) 
		sUrl = sFgDomain + '/game/poisoning_game.php?cg=0';
	else if( arguments[0] == 3 ) 
		sUrl = sFgDomain + '/game/ranking_game.php';
	else
		sUrl = sFgDomain;

	location.href = sUrl;
	//window.open( sUrl, 'og', '' );
}

function GoFlashGamePlay( iNo ) {
	var sUrl = sFgDomain + '/game/game_play.php?no=' + iNo;
	if( arguments[2] == true ) sUrl += '&top=y';

	if( arguments[1] == 'pop' ) {
		window.open( sUrl, 'fgp', '' );
	}
	else {
		location.href = sUrl;
	}
}

function GoFgSearch( sSw ) {
	location.href = sFgDomain + '/game/game_search.php?sw=' + sSw;
}

function GoGmRankList() {
	location.href = sFgDomain + '/rank/game_rank.php';
}

function GetMySumUrl( sId ) {
	return 'http://mysum.gamesum.co.kr/' + sId;
}

function GoMySum( sId ) {
	if( sId.strip() == '' ) {
		alert('Á¸ÀçÇÏÁö ¾Ê´Â ¼¶ÀÔ´Ï´Ù.');
		return;
	}
	location.href = GetMySumUrl( sId ) + '/';
}

function GoMySumPop( sId ) {
	if( sId.trim() == '' ) {
		alert('Á¸ÀçÇÏÁö ¾Ê´Â ¼¶ÀÔ´Ï´Ù.');
		return;
	}
	var sQue = '';
	if( arguments[1] > 0 ) sQue = '?vck=' + arguments[1];
	window.open( GetMySumUrl( sId ) + '/' + sQue, '', '' );
}

function GoMySumGame( sId, sGp ) {
	location.href = GetMySumUrl( sId ) + '/game.php?gp=' + sGp;
}

function GoMySumGamePop( sId, sGp ) {
		if( sId.strip() == '' ) {
		alert('Á¸ÀçÇÏÁö ¾Ê´Â ¼¶ÀÔ´Ï´Ù.');
		return;
	}
	var sQue = '';
	if( arguments[1] > 0 ) sQue = '?vck=' + arguments[1];
	window.open( GetMySumUrl( sId ) + '/game.php?gp=' + sGp, '', '' );
}
function GoMySumGameDv( sId, iDv ) {
	if( arguments[2] ) 
		return GoMySumGameCg( sId, arguments[2] );
	else
		location.href = GetMySumUrl( sId ) + '/game.php?dv=' + iDv;
}
function GoMySumGameCg( sId, iCg ) {
	if( arguments[2] )
		return window.open( GetMySumUrl( sId ) + '/game.php?cg=' + iCg, 'ms', '' );
	else
		location.href = GetMySumUrl( sId ) + '/game.php?cg=' + iCg;
}
function GoMySumGameSort( sId, sGp, iDv, iCg, sSort ) {
	if( iCg > 0 )
		location.href = GetMySumUrl( sId ) + '/game.php?cg=' + iCg + '&sort=' + sSort;
	else if( iDv > 0 ) 
		location.href = GetMySumUrl( sId ) + '/game.php?dv=' + idv + '&sort=' + sSort;
	else if( sGp ) 
		location.href = GetMySumUrl( sId ) + '/game.php?gp=' + sGp + '&sort=' + sSort;
}

function GmTactics( sId, iNo ) {
	if( arguments[2] == 'pop' ) 
		window.open( GetMySumUrl( sId ) + '/mytactics/view.php?no=' + iNo, 'gt', '' );
	else if( arguments[2] == 'self' )
		location.href = GetMySumUrl( sId ) + '/mytactics/view.php?no=' + iNo;
	else
		openWindow( GetMySumUrl( sId ) + '/mytactics/view.php?pop=y&no=' + iNo, 'gt', 740, 700, 'yes' );
}

function loadScript() {
        this.baseScript = function() {};
        this.dummyScript = function() {};
        this.dummyScript2 = function() {};
        this.startScript = function() {
                this.baseScript();
                this.dummyScript();
                this.dummyScript2();
        }
}

var loadScript = new loadScript();

window.onload = function() {
	try{
		loadScript.startScript();
	}catch(e){}
}

function goNoticeView( iNo ) {
	if( arguments[1] == 'pop' ) window.open( sMainDomain + '/notice/view.php?no=' + iNo, 'nt', '' );
	else location.href = sMainDomain + '/notice/view.php?no=' + iNo;
}
function goNoticeRead() {
	var sQue = '';
	if( arguments[0] ) sQue += '?dv=' + arguments[0];
	location.href = sMainDomain + '/notice/list.php' + sQue;
}

function goFaqMain() {
	location.href = sMainDomain + '/faq/main.php';
}
function goFaqRead() {
	var sQue = '';
	if( arguments[0] ) sQue += '?cg=' + arguments[0];
	if( arguments[1] ) {
		sQue += sQue ? '&':'?';
		sQue += 'page=' + arguments[1];
	}
	location.href = sMainDomain + '/faq/list.php' + sQue;
}
function goFaqView( iNo ) {
	var sQue = '';
	if( arguments[2] ) sQue += '&' + arguments[2];
	if( arguments[1] == 'pop' ) window.open( sMainDomain + '/faq/view.php?no=' + iNo + sQue, 'fq', '' );
	else location.href = sMainDomain + '/faq/view.php?no=' + iNo + sQue;
}
function goFaqSearch( sSw ) {
	location.href = sMainDomain + '/faq/list.php?sk=ct2&sw=' + sSw;
}

function goHelperRead() {
	location.href = sMainDomain + '/helper/list.php';
}
function goHelperWrite() {
	if( arguments[0] == 'pop' ) window.open(sMainDomain + '/helper/write.php','hp','');
	else location.href = sMainDomain + '/helper/write.php';
}

function goKnowhowRead() {
	var sQue = '';
	if( arguments[0] ) sQue += '?cg=' + arguments[0];
	if( arguments[1] ) {
		sQue += sQue ? '&':'?';
		sQue += 'page=' + arguments[1];
	}
	location.href = sOgDomain + '/knowhow/list.php' + sQue;
}
function goKnowhowView( iNo ) {
	var sQue = '';
	if( arguments[1] ) sQue += '&page=' + arguments[1];
	location.href = sOgDomain + '/knowhow/view.php?no=' + iNo + sQue;
}
function goKnowhowSearch( sSw ) {
	location.href = sOgDomain + '/knowhow/list.php?sk=ct2&sw=' + sSw;
}

function goEventRead() {
	alert('¼­ºñ½º ÁØºñ Áß ÀÔ´Ï´Ù.' );
	//location.href = '/event/list.php';
}

function goOnlineWrite() {
	var sUrl = sMainDomain + '/online/write.php';
	if( arguments[0] == 'pop' ) {
		try{
			if( opener.location.href ) 
				opener.location.href = sUrl;
			else 
				window.open( sUrl, 'ol', '' );
		}catch(e) {
			window.open( sUrl, 'ol', '' );
		}	
	}
	else 
		location.href = sUrl;
}

function goCustomer() {
	location.href = sMainDomain + '/customer.php';
}

function goAgreement() {
	var sQue = '';
	if( arguments[1] ) sQue += '?f=' + arguments[1];
	if( arguments[0] == 'pop' ) window.open(sMainDomain + '/agreement.php'+sQue,'ag','');
	else location.href = sMainDomain + '/agreement.php'+sQue;
}

function goInstallAgr(f) {
	switch(f) {
		case 'gamesum':
			openWindow(sMainDomain + '/agreement/gamesum.php', 'agp', 400, 250);
			break;
		case 'reward':
			openWindow(sMainDomain + '/agreement/pointfree.php', 'agp', 400, 250);
			break;
	}
}

function goCompanyInfo() {
	openWindow(sOgDomain + '/company/company_info.php','ag',439,283);
}
function goSitemap() {
	alert( '¼­ºñ½º ÁØºñ Áß ÀÔ´Ï´Ù.' );
}

function openUserUpload() {
	if( bLogin ) 
		openWindow(sOgDomain + '/game/game_user_upload.php','gu',440,291);
	else
		LoginAsk();
}

function SubmitSearch( ObjFrm ) {
	if( ObjFrm.elements['sw'].value == 0 ) {
		alert( '°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä' );
		ObjFrm.elements['sw'].focus();
		return false;
	}
	switch( ObjFrm.elements['sk_t'].value.strip() ) {
		case 'G½ÄÀÎ°Ë»ö':
			try{ goKnowhowSearch( ObjFrm.elements['sw'].value ); }catch(e){}
			return false;
			break;
		case 'FAQ°Ë»ö':
			try{ goFaqSearch( ObjFrm.elements['sw'].value ); }catch(e){}
			return false;
			break;
		default:
			try{ goCommonSearch( ObjFrm.elements['sw'].value ); }catch(e){}
			break;
	}
	return false;
}

function goCommonSearch( sSw ) {
	location.href = "http://gsearch.gamesum.co.kr/search.php?keyword=" + encodeURIComponent(sSw);
}

function errProfileB( Obj ) {
	Obj.src = sMainDomain + '/common_img/no_image_208.gif';
}
function errProfileM( Obj ) {
	Obj.src = sMainDomain + '/common_img/no_image_184.gif';
}
function errProfileSM( Obj ) {
	Obj.src = sMainDomain + '/common_img/no_image_98.gif';
}
function errProfileS( Obj ) {
	Obj.src = sMainDomain + '/common_img/no_image_40.gif';
}

function GoAdCenter() {
	window.open( sMainDomain + '/ad_center.php', 'ac', '' );
}
