﻿//设置iframe高度
//    function SetIframeHeight(){
//          var iframeid=document.getElementById("commentFrame"); //iframe id
//          if (document.getElementById){
//               if (iframeid && !window.opera){
//                    if (iframeid.contentDocument && iframeid.contentDocument.body.offsetHeight){
//                        iframeid.height = iframeid.contentDocument.body.offsetHeight;
//                    }else if(iframeid.Document && iframeid.Document.body.scrollHeight){ 
//                            iframeid.height = iframeid.Document.body.scrollHeight;
//                            }
//                }
//            }
//        }

//设置iframe高度2
        
//        var oTime = null;
//        function resize()
//        {
//            if(oTime)
//            {
//                clearTimeout(oTime);
//            }
//            
//            oTime = setTimeout(reset, 200);
//        }
//        
//        function reset()
//        {
//            var frame = document.getElementById("commentFrame");
//            var outHeight = frame.offsetHeight;
//            var inHeight = frame.contentWindow.document.body.scrollHeight;
//            if(outHeight != inHeight)
//            {
//                frame.style.height = (inHeight + 10) + "px";
//            }
//        }




    //搜索下拉框
    $(function(){
        $("#Jselectbox input").click(function(){
            $("#JselectItem").show();
            return false;
        })
        
         $("#JselectItem span").mouseover(function(){
            $("#JselectItem span").removeClass("hover");
            $(this).addClass("hover");   
          }).click(function(){
            $("#Jselectbox input").val($(this).text());
            //alert($(this).attr("title"));
           $("#ctl00_Header_Hsearch").val($(this).attr("title"));
            $("#JselectItem").hide();
          })
          
          $(document).click(function(){
            $("#JselectItem").hide();
          })
    })
    
    
    
    function  search(){   
  
      window.location.href="http://games.fangte.com/aspx/search.aspx?type="+ $("#ctl00_Header_Hsearch").val()+"&key="+$("#searchText").val();
    }
