//-----------------------------------------------------------------------//
function getYear(sDate)                                                  //
//-----------------------------------------------------------------------//
//          function name: getYear()                                     //
//             created by: Dustin Brown                                  //
//             created on: 2/20/2001                                     //
//                purpose: given a date ('sDate'), return the year       //
//                         portion of the date.                          //
//             parameters: sDate - the date from which the year will be  //
//                         extracted.                                    //
//                returns: the year portion of 'sDate'                   //
// include files required: none                                          //
//-----------------------------------------------------------------------//
{
	//find the position of the second delimiter(if it is there)
	var pos=-1
	for(var x=0;x<sDate.length;x++){
		if(isNaN(sDate.charAt(x)))pos=x+1;
	}
	
	//if no delimiter, 'sDate' must be 8 characters
	//if it is, set position variable
	if(pos==-1){
		if(sDate.length!=8)return "";
		pos=sDate.length-4;
	}
	
	//break apart 'sDate' and get the year
	sDate=sDate.substring(pos,sDate.length);
	
	//return the year
	return sDate;
}
//End function getYear()-------------------------------------------------//