<!--
var AjaxQuery = {};
AjaxQuery.msgResponse = function()
{
	var xHTTP=this.newRequest();
	var xHTTP_URL='http://www.momach.co.kr/incs_ajax/ajax_check.php?'+
	'ajax_mode='+arguments[0]+''+
	'&sql_one='+arguments[1];
	xHTTP.onreadystatechange = function() 
	{
		if(xHTTP.readyState == 4) 
		{
			if(xHTTP.status == 200)
			{
				openAjaxMsg(decodeURIComponent(xHTTP.responseText));
			}
		}
	}
	xHTTP.open('GET', xHTTP_URL);
	xHTTP.send(null);
}
AjaxQuery.newRequest = function()
{
	var x = null; 
	if(window.XMLHttpRequest)
    {	
        x = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
		try
		{
			x = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			x = new ActiveXObject("Microsoft.XMLHTTP");
		}
    }
	return x;
}
function openWindow(win_url, win_name, win_propertys, win_top, win_left)
{
	var winObj = null;
	if(win_name)
	{
		winObj = window.open(win_url, win_name, win_propertys);
		if(userAgentCheck() !=4)
		{
			winObj.moveTo(win_top, win_left);
		}
	}
	else
	{
		window.open(win_url);
	}
}
function carPage(s)
{
	var pageUrl='../mypage/my_cars_list.php';
	if(s==1)
	{
		location.href=pageUrl;
	}
	else
	{
		window.alert('제휴사로 등록이 되어있지 않습니다');
	}
}
function aucPage(s)
{
	var pageUrl='../mypage/my_aucs_list.php';
	if(s==1)
	{
		location.href=pageUrl;
	}
	else
	{
		window.alert('입찰회원으로 등록이 되어있지 않습니다');
	}
}
function partPage(s)
{
	var pageUrl='../mypage/my_parts_list.php';
	if(s==1)
	{
		location.href=pageUrl;
	}
	else
	{
		window.alert('부품파트너로 등록이 되어있지 않습니다');
	}
}
function partBigPage(s)
{
	var pageUrl='../items/item_parts_list.php?big_no='+s;
	location.href=pageUrl;
}
function imagePage(b)
{
	var pageUrl='../incs_ajax/img_enlarge.php?bbs_no='+b;
	openWindow(pageUrl,'img_enlarge','scrollbars=yes,width=840,height=620','80','0');
}
function loginPage(s_1,s_2)
{
	var pageUrl;
	if(s_1==1)
	{
		if(s_2==1)
		{
			pageUrl='../mypage/my_index.php';
		}
		else
		{
			pageUrl='../members/member_clause.php';
		}
	}
	else
	{
		if(s_2==1)
		{
			pageUrl='../mypage/my_login.php?login_mode=2';
		}
		else
		{
			pageUrl='../mypage/login_frm.php';
		}
	}
	location.href=pageUrl;
}
function openSmsPhone(s)
{
	var toPhone='';
	var toPhoneNum='';
	if(s !='')
	{
		toPhone = s.split('-');
		toPhoneNum = toPhone[0]+toPhone[1]+toPhone[2];
	}
	var pageUrl='../sms_sock/open_phone.php?to_phone='+toPhoneNum;
	openWindow(pageUrl, 'open_phone', 'scrollbars=yes,width=740,height=460', '120', '0');
}
function openMailPage(n, s)
{
	var n_name = encodeURIComponent(n);
	var pageUrl='../sms_sock/open_mail_frm.php?member_name='+n_name+'&member_email='+s;
	openWindow(pageUrl, 'open_mail_frm', 'scrollbars=yes,width=740,height=560', '120', '0');
}
function viewFlash(u, w, h)
{
	document.write("<embed src='"+u+"' width='"+w+"' height='"+h+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>");
}
function viewMediaPlayer(m_id, m_url)
{
	var d;
	d ='<object id="'+m_id+'" type="application/x-mplayer2" width="440" height="330" style="border: 1px solid #666;">';
	d +='<param name="filename" value="'+m_url+'" />';
	d +='<param name="autostart" value="true" />';
	d +='</object>';
	document.write(d);
}
function userAgentCheck()
{
	var userAppName = navigator.userAgent;
	var userAppCheck;
	if(userAppName.indexOf('MSIE') !=-1)
	{
		userAppCheck=0;
	}
	else if(userAppName.indexOf('Firefox') !=-1)
	{
		userAppCheck=1;
	}
	else if(userAppName.indexOf('Opera') !=-1)
	{
		userAppCheck=2;
	}
	else if(userAppName.indexOf('Safari') !=-1)
	{
		userAppCheck=3;
		if(userAppName.indexOf('Chrome') !=-1)
		{
			userAppCheck=4;
		}
	}
	else
	{
		userAppCheck=5;
	}
	return userAppCheck;
};
function freesize(v, s, size_1, size_2)
{
	var sizeform=document.getElementById(s);
	var sizeform_value=parseInt(sizeform.style.height);
	if(v == 1) 
	{
		if(sizeform_value > parseInt(size_1))
		{
			sizeform.style.height = (sizeform_value - parseInt(size_2))+'px';
		}
	}
	else if(v == 2) 
	{
		sizeform.style.height = (sizeform_value + parseInt(size_2))+'px';
	}
	else
	{
		sizeform.style.height = parseInt(size_1)+'px';
	}
}
function scrollPos()
{
	var d;
	if(userAgentCheck() < 3)
	{
		d=document.documentElement;
	}
	else
	{
		d=document.body;
	}
	d.scrollTop=0;
}
//-->