//검색 박스
document.write("	<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>");
document.write("	<div align=right style='padding:3 4 3 0'><div style='width:402;height:34;text-align:left;background:url(http://imgs.worldofwarcraft.co.kr/new/main/main_new/bg_subsearching.jpg) no-repeat;padding-top:3px'>");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin:0 0 0 30px\">");
document.write("		<tr>");
document.write("			<td>");
document.write("				<select id='collection' style=\"color:#d06915; background-color:#000000; border:1px solid #474747;font-size:8pt\">");
document.write("					<OPTION VALUE='worldofwarcraft-kr'>전체</OPTION>");
document.write("					<OPTION VALUE='worldofwarcraft-kr-faq'>FAQ</OPTION>");
document.write("				</select>");
document.write("			</td>");
document.write("			<td style=\"padding:0 4\">");
document.write("				<input id=\"keyword\" type=\"text\" style=\"width:234px;height:18;background-color:#000000;border:1px solid #474747;color:#d06916\" onKeyDown=\"javascript:if (event.keyCode == 13) {funcGooglesearchJump()}\"/>");
document.write("			</td>");
document.write("			<td>");
document.write("				<img src=\"http://imgs.worldofwarcraft.co.kr/new/main/main_new/btn_search.gif\" align=\"absmiddle\" onclick=\"funcGooglesearchJump()\" style=\"cursor:pointer\">");
document.write("			</td>");
document.write("		</tr>");
document.write("		<tr><td colspan=3 height=5></td></tr>");
document.write("		</table>");
document.write("	</div></div>");


function funcGooglesearchJump(){
	var  keyBox = document.getElementById('keyword');
	var  collectionOpt = document.getElementById('collection');

	if(keyBox.value==""){
		alert("검색어를 입력 해주십시오.\t\n");
		keyBox.focus();
	}else{
		location.href = "http://www.worldofwarcraft.co.kr/search/search.html?colOpt="+collectionOpt.value+"&key="+ keyBox.value;
	}
}

function funcGooglesearchResult(){
	var searchUrl = location.href;
	var searchKeys = searchUrl.split('?');
	searchKeys = searchKeys[1].split('&');
	searchKeys[0] = searchKeys[0].substring(searchKeys[0].lastIndexOf("/")+8);
	searchKeys[1] = searchKeys[1].substring(searchKeys[1].lastIndexOf("/")+5);

	var  tgFrame = document.getElementById('hiddenCntWin');
	//alert("http://www.worldofwarcraft.co.kr/search.do?site="+ searchKeys[0] +"&q="+ encodeURI(searchKeys[1]) +"&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend");
	tgFrame.src = "http://www.worldofwarcraft.co.kr/search.do?site="+ searchKeys[0] +"&q="+ encodeURI(searchKeys[1]) +"&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend";
	
}

function SelectboxChange(){
	var cate_rootObj = document.getElementById("collection");
	cate_rootObj.style.behavior ="url(/common/js/wow/selectBox2.htc)";
	cate_rootObj.style.width = 80;
	cate_rootObj.style.height = 18;

	var keywordObj = document.getElementById("keyword");

	//keywordObj.focus();
}

function resizeFrame() {

	var  tgFrame = document.getElementById('hiddenCntWin');

	var innerBody = tgFrame.contentWindow.document.body;
    var innerHeight = innerBody.scrollHeight;// + (innerBody.offsetHeight - innerBody.clientHeight)
	//alert(innerHeight);

	if (innerHeight<400) {
		tgFrame.height = 400;
	} else{
/*
		var ver = navigator.appVersion; 
		if (ver.indexOf("MSIE") != -1) 	 
		{ */
			tgFrame.height = innerHeight;
			/*
		}  else 	{ 
			 tgFrame.height = innerHeight;
		}     */        
	}

}



SelectboxChange(); //htc 파일을 불러와서 셀렉트박스 스타일 적용