
var subSourceTypes = new Array();

//NEWSPAPER
subSourceNewspaper = new Array('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',' Record-Review',' Rivertowns Enterprise',' Scarsdale Inquirer',' Star Ledger',' Wall Street Journal',' Westchester Journal News');

//TV
subSourceTv = new Array('ABC',' CBS',' CNN',' Fox',' Fox News',' Inside Edition',' MSNBC',' NBC',' NY1',' TV One');

//INTERNET
subSourceInternet = new Array('Adoption.com',' Adoptivefamilies.com',' Bing',' Google.com',' Lohud.com',' MSN.com',' Patch.com',' Yahoo.com');

//OTHER/NETWORK AGENCY
subSourceOther = new Array('Adopt International (CA)',' Adoption Alliance (CO)',' Adoption & Counseling Service',' Adoption of Babies and Children',' Adoptions Together (MD & VA)',' Baker Victory Services',' Bal Jagat Childrens World (CA)',' Bethany Christian Services',' Catholic Charities of Harrisburg',' Catholic Family Center (NY)',' Childrens Aid Society',' Childrens 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 Childrens Center',' Jewish Family and Childrens 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
subSourceMagazine = new Array('Adoptive Families',' Black Enterprise',' Newsday Parents and Children',' Newsweek');

//TRANSIT AD/BILLBOARD
subSourceBillboard = new Array('Billboard',' MTA Bus Ad',' LI Bus Ad');

//RADIO
subSourceRadio = new Array('92.3 NOW',' FRESH',' 102.7',' KISS FM',' KJOY',' KTU',' La Mega',' LITE-FM',' NPR',' POWER105',' WALK FM',' WBLS 107.5',' WLIB');



function loadRefSubSource(documentID, documentSubTypeID ){

	//get rid of all previous selects 
	document.getElementById(documentSubTypeID).options.length = 0;
	
 
    //populate fields
    if(document.getElementById(documentID).value.toUpperCase() == " NEWSPAPER"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceNewspaper.length;i++){
            
            var subsource_text = subSourceNewspaper[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
            
        }
    }else if(document.getElementById(documentID).value.toUpperCase() == " TV"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceTv.length;i++){
            
            var subsource_text = subSourceTv[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
            
        }
    }else if(document.getElementById(documentID).value.toUpperCase() == " INTERNET"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceInternet.length;i++){
            
            var subsource_text = subSourceInternet[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
            
        }
    }else if(document.getElementById(documentID).value.toUpperCase() == " OTHER/NETWORK AGENCY"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceOther.length;i++){
            
            var subsource_text = subSourceOther[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
            
        }
    }else if(document.getElementById(documentID).value.toUpperCase() == " MAGAZINE"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceMagazine.length;i++){
            
            var subsource_text = subSourceMagazine[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
            
        }   
    }else if(document.getElementById(documentID).value.toUpperCase() == " TRANSIT AD/BILLBOARD"){
        document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceBillboard.length;i++){
            
            var subsource_text = subSourceBillboard[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
           
        }
    }else if(document.getElementById(documentID).value.toUpperCase() == " RADIO"){
       document.getElementById(documentSubTypeID).options[0] = new Option('Select','');
        for(var i = 0; i < subSourceRadio.length;i++){
            
            var subsource_text = subSourceRadio[i];
            document.getElementById(documentSubTypeID).options[i+1] = new Option(subsource_text,subsource_text);
       
            changeStyle('subsource','show_me');
            document.getElementById(documentSubTypeID).disabled=false;
        
        } 
    }else{
    	changeStyle('subsource','hide_me');
        document.getElementById(documentSubTypeID).options[0] = new Option("---None---", "");
    }
    
}
 
