function changeImage(){
	if(document.getElementById("mainoff").style.display == "block")
	 {
	  document.getElementById("mainoff").style.display = "none";
	  document.getElementById("mainon").style.display = "block";
	  document.getElementById("mainon_image").style.display = "block";
	  return;
	 }
	if(document.getElementById("mainoff").style.display == "none")
	 {
	  document.getElementById("mainoff").style.display = "block";
	  document.getElementById("mainon").style.display = "none";
	  document.getElementById("mainon_image").style.display = "none";
	  return;
	 }
}

function SearchResult()
{
	var el = document.getElementById("s");
	if (trim(el.value) == "" || trim(el.value) == "런파이프 검색")
	{
		alert("검색어를 입력해 주십시오.");
		return false;
	}
	location.href = "/search.php?search_keyword=" + encodeURIComponent(trim(el.value));
	return false;
}

function SearchResultMain()
{
	var el = document.getElementById("s2");
	if (trim(el.value) == "" || trim(el.value) == "런파이프 검색")
	{
		alert("검색어를 입력해 주십시오.");
		return false;
	}
	location.href = "/search.php?search_keyword=" + encodeURIComponent(trim(el.value));
	return false;
}

function SearchResultSpot()
{
	var el = document.getElementById("s2");
	if (trim(el.value) == "" || trim(el.value) == "런파이프 검색")
	{
		alert("검색어를 입력해 주십시오.");
		return false;
	}
	location.href = "/search.spot.php?search_keyword=" + encodeURIComponent(trim(el.value));
	return false;
}

function BrowserCheck() {

    appname = navigator.appName;
    useragent = navigator.userAgent;

    if (appname == "Microsoft Internet Explorer") appname = "IE";
        IE55 = (useragent.indexOf("MSIE 5.5") > 0);    // 5.5 버전
        IE6 = (useragent.indexOf("MSIE 6") > 0);    // 6 버전
        IE7 = (useragent.indexOf("MSIE 7") > 0);    // 7 버전
        IE8 = (useragent.indexOf("MSIE 8") > 0);    // 8 버전

    if (appname == "IE" && (IE55 || IE6 || IE7 || IE8)) {
        //alert("마우스 오른쪽 버튼을 클릭해서 즐겨찾기 추가 메뉴를 선택하시고 즐겨찾기 모음에 추가해 주세요~");
		if(confirm("마우스 오른쪽 버튼을 클릭해서 즐겨찾기 추가 메뉴를 선택하신 후 \n즐겨찾기 모음에 추가해 주세요~\n더 자세한 설명을 보시겠습니까?")){
			window.location.href="/help/piping.help.php";
		}
    }else{
        alert("파이핑하기 버튼을 마우스로 끌어서 브라우저바에 올려 놓으세요~");
	}
}