function chmenu(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/menu/menu_" + imgname + "_f.gif";
}
function remenu(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/menu/menu_" + imgname + ".gif";
}
function chtopmenu(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/menu/" + imgname + "_f.gif";
}
function retopmenu(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/menu/" + imgname + ".gif";
}
function chtopbtn(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/top/btn_" + imgname + "_f.gif";
}
function retopbtn(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/top/btn_" + imgname + ".gif";
}
function chgif(pass,imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/" + pass + imgname + "_f.gif";
}
function regif(pass,imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/" + pass + imgname + ".gif";
}


function swf(pass,widthsize,heightsize){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + widthsize + '" height="' + heightsize + '" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + pass + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="' + pass + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="' + widthsize + '" height="' + heightsize + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function pageup(){
	window.scrollTo(0,0);
}
function chupbtn(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/global/btn_up_f.gif";
}
function reupbtn(imgname){
	document.images[imgname].src = "http://static.nexon.co.jp/talesweaver/global/btn_up.gif";
}


function ansOP(ans){
	if ('none' == document.getElementById(ans).style.display){
		document.getElementById(ans).style.display = 'block' ;
	}
	else{
		document.getElementById(ans).style.display = 'none' ;
	}
}

function popup(file){
	window.open(file,"subwin","width=658,height=700,directories=no,location=no,menubar=yes,scrollbars=yes,resizable=no,status=yes,");
}
function popup_cm(file,wsize,hsize){
	window.open(file,"subwin","width=" + wsize + ",height=" + hsize + ",directories=no,location=no,menubar=yes,scrollbars=yes,resizable=no,status=yes,");
}

function popup_ss(file,w,h,name){
	t= h + 43 ;
	var win=window.open("",name,"width="+w+",height="+t+",resizable=0,scrollbars=0");

	win.document.open("text/html");
	win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	win.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">');
	win.document.write('<head><meta http-equiv="content-language" content="ja" />');
	win.document.write('<title>スクリーンショット</title></head>');
	win.document.write('<body style="background:#219cd7;margin:0;">');
	win.document.write('<p style="margin:0;"><img src="http://static.nexon.co.jp/talesweaver/'+file+'" border="0" width="'+w+'" height="'+h+'" alt="" /></p>');
	win.document.write('<div style="width:100%;height:43px;margin:0;background:url(http://static.nexon.co.jp/talesweaver/global/bg_popup_ss.gif);text-align:center;"><a href="javascript:close();"><img src="http://static.nexon.co.jp/talesweaver/global/btn_close3.gif" border="0" width="89" height="28" vspace="6" alt="閉じる" /></a></div>');
	win.document.write('</body></html>');
	win.document.close();

	if(navigator.userAgent.indexOf("Mac")!=-1){
	win.resizeTo(w,h);
	}
}
function fullscreen(file) { 
	var max_screen = screen.availWidth;
	var nor_screen = screen.availHeight;
	var x = window.open(file, "tales", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width=" + max_screen + ",height=" + nor_screen + ",top=0,left=0"); 
}
function comingsoon() { 
	window.open("/global/coming.asp", "coming", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=380,height=235"); 
}

function popup_comic(file){
	window.open(file,"subwin","width=707,height=500,directories=no,location=no,menubar=yes,scrollbars=yes,resizable=no,status=yes,");
}

function submitform(){
	document.forms[0].submit();
}
function resetform(){
	document.forms[0].reset();
}

function movepage(page){
	window.location = page;
}
