function DrawImage(ImgD,FitWidth)  
{  
var image=new Image();  
image.src=ImgD.src;  
if(image.width>FitWidth)  
{  
ImgD.width=FitWidth;  
ImgD.height=(image.height*FitWidth)/image.width;  
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}  
function win1(no,bo_table)
{
if(no=='' && bo_table=="30_10")
{
window.location.href='board.php?act=view&bo_table=90_12&id=3'
return;
}
if(bo_table=="30_11")
{
bo_table="30_10"
var skin="job"
}
else if(bo_table=="30_10")
{
var skin="job"
}
else if(bo_table=="30_12")
{
var skin="rencai"
}
else if(bo_table=="20_10")
{
var skin="budong"
}
window.open('skin/'+skin+'/view.php?bo_table='+bo_table+'&id='+no,'job','width=780,height=700,scrollbars=1,resize=no,toolbar=no,top=0,left=100')
}
function trim(str){ 
return str.replace(/(^\s*)|(\s*$)/g, ""); 
} 
function login_post()
{
if(trim(document.login_form.user_id.value)=='')
{
alert('회원 아이디를 입력해주세요');
document.login_form.user_id.focus();
return;
}
if(trim(document.login_form.password.value)=='')
{
alert('비밀번호를 입력해주세요');
document.login_form.password.focus();
return;
}
document.login_form.action='member/login_check.php';
document.login_form.submit();
}
function check_num()
{
if((event.keyCode<48)||(event.keyCode>57) ) event.returnValue=false; 
}

function GetRadioValue(RadioName){

    var obj;    

    obj=document.getElementsByName(RadioName);

    if(obj!=null){

        var i;

        for(i=0;i<obj.length;i++){

            if(obj[i].checked){

                return obj[i].value;            

            }

        }

    }

    return null;

}

function shuaxin(id,bo_table)
{
noframe.window.location.href='bbs/refresh.php?id='+id+'&bo_table='+bo_table;
return;
}


function admin_shuaxin(id,bo_table)
{
noframe.window.location.href='../../bbs/refresh.php?id='+id+'&bo_table='+bo_table;
return;
}
		function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
winObj = null; // ???
function ViewBigImg(Val)
{
	img = new Image(); //??? ??. ???? ?????? ??. ?? ??
	img.src= Val;
	draw();
	return;
}
function draw()
{
	if(img.complete == false) {
		setTimeout("draw()", "200");
		return;
	}
		
	width=img.width;
	height=img.height;
	swidth=screen.width;
	sheight=screen.height;
	scr = "no";
	
	if(width > (swidth-20)) {
		width=swidth-100;
		scr = "yes";
	}
	if(height > (sheight-20)) {
		height=sheight-100;
		scr = "yes";
	}
	var attr = "scrollbars="+scr+",width="+ width+ ",height=" + height;

	// ??
	if(winObj != null && winObj.closed == false) {winObj.close();}
	winObj = window.open('',"imgwindow",attr);
	winObj.document.write("<html><head><title>확대이미지 보기</title>");
	winObj.document.write("<s" + "cript>self.moveTo(30,30);</s" + "cript>");
	winObj.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><center>");
	winObj.document.write("<a href='javascript:window.close();'><img src='"+ img.src +"' border='0' alt='창끄기'></a>");
	winObj.document.write("</center></body></html>");
}
function ucc_youku()
{
str='<OBJECT id=insertplayer style="VISIBILITY: visible" height="100%" width="100%" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>'+
'<PARAM NAME="_cx" VALUE="15875">'+
'<PARAM NAME="_cy" VALUE="11113">'+
'<PARAM NAME="FlashVars" VALUE="">'+
'<PARAM NAME="Movie" VALUE="http://www.beijing114.com/img/qplayer.swf">'+
'<PARAM NAME="Src" VALUE="http://www.beijing114.com/img/qplayer.swf">'+
'<PARAM NAME="WMode" VALUE="Opaque">'+
'<PARAM NAME="Play" VALUE="0">'+
'<PARAM NAME="Loop" VALUE="-1">'+
'<PARAM NAME="Quality" VALUE="High">'+
'<PARAM NAME="SAlign" VALUE="LT">'+
'<PARAM NAME="Menu" VALUE="0">'+
'<PARAM NAME="Base" VALUE="">'+
'<PARAM NAME="AllowScriptAccess" VALUE="">'+
'<PARAM NAME="Scale" VALUE="NoScale">'+
'<PARAM NAME="DeviceFont" VALUE="0">'+
'<PARAM NAME="EmbedMovie" VALUE="0">'+
'<PARAM NAME="BGColor" VALUE="">'+
'<PARAM NAME="SWRemote" VALUE="">'+
'<PARAM NAME="MovieData" VALUE="">'+
'<PARAM NAME="SeamlessTabbing" VALUE="1">'+
'<PARAM NAME="Profile" VALUE="0">'+
'<PARAM NAME="ProfileAddress" VALUE="">'+
'<PARAM NAME="ProfilePort" VALUE="0">'+
'<PARAM NAME="AllowNetworking" VALUE="all">'+
'<PARAM NAME="AllowFullScreen" VALUE="true">'+
'</OBJECT>'
return str;
}
function pw_find()
{
window.open('./member/member_pw.php','beijing_pass_find','width=500,height=280,scrollbars=no,resize=no,toolbar=no,status=no');
}
function checkAll( frm ){
	for(i=0;i<frm.elements.length;i++){
		var obj=frm.elements[i];
		if(!obj.checked && obj.isnotice!='true' && obj.type=='checkbox')	obj.click();
	}
}
function unCheckAll( frm ){
	for(i=0;i<frm.elements.length;i++){
		var obj=frm.elements[i];
		if(obj.checked) obj.click();
	}
	}
function fl(s,d,w,h,t,v){
        document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width="+w+" height="+h+" id="+d+"><param name=wmode value="+t+" /><param name=movie value="+s+" /><param name=quality value=high /><param name=\"FlashVars\" value=\""+v+"\" /\><embed src="+s+" quality=high wmode="+t+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+w+" height="+h+"></embed></object>");
}
