//首页车险导航
function settab(name,cursel,n){
	if(name=='two'){
		mouseover=cursel;
	}
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"fami_payment_curtit":"fami_payment_tit";
con.style.display=i==cursel?"block":"none";
}
}
//获取理赔列表
var lpc=9
function LMYCC() {
var lbmc;
//var treePic;
    for (i=1;i<=lpc;i++) {
        lbmc = eval('LM' + i);
        //treePic = eval('treePic'+i);
        //treePic.src = 'image/file.gif';
        lbmc.style.display = 'none';
    }
}
 
function Biz_LP(i) {
    lbmc = eval('LM' + i);
    //treePic = eval('treePic' + i)
    if (lbmc.style.display == 'none') {
        LMYCC();
        //treePic.src = 'image/nofile.gif';
        lbmc.style.display = '';
    }
    else {
        //treePic.src = 'image/file.gif';
        lbmc.style.display = 'none';
    }
}
/*会员中心，点击汽车保险展开
function display_car(){
 if(document.getElementById("member_car").style.display=='none'){
  document.getElementById("member_car").style.display=''
 }
 else{
 document.getElementById("member_car").style.display="none"
 }
}*/
 
//树形菜单
function treeNav(name,current,total){
for(i=1;i<=total;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById(name+"_"+i);
con.style.display=i==current?"block":"none";
//menu.style.color=i==current?"#ff6600":"#666666";
}
}
function helpTree(name,current,total){
for(i=1;i<=total;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById(name+"_"+i);
menu.style.color=i==current?"#993300":"#666666";
con.style.display=i==current?"block":"none";
}
}
/***********************日期格式转换*******************************/
/*
 * 日期转换
 */
	
function stringToDate(_strDate)
	{
		if ( _strDate.length < 8 )
		{
			return null ;
		}
		if (_strDate != '') {
			return new Date(Date.parse(_strDate.replace(/-/g,"/")));   
		}
		return null;
	} 
	
function stringToDateUTC(_strDate)
	{
		if (_strDate == '') return null;
		return Date.parse(_strDate.replace(/-/g,"/"));
	}
	
function DateToUTC(_Date)
	{
		if ( _Date != null )
		{
			var _k = new Date();
			_k = _Date;
			return Date.UTC(_k.getYear(),_k.getMonth(),_k.getDate(),_k.getHours(),_k.getSeconds(),_k.getMinutes());
		}
		return null ;
	}
	
function DateToString(_Date)
	{
		var _now = new Date();
		_now = _Date ;
		var _b = _now.getFullYear().toString() + '-' + (_now.getMonth()>= 9 ? '':'0') + (_now.getMonth()+1).toString() + '-' + (_now.getDate()>=10 ? '':'0') + _now.getDate().toString();
		if (_b.length == 8)
			_b = '19' + _b;
		return _b ;
	}
	
function DateToFullString(_Date)
	{
		var _now = new Date();		
		_now = _Date ;
		var _b = _now.getFullYear().toString()+ (_now.getMonth()>= 9 ? '':'0') + (_now.getMonth()+1).toString()  + (_now.getDate()>=10 ? '':'0') + _now.getDate().toString();
		_b+=_now.getHours().toString()+_now.getMinutes().toString()+_now.getSeconds()+Math.floor((_now.getMonth()+3)/3).toString()+_now.getMilliseconds().toString();
		return _b ;
	}
	
function UTCToString(_utc)
	{
		var _date = new Date(_utc);
		return this.DateToString(_date);
	}
	
function StringToDateType(DateStr)   //转换为java BO对象对应的日期类型
   {         
	if(DateStr==null||DateStr=='') return null;
     var _k = new Object(); 
     	_k.javaClass="java.util.Date";
		_k.time = Date.parse(DateStr.replace(/-/g,"/"));
		return _k ;
   }
	
function DateToDateType( _date )
	{
		var _k = new Object(); 
     	_k.javaClass="java.util.Date";
		_k.time = this.DateToUTC(_date);
		return _k ;
	}
	
function DateTypeToString(_date)
	{
		if (_date == null) return '';
		if (_date.time == null) return '';
		return this.UTCToString(_date.time);
		
	}
/***********************日期格式转换*********************************/
function morecomment(){
var id=Scar.getPar("id");
window.open("/CommentByOne?id="+id);
}	
