﻿
var listInDivId="leftList";//左菜单式分类列表所在的层id
var positionInfoInDivId="youarehere";//当前选中项的位置信息所在的层id
var contentInfoInDivId="contentDiv";
//选中项
function reqDocsOfSort(currentSelectId)
{
    //debugger;
    selecOne(listInDivId,currentSelectId);//选中项,显示选中态
    showPositionInfo(positionInfoInDivId,currentSelectId);//当前选中项的位置信息
    if(currentSelectId=="81ba96c4b9a44089ad4c6e6927395939")
    {
        //showJobTmp(contentInfoInDivId,currentSelectId);
        showPageInfo(contentInfoInDivId,currentSelectId);//当前选中项的内容信息
    }
    else
    {
        showContentInfo(contentInfoInDivId,currentSelectId);//当前选中项的内容信息
    }
}

function showJobTmp(inDivId,currentSelectId)
{
    var paramStr1='&sguid='+currentSelectId;
    JQueryAjaxReq(inDivId,'hr_Action','getHR_JobTmp','doclist',inDivId,paramStr1);
}

function showPageInfo(inDivId,currentSelectId)
{
    //获得所在位置
    var UrlStr="&pcurrent=1&pageSize=5&showDivId=contentDiv&sguidKey="+currentSelectId+"&ASveSortMgrCfg1&ASvePageTplCfg1";
    JQueryAjaxReq(inDivId,'hr_Action','GetPageDocListDemo','hr_Action',inDivId,UrlStr);
}

//选中项,显示选中态
function selecOne(listInDivId,currentSelectId)
{
    var sguid = currentSelectId;  
    var classV="current"; 
    if(sguid!=""||sguid!=null)
    {
        $("#"+listInDivId).children().each(function(){
            var tmpid=$(this).attr("id")
            if(tmpid==sguid)
            {
                $(this).removeClass("menuulli");
                $(this).removeClass("menuulliahover");
                $(this).addClass(classV);
            }
            else
            {
                $(this).removeClass(classV);
                $(this).addClass("menuulli");
            }
        });
    }
}

//当前选中项的位置信息
function showPositionInfo(inDivId,currentSelectId)
{
    //获得所在位置
    var paramStr1='&sguid='+currentSelectId;
    JQueryAjaxReq(inDivId,'hr_Action','GetPositionInfo','doclist',inDivId,paramStr1);
}

//当前选中项的内容信息
function showContentInfo(inDivId,currentSelectId)
{
    //当前选中项的内容信息
    var paramStr1='&sguid='+currentSelectId;
    JQueryAjaxReq(inDivId,'hr_Action','GetContentInfo','doclist',inDivId,paramStr1);
}

//当前选中第一项分类
function selecFirst()
{
//debugger;
    //得到url参数方法
    var sguid = QueryString('sguid');  
    var classV="current"; 
    if(sguid==""||sguid==null)
    {
        var childFirs=$("#"+listInDivId).children()[0];
        sguid=$(childFirs).attr("id")
    }
    reqDocsOfSort(sguid);
}
var tmpCalssNameStr="";
function mover(theLi)
{
//debugger;
    //得到url参数方法
    if(theLi.className!="current")
    {
        tmpCalssNameStr=theLi.className;
        theLi.className="menuulliahover"; 
    }
}

function mout(theLi)
{
//debugger;
    if(theLi.className!="current")
    {
    theLi.className=tmpCalssNameStr;
    }
}


