///////////////////////////////////////////// obj_common /////////////////////////////////////////////////////////////////////////


//-- ÀÏ¹ÝÀûÀ¸·Î ´Ü¼øÇÑ ÇÃ·¡½¬ ÀÏ °æ¿ì
/*
	-- ÆÄ¶ó¹ÌÅÍ Á¤º¸ --

	width : °¡·ÎÅ©±â
	height : ¼¼·ÎÅ©±â
	url : ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
*/

function swfView(width, height, url, version){

	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");//d27cdb6e-ae6d-11cf-96b8-444553540000
    if(version == 6) 
	document.write(" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' ");
    else if(version == 8) 
	document.write(" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
    else
	document.write(" codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write(" width='"+width+"' height='"+height+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' /> ");
	document.write("<param name='movie' value='"+url+"' /> ");
	document.write("<param name='quality' value='high' /> ");
	document.write("<param name='wmode' value='transparent'> ");
	document.write("<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write(" allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write(" pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function editorView(width, height){

	document.write("<OBJECT id='editBox' style='LEFT:0px;TOP:0px' data='/editor/Editor.htm' width='"+width+"' height='"+height+"' type='text/x-scriptlet' VIEWASTEXT></OBJECT>");

}

function editorCtrl(width, height){
 document.write("<object id='EditCtrl' width='"+width+"' height='"+height+"' classid='clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A' VIEWASTEXT >");
 document.write("<PARAM NAME=ShowBorders VALUE=1>");
 document.write("<PARAM NAME=ShowDetails VALUE=0>");
 document.write("<PARAM NAME=Appearance VALUE=0>");
 document.write("<PARAM NAME=ActivateActiveXControls VALUE=1>");
 document.write("</object>");
}

function vodView(width, height, filename, volume){
	document.write("<OBJECT id=myplayer CLASSID='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' ");
	document.write("CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' ");
	document.write("	STANDBY='Loading Microsoft Windows Media Player components...' TYPE='application/x-oleobject' width="+width+" height="+height+">");
	document.write("<param NAME='fileName' VALUE='"+filename+"'>");
	document.write("<param NAME='Displaysize' value='0'>");
	document.write("<param NAME='animationatstart' value='true'>");
	document.write("<param NAME='autostart' value='true'>");
	document.write("<param NAME='EnableContextMenu' Value='0'>");
	document.write("<param NAME='ShowStatusBar' VALUE='0'>");
	document.write("<param NAME='ShowControls' VALUE='0'>");
	document.write("<param NAME='Volume' value='"+volume+"'>");
	document.write("</OBJECT>");
}


function t_body_open(){
 var obj = document.getElementById('t_body');
 var bh=document.body.scrollHeight;
 if(obj.filters){
	xalpa="filter:alpha(opacity=50);";
 }else{
	bh=bh*70;
	xalpa="opacity:0.50;";
 }
 obj.innerHTML ='<div style="position:absolute;width:100%;left:0;top:0;height:'+bh+'px;z-index:10;background-color:#3A3A3A;'+xalpa+'"></div>';
}
function t_body_close(){
 var obj = document.getElementById('t_body');
 obj.innerHTML ='<div style="position:absolute;visibility:hidden;display:none;"></div>';
}

function login(){
t_body_open();
sendRequest("/mb_login2.php", '', seach_view_loaded,"GET");
}

function loginclose(){
t_body_close();
document.getElementById("t_body_up1").style.display="none";
document.getElementById("t_body_up1").style.visibility="hidden";
}

function seach_view_loaded(){
if(httpRequest.readyState == 4){
	if(httpRequest.status == 200){
		var sView=document.getElementById("t_body_up1");
		sView.innerHTML=httpRequest.responseText;
		document.getElementById("t_body_up1").style.top="150px";
		document.getElementById("t_body_up1").style.left="250px";
		document.getElementById("t_body_up1").style.width="450px";
		document.getElementById("t_body_up1").style.height="270px";
		document.getElementById("t_body_up1").style.overflow="hidden";
		document.getElementById("t_body_up1").style.visibility="visible";
		document.getElementById("t_body_up1").style.display="";
	}
}
}

//È¸¿ø°¡ÀÔ
function join_pop(){
url="/mb_join.php";
obj=window.open(url,'_join','resizable=no,scrollbars=yes,status=no,width=520,height=550, left=100, top=100');
obj.focus();
}

//È¸¿ø¼öÁ¤
function join_edit(){
url="/mb_edit.php";
obj=window.open(url,'_join','resizable=no,scrollbars=yes,status=no,width=520,height=550, left=100, top=100');
obj.focus();
}

//ºñ¹Ð¹øÈ£Ã£±â
function pwds(){
url="/mb_password.php";
obj=window.open(url,'_pass','resizable=no,scrollbars=yes,status=no,width=400,height=250, left=100, top=100');
obj.focus();
}

function nextFocus(where)
{
 if(event.keyCode == 13)
  login_send();
}
function  login_send(){
str=document.form_outlogin.mb_id.value;
if(str.length<1){
alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
document.form_outlogin.mb_id.focus();
return false;
}
str=document.form_outlogin.mb_password.value;
if(str.length<1){
alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
document.form_outlogin.mb_password.focus();
return false;
}
document.form_outlogin.submit();
}
