function callFlash(flashURL,flashVALUE, flashWIDTH, flashHEIGHT)
{
	document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' %>');
	document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">');
	document.writeln ('<PARAM NAME=FlashVars VALUE="'+flashVALUE+'">');
	document.writeln ('<PARAM NAME=wmode VALUE=transparent>');
	document.writeln ('<PARAM NAME=loop VALUE=true>');
	document.writeln ('<PARAM NAME=quality VALUE=high>');
	document.writeln ('<PARAM NAME=base VALUE=.>');
	document.writeln ('<PARAM NAME=allowScriptAccess VALUE=always>');
	document.writeln ('<EMBED base="."  src='+flashURL+' flashvars='+flashVALUE+' allowScriptAccess=always loop=true wmode=transparent quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
	document.writeln ('</OBJECT>');
}



//Flash Write
function flashWrite(url,w,h,id,bg,vars,win){

	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	document.write(flashStr);
}

// Tab menu
function tab1Change(tab, layer, obj){
	var tabObj = document.getElementById(tab).getElementsByTagName("a");
	var layerObj = document.getElementById(layer);
	var selectIdx;
	var checkIdx=0;
	
	for(var i=0; i< tabObj.length; i++){
		if(obj == tabObj[i]){
			selectIdx = i;
			tabObj[i].className = "on";
		}else{
			tabObj[i].className = "";
		}
	}
	for(var i=0; i< layerObj.childNodes.length; i++){
		if(layerObj.childNodes[i].tagName == "DIV"){
			if(checkIdx==selectIdx){
				layerObj.childNodes[i].style.display = "block";
			}else{
				layerObj.childNodes[i].style.display = "none";
			}
			checkIdx++;
		}
	}
}

// 입력시 텍스트 사라짐
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
	thefield.value = "";
	thefield.style.background="#b1b1b1 none";
}


// Input 클릭시 기본값 사라짐
// [사용예] onfocus="clearText(this)"
var sel;
function getView(obj){
	obj.className = "on";
	if(sel != null) sel.className = "";
	sel = obj;
}

// PNG - ie6
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');" 
    return ''; 
} 

//Layer
var Nnum = 1;// ???Number
var imgname = "td";// TD ID
var imgname2 = "img";// TD ID
var Bigimg = 2;
 
function prev(){
	if(Nnum != 1){
		Nnum = Nnum - 1;
		var Snum = 1; //??
		var Enum = Nnum + 3;  //?
		Bigimg = Bigimg - 1;
 
		var obj = document.getElementById(imgname+Enum);
		obj.style.display = "none";
 
		for(Snum = Nnum; Snum < Enum; Snum ++ ){
			var obj = document.getElementById(imgname+Snum);
			obj.style.display = "block";
			obj.className="items";
			var obj2 = document.getElementById(imgname2+Snum);
			obj2.style.width = 57+ "px";
			obj2.style.height = 27+ "px";
		}
 
			var obj = document.getElementById(imgname+Bigimg);
			obj.className="item_view";
			var obj2 = document.getElementById(imgname2+Bigimg);
			obj2.style.width = 92+ "px";
			obj2.style.height = 43+ "px";
 
	}else{
	//alert("?? ??? ???.");
	}
}
 
 
 
function next(cnt){
	if(cnt > 3){
		if(Nnum != cnt-2){
			Bigimg = Bigimg + 1;
			var obj = document.getElementById(imgname+Nnum);
			obj.style.display = "none";
			
			Nnum = Nnum + 1;
			var Snum = 1; //??
			var Enum = Nnum + 3;  //?
 
 
			for(Snum = Nnum; Snum < Enum; Snum ++ ){
				
 
				var obj = document.getElementById(imgname+Snum);
				obj.style.display = "block";
				obj.className="items";
				var obj2 = document.getElementById(imgname2+Snum);
				obj2.style.width = 57+ "px";
				obj2.style.height = 27+ "px";
			}
				var obj = document.getElementById(imgname+Bigimg);
				obj.className="item_view";
				var obj2 = document.getElementById(imgname2+Bigimg);
				obj2.style.width = 92+ "px";
				obj2.style.height = 43+ "px";
				
				
		}else{
	//	alert("??? ???? ????.");
		}
	}
}




function makeWin(url, winname, width, height, scrolltype){
   xposition=0; yposition=0;
   if (parseInt(navigator.appVersion) >= 4){
      xposition = (screen.width - width) / 2;
      yposition = (screen.height - height) / 2;
   }
   args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0,"
         + "scrollbars=" + scrolltype + "," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
		 + "screenx=" + xposition + ","  //NN Only
		 + "screeny=" + yposition + ","  //NN Only
		 + "left=" + xposition + ","     //IE Only
		 + "top=" + yposition;           //IE Only

   var newWin=window.open(url,winname,args)
   newWin.focus();
}



function Fun_Web_UrlMenu(menuNo){
	
	var go = window.top.document.location;
	if (menuNo == "00000") {go.href = UrlHttp;}
	//account
	if (menuNo == "01010") {go.href = UrlHttps + "/Member/Member.html";}
	if (menuNo == "01011") {go.href = UrlHttps + "/Member/Member_Edit_Step1.html";}
	if (menuNo == "01012") {go.href = UrlHttps + "/Member/Agree.html";}
	if (menuNo == "01013") {go.href = UrlHttps + "/Member/IdPwd.html";}
	if (menuNo == "01014") {go.href = UrlHttps + "/Member/Member_Finish.html";}

	

	//support
	if (menuNo == "02010") {go.href = UrlHttp + "/Support/Faq/List.html";}
	if (menuNo == "02013") {go.href = UrlHttp + "/Support/Qna/Write.html";}
	if (menuNo == "02014") {go.href = UrlHttp + "/Support/Qna/Question.html";}

	//login-logout
	if (menuNo == "03010") {go.href = UrlHttps + "/Login/Login.html";}
	if (menuNo == "03011") {go.href = UrlHttps + "/Login/Logout.html";}
	if (menuNo == "03012") {go.href = UrlHttps + "/Login/Logout.html?retcode=login";}


	// game list

	if (menuNo == "04010") {go.href = UrlSeal;}
	if (menuNo == "04011") {go.href = UrlSting;}
	if (menuNo == "04012") {go.href = UrlCraypas;}
	//if (menuNo == "04011") {alert('Comming Soon');}
	//if (menuNo == "04012") {alert('Comming Soon');}
	//news category

	if (menuNo == "05010") {go.href = UrlHttp + "/News/News.html";}
	if (menuNo == "05011") {go.href = UrlHttp + "/News/Announcement/List.html";}
	if (menuNo == "05012") {go.href = UrlHttp + "/News/Update/List.html";}
	if (menuNo == "05013") {go.href = UrlHttp + "/News/Event/List.html";}
	if (menuNo == "05014") {go.href = UrlHttp + "/News/Letter/List.html";}



	//cash
	if (menuNo == "06011") {go.href = UrlHttps + "/Blynk/BlynkAdd.html";}
	if (menuNo == "06012") {go.href = UrlHttps + "/Blynk/BlynkUsed.html";}
	if (menuNo == "06013") {go.href = UrlHttps + "/Blynk/BlynkAdded.html";}
	if (menuNo == "06014") {go.href = UrlHttps + "/Blynk/InComm.html";}


	//downloadMonday, August 24, 2009
	if (menuNo == "07011") {go.href = UrlHttp + "/Download/Downseal.html";}
	if (menuNo == "07012") {go.href = UrlHttp + "/Download/Downkos.html";}
	if (menuNo == "07013") {go.href = UrlHttp + "/Download/Downcraz.html";}

	//alert('ddd');	//forum
	if (menuNo == "08011") {go.href = UrlSeal+'/forum_action.asp';}
	if (menuNo == "08012") {go.href = UrlCraypas+'/forum_action.asp';}
	if (menuNo == "08013") {go.href = UrlSting+'/forum_action.asp';}


	//portal_flash_banner
	if (menuNo == "09011") {go.href = UrlSeal+'';}
	if (menuNo == "09021") {go.href = UrlSealShop+'/grabbit_start.html';}
	if (menuNo == "09012") {go.href = UrlCraypas+'';}
	if (menuNo == "09013") {go.href = UrlSting+'';}
	if (menuNo == "09014") {go.href = Urlrohan+'';}

	if (menuNo == "99999") {go.href = UrlHttp;}
	

}

function Wallpaper_Down(menuNo){
	
	var go = window.top.document.location;
	if (menuNo == "0701") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_07_1024_768.zip";}
	if (menuNo == "0702") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_07_1280_1024.zip";}
	if (menuNo == "0703") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_07_1600_1200.zip";}

	if (menuNo == "0801") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_08_1024_768.zip";}
	if (menuNo == "0802") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_08_1280_1024.zip";}
	if (menuNo == "0803") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_08_1600_1200.zip";}


	if (menuNo == "0901") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_09_1024_768.zip";}
	if (menuNo == "0902") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_09_1280_1024.zip";}
	if (menuNo == "0903") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_09_1600_1200.zip";}

	if (menuNo == "1001") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_10_1024_768.zip";}
	if (menuNo == "1002") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_10_1280_1024.zip";}
	if (menuNo == "1003") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_10_1600_1200.zip";}


	if (menuNo == "1101") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_11_1024_768.zip";}
	if (menuNo == "1102") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_11_1280_1024.zip";}
	if (menuNo == "1103") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_11_1600_1200.zip";}

	if (menuNo == "1201") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_12_1024_768.zip";}
	if (menuNo == "1202") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_12_1280_1024.zip";}
	if (menuNo == "1203") {go.href = UrlSting + "/image/kos_info/wallpaper/kos_wall_12_1600_1200.zip";}


}
function Fun_TextNull_Check(a,b)
{
	if(a.value == "")
	{
		alert(b);
		a.focus();

		
		return true;
	}
	else
	{
		
		return false;
	}
}

function logincheck()
{
	alert('Please Log in.');
}





function CharInfo()
{
	makeWin(UrlThis+'/clan/CharInfo.html', 'viewcharPop', 500, 710);
}
function memoBox()
{
	makeWin(UrlThis+'/community/received_msg.html', 'viewcharPop2', 550, 393);
}

function viewImgPop(seq)
{
	makeWin(UrlThis+'/downloads/screenshotspop.html?seq='+seq, 'viewImgPop', 548, 475);
}
