var subSourceTypes = new Array();
//NEWSPAPER
subSourceTypes[0] = new Array('Select','Amsterdam News','Caribbean Life','Catholic Advocate','New York Daily News','Hoy','Love Express','Matters magazine','New York Times','New York Beacon','Newsday','New York Post','Star Ledger','Wall Street Journal','Westchester Journal News');
//TV/RADIO
subSourceTypes[1] = new Array('Select','92.3 NOW','ABC','CBS','CNN','Fox','Fox News','FRESH 102.7','HOT97','KISS FM','KJOY','La Mega','MSNBC','NBC','NPR','NY1','POWER105','TV One', 'WALK FM','WBLS 107.5','WLIB','WLIW','Z100');
//INTERNET
subSourceTypes[2] = new Array('Select','Spence-Chapin.org','Adoption.com','Adoptivefamilies.com','Google.com','MSN.com','Yahoo.com');
//OTHER/NETWORK AGENCY
subSourceTypes[3] = new Array('Select','Adopt International (CA)','Adoption Alliance (CO)','Adoption & Counseling Service','Adoption of Babies and Children','Adoptions Together (MD & VA)','Baker Victory Services','Bal Jagat Children\'s World (CA)','Bethany Christian Services','Catholic Charities of Harrisburg','Catholic Family Center (NY)','Children\'s Aid Society','Children\'s Home Society of Washington','The Cradle','Community Maternity Service','Family Adoption Consultants (MI & OH)','Family Connections Christian Adoptions','The Family Network, Inc.','Family Resources, Inc.','Hawaii International Child','Hillside Children\'s Center','Jewish Family and Children\'s Service of Greater Boston/ Adoption Resources','Jewish Family Service Metrowest/ Adoption Options','Jewish Family Service/Adoption Alliance of San Diego','Jewish Family Service of Buffalo and Erie County','Jewish Family Service of Central Maryland/Adoption Alliances','Jewish Family Service of New Haven','Jewish Family Service of the Northshore/ Adoption and Aid International','Jewish Family Service of Rochester, Inc.','Lifelink Center for Child and Family Services','Lutheran Social Services of The National Capital Area','Lutheran Social Services of the Northeast (MA)','Lutheran Social Services of the South (TX)','Vista Del Mar (CA)','Wide Horizons for Children, Inc.','None of the above/Other');  
//MAGAZINE
subSourceTypes[4] = new Array("Select","Adoptive Families","Black Enterprise","Newday's Parents & Children");
//TRANSIT AD/BILLBOARD
subSourceTypes[5] = new Array("Select","Billboard","MTA Bus Ad","LI Bus Ad");




function loadRefSubSource(documentID, documentSubTypeID ){
		
	  var i ;
	   while(document.getElementById(documentSubTypeID).length > 0){
		     document.getElementById(documentSubTypeID).options[i] = null;
             document.getElementById(documentSubTypeID).length = document.getElementById(documentSubTypeID).length    -1;
			} //end of while(document.getElementById(documentSubTypeID).length > 0){
		
		if (document.getElementById(documentID).value.toUpperCase() == "NEWSPAPER" || 
			document.getElementById(documentID).value.toUpperCase() == "TV/RADIO" || 
			document.getElementById(documentID).value.toUpperCase() == "INTERNET" || 
			document.getElementById(documentID).value.toUpperCase() == "MAGAZINE" || 
			document.getElementById(documentID).value.toUpperCase() == "TRANSIT AD/BILLBOARD") {
				if(document.getElementById(documentSubTypeID).disabled){
					document.getElementById(documentSubTypeID).disabled=false;
				}
				for(i=0;i<subSourceTypes[document.getElementById(documentID).options[document.getElementById(documentID).selectedIndex].title].length;i++){
							subsource_text = subSourceTypes[document.getElementById(documentID).options[document.getElementById(documentID).selectedIndex].title][i];
							if (subsource_text == "Select") subsource_value = "";
							else subsource_value = subsource_text;
                            document.getElementById(documentSubTypeID).options[i] = new Option(subsource_text,subsource_value);
						}
				changeStyle('subsource','show_me');
			}
		else{
			document.getElementById(documentSubTypeID).disabled=true;
			document.getElementById(documentSubTypeID).options[0] = new Option("---None---", "" );
			changeStyle('subsource','hide_me');
			}

 }//end of function - loadDocumentCaseTypes()