function flashCM(URL,width,height,vars,bgColor,winmode) {

	var id=URL.split("/")[URL.split("/").length-1].split(".")[0];
	if(vars==null) vars='';
	if(bgColor==null) bgColor='#FFFFFF';
	if(winmode==null) winmode='opaque';

	document.write("	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' "); 
	document.write("		width='"+width+"' height='"+height+"' id='"+id+"' align='middle'> ");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie' 						value='"+URL+"' /> ");
	document.write("	<param name='FlashVars' 				value='"+vars+"' /> ");
	document.write("	<param name='wmode' 						value='"+winmode+"' /> ");
	document.write("	<param name='menu' 							value='false' /> ");
	document.write("	<param name='quality'						value='high' /> ");
	document.write("	<param name='bgcolor'						value='"+bgColor+"' /> ");
	document.write("	<embed src='"+URL+"' flashVars='"+vars+"' wmode='"+winmode+"' menu='false' quality='high' ");
	document.write("		bgcolor='"+bgColor+"' width='"+width+"' height='"+height+"' name='"+id+"' align='middle' ");
	document.write("		allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> ");
	document.write("	</object> ");
}

function downJava(url) {
	location.href = url;
}

function closeJava() {
	window.close();
}

function openFit() {
	var intLeft = (screen.availWidth/2) - 512;
	var intTop = (screen.availHeight/2) - 384;
	window.open('main.html','mac','width=1024,height=768,top='+intTop+',left='+intLeft+',scrollbars=no,resizable=no');void(0);
}

function openMem() {
	var intLeft = (screen.availWidth/2) - 263;
	var intTop = (screen.availHeight/2) - 300;
	window.open('/join/register.php','mem','width=527,height=600,top='+intTop+',left='+intLeft+',scrollbars=yes,resizable=no');
}
function openLogin() {	
	var intLeft = (screen.availWidth/2) - 263;
	var intTop = (screen.availHeight/2) - 161;
	window.open('/join/login.php','login','width=527,height=322,top='+intTop+',left='+intLeft+',scrollbars=yes,resizable=no');void(0);
}


function openLogout() {
	location.href="/bbs/logout.php";
//	var intLeft = (screen.availWidth/2) - 512;
//	var intTop = (screen.availHeight/2) - 384;
//	window.open('main.html','mac','width=1024,height=768,top='+intTop+',left='+intLeft+',scrollbars=no,resizable=no');void(0);
}
function openMember() {
	var intLeft = (screen.availWidth/2) - 263;
	var intTop = (screen.availHeight/2) - 300;
	window.open('/join/member_confirm.php?url=register_form.php','mem','width=527,height=600,top='+intTop+',left='+intLeft+',scrollbars=yes,resizable=no');void(0);
}

function privacyPolicy() {
	var intLeft = (screen.availWidth/2 - 255);
	var intTop = (screen.availHeight/2 - 200);
	window.open('/html/privacy.htm','mem','width=510,height=400,top='+intTop+',left='+intLeft+',scrollbars=no,resizable=no');void(0);
}


function openFull() {
	var intWidth = screen.availWidth - 10;
	var intHeight = screen.availHeight - 10;
	window.open('mainFull.html','mac','width='+intWidth+',height='+intHeight+',top=0,left=0,scrollbars=no,resizable=no');void(0);
}

function resizeFit(width,height) {
	var x = (screen.availWidth/2) - 512;
	var y = (screen.availHeight/2) - 384;
	window.resizeTo(1034, 817);
	window.moveTo(x, y);
	//autoSize(0, 0, 1034, 817);
}

function resizeFull() {	
	window.moveTo(0, 0);
	var x = screen.availWidth;
	var y = screen.availHeight;
	window.resizeTo(x, y);
	//autoSize(0, 0, intWidth, intHeight);
}
