
function onSearch(){
     var df = document.searchForm;
     var word=df.keyword.value;
     if(word=="" || word=="搜索" || word=="请输入关键字"){
        setSearchText("请输入关键字");
     return false;
     }
     df.searchContent.value=escape(word);
     return true;
 }
 
function setSearchText(word){
    var df = document.searchForm;
    df.keyword.value=word;
}

function setDefaultText(){
    var df = document.searchForm;
    if(df.keyword.value==""){
        setSearchText("搜索");
    }
}

function hideSearchFacade(){
	var sf = document.getElementById("searchFacade");
	var sw = document.getElementById("searchWraper");
	if(sf != null && sw != null){
		sf.style.display="none";
		sw.style.display="block";
	}
}

function hideSearchWraper(){
	var sf = document.getElementById("searchFacade");
	var sw = document.getElementById("searchWraper");
	if(sf != null && sw != null && document.searchForm.keyword.value == "搜索"){
		sf.style.display="block";
		sw.style.display="none";
	}
}
var childCreate=false;
function kingdeeLinkLoad(iDiv,link){
    iDiv.onmouseover=function(){//鼠标移到
     	
	    iDiv.style.background="url('/images/v2008.2/sys/bottom_kingdee_link_select_bg_over.gif')";
    }
    iDiv.onmouseout=function(){//鼠标移走
	    iDiv.style.background="url('/images/v2008.2/sys/bottom_kingdee_link_select_bg_out.gif')";
    }
    iDiv.onclick=function(){//鼠标点击
	    if (childCreate){
		    //判断当前的下拉是不是打开状态，如果是打开的就关闭掉。是关闭的就打开。
		    document.getElementById(link).style.display="none";
		    childCreate=false;
	    }else{
		    document.getElementById(link).style.display="block";
		    childCreate=true;
	    }
    }
    document.onmousedown=function(e){
        var div=document.getElementById(link);
        if(childCreate && isMouseOut(div,e)){
            div.style.display="none";
	        childCreate=false;
	    }
    }
    var div=document.getElementById(link);
    div.onclick=function(){
        div.style.display="none";
        childCreate=false;
    }
}

