/*---------------菜单面板-----------------------------*/
/*--------------------------------------------*/
function show(c_Str,v)
{    
   	if($("#"+c_Str+":visible").length==0)
	{
	    $("#"+c_Str).show(1000); 
	    $("#img"+v).removeAttr("src").attr("src","images/icng_on.gif");
		setCookie2(c_Str,"open");
	}
	else
	{
	     $("#"+c_Str).hide(1000);
	     $("#img"+v).removeAttr("src").attr("src","images/icng_off.gif");
		setCookie2(c_Str,"close");
     }  
}
function showState(c_Str,v,state)
{
    if (state == 'open') {
	    $("#"+c_Str).show(1000); 
	    $("#img"+v).removeAttr("src").attr("src","images/icng_on.gif");
    }
    else if (state == 'close') {
	     $("#"+c_Str).hide(1000);
	     $("#img"+v).removeAttr("src").attr("src","images/icng_off.gif");
    }
    else { }
}
/*----------------内容BOX----------------------------*/
/*--------------------------------------------*/
function Ctshow(c_Str, v) {
    if ($("#"+c_Str+":visible").length==0) {
	    $("#"+c_Str).slideToggle("slow"); 
	    $("#Ctimg"+v).removeAttr("src").attr("src","images/icng_on.gif");
    //    setCookie2(c_Str, "open");
    }
    else {
	     $("#"+c_Str).hide(1000);
	     $("#Ctimg"+v).removeAttr("src").attr("src","images/icng_off.gif"); 
    //   setCookie2(c_Str, "close");
    }
}
function CtshowState(c_Str, v, state) {
    if (state == 'open') {
	    $("#"+c_Str).show(1000); 
	    $("#img"+v).removeAttr("src").attr("src","images/icng_on.gif");
    }
    else if (state == 'close') {
	     $("#"+c_Str).hide(1000);
	     $("#Ctimg"+v).removeAttr("src").attr("src","images/icng_off.gif");
    }
    else { }
}

//==================================================
function setCookie2(name,value)
{
    var Days = 30;
    var exp  = new Date();    //new Date("December 31, 9998");
        exp.setTime(exp.getTime() + Days*24*60*60*1000);
        document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getCookie2(name)
{
    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
        if(arr=document.cookie.match(reg)) return unescape(arr[2]);
        else return null;
    }
