function gotosearch()
{
	var keys=$("#keyword").val();
	if(keys=="")return;
	window.location.href ="/site/search?keyword="+encodeURIComponent(keys);
}

function indexUrl()
{
	window.location.href ="/";
}



$(document).ready(function() {
	document.onkeydown=keyDown;

});

function   keyDown(e)   {

     var key;
     if(window.event)
     {
         key = window.event.keyCode;     //IE
    }
    else
     {
         key = e.which;     //firefox
         //alert(key);
     }
	

	try{
		if(other_condition(key))
		{

		}else if(key==13 && $("#showImgSrc").css("display")=="block")
		{
			changeSrc();
		}else if(key==13 && keyflag)
		{
			_outer(ket_object,1);
		}else if(key==13 && keyflag2)
		{
			_outer(ket_object2,2);
		}else if(key==13 && keyflag3)
		{
			_outer(ket_object3,3);
		}else if(key==13)
		{
			gotosearch();
		}else if(key== 27)
		{
			disablePopup2();
		}
	}catch(err)
	{
		if(key==13)
		{
			gotosearch();
		}else if(key== 27)
		{
			disablePopup2();
		}
	}

} 

//不同分辨率和浏览器下排版
$(document).ready(function() {
	var isIE=document.all? true:false;
	//alert(isIE);
	//alert(document.documentElement.clientWidth);
	if(isIE)
	{
		if(document.documentElement.clientWidth<1100)
		{
			$("#header2").css({"width":"280px"});
			$("#header3").css({"margin-left":"20px"});
		}
	}
	else
	{
		if(document.documentElement.clientWidth<1100)
		{
			$("#header2").css({"width":"280px"});
			$("#header3").css({"margin-left":"20px"});
		}
	}
})
	

//回调接口
function other_condition()
{
	return false;
}