function FillState(id){
		 $(id).State.options.length=0;
		 for(i=0;i<sStateArray[$(id).CountryCode.selectedIndex].split("|").length;i++){
		  $(id).State.options[i]=new Option(sStateArray[$(id).CountryCode.selectedIndex].split("|")[i]);
		  $(id).State.options[i].value = sStateArrayID[$(id).CountryCode.selectedIndex].split("|")[i];
		 }
 }
 function FillCountry(id){
	 $(id).CountryCode.options.length=0
	 for(i=0;i<sCountryString.split("|").length;i++){
	 	$(id).CountryCode.options[i]=new Option(sCountryString.split("|")[i]);
	 	$(id).CountryCode.options[i].value = sCountryCodes.split("|")[i];
	 }
 }


function FillHeardDetail(id){
	 $(id).heard_detail.options.length=0;
	 for(i=0;i<sHowHeardDetails[$(id).heard.selectedIndex].split("|").length;i++){
		 $(id).heard_detail.options[i]=new Option(sHowHeardDetails[$(id).heard.selectedIndex].split("|")[i]);
		 $(id).heard_detail.options[i].value=sHowHeardDetailsID[$(id).heard.selectedIndex].split("|")[i];
	 }
 }
 
 function GetHeardDetail(heardID, heardDetailID) {
	 
	var index=null;
	var heardIndex = 0;
	
	for(i=0;i<sHowHeardID.split("|").length;i++){
		 result=sHowHeardID.split("|")[i];
		 
		 if (result == heardID) {
		 	heardIndex= i;
		 }
	}
	
 	for(i=0;i<sHowHeardDetailsID[heardIndex].split("|").length;i++){
		 result=sHowHeardDetailsID[heardIndex].split("|")[i];
		 
		 if (result == heardDetailID) {
		 	index= i;
		 }
	}
	
	listDetails = sHowHeardDetails[heardIndex].split("|");
	detail="";
	if (index!=null) {
	 detail =listDetails[index];
	}
	return detail;
	
 }


 function FillHeard(id){
	 $(id).heard.options.length=0
	 for(i=0;i<sHowHeard.split("|").length;i++){
		 $(id).heard.options[i]=new Option(sHowHeard.split("|")[i]);
		 $(id).heard.options[i].value=sHowHeardID.split("|")[i];
	
	 }
 }
 
 function selectDate(id) {
 	new Calendar($(id));
 }