window.onload=onloadwnl;
var year,month,day ;
function onloadwnl(){
	if(par()){
		var birth = par().split('|');
		if(birth[0]&&birth[1]&&birth[2]) {
			if(birth[0]<=2025&&birth[0]>1901) {
			   year = birth[0] ;
			}
			else{
				year = 2010 ;
			}
			if(birth[1]<=12&&birth[1]>0) {
			   month =  birth[1] ;
			   if(month<10) {
				  month = month.replace('0','') ;   
			   }
			}
			else{
			   month =1 ;	
			}
			if(birth[2]<32&&birth[2]>0) {
				day =  birth[2] ;
			}
			else{
				day = '01' ;	
			}
			day = day.replace(/\b(0+)/gi,"");
			selectValue("js_year",year);
			selectValue("js_Month",month);
			pageYear = year;
			pageMonth = month;
			pageDay = day;
			Display(); 
			initSelect();
			nl_move(year , month , day);
		}
	}
}

//½ÓÊÜ²ÎÊý
function par(){
	var pos,str,para,parastr,tempstr1;
	tempstr="";
	str = window.location.href;
	pos = str.indexOf("?")
	parastr = str.substring(pos+1);
	if (pos>0){
	   return parastr;
	}
	else
	{
	  return false;
	}
	if (str.indexOf("&")>0){
		 para = parastr.split("&");
		 for(i=0;i<para.length;i++)
		 {
			 tempstr1 = para[i];
			 pos = tempstr1.indexOf("=");
		 }
   }
}

function   get_week(year,month,day) 
{ 
      var   tmpdate   =   new   Date(year,month-1,day); 
      return tmpdate.getDay(); 
      
    
} 