function changeDiv(whichLayer, output){
	
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer);
style2.innerHTML=output;
}
else if (document.all)
{
var style2 = document.all[whichLayer];
style2.innerHTML=output;
}
else if (document.layers)
{
var style2 = document.layers[whichLayer];
style2.innerHTML=output;
}
}

function changeDescription(){
	
	var objDestination = window.document.quicksearchoa.searchmode; 
	var destination = objDestination.options[objDestination.selectedIndex].value;
	var whichLayer= 'description';
	
	
if(destination == 'base')
{

output='<a href="http://www.base-search.net/">Bielefeld Academic Search Engine</a> is a multi-disciplinary search engine for academically relevant web resources which was created and developed by Bielefeld University Library.  The search box above performs a simple keyword search; <a href="http://www.base-search.net/index.php?i=a">advanced search</a> is also available.';
changeDiv (whichLayer, output);

}
	
	if(destination == 'spectrum')
{
	
	output='<a href="http://spectrum.library.concordia.ca">Spectrum: Concordia University Research Repository</a> is Concordia university\'s open access institutional repository that centralizes access and preserves the research created at Concordia.  The search box above performs a simple keyword search; <a href="http://spectrum.library.concordia.ca/cgi/search/advanced">advanced search</a> is also available.';
changeDiv (whichLayer, output);

}	

if(destination == 'pubmedcentral')
{

output='<a href="http://www.pubmedcentral.nih.gov/">PubMed Central</a> is a free digital archive of <a href="http://www.pubmedcentral.nih.gov/fprender.fcgi?cmd=full_view">biomedical and life sciences journal literature</a> at the U.S. National Institutes of Health (NIH).  The search box above performs a keyword search; <a href="http://www.ncbi.nlm.nih.gov/sites/entrez?db=pmc">advanced search</a> is also available.';
changeDiv (whichLayer, output);

}

if(destination == 'oaister')
{

output='<a href="http://www.oaister.org">OAIster</a> is a union catalogue of digital resources (books and articles, born-digital texts, audio files, images, movies, datasets).  The search box above performs an Entire Record keyword search.  OAIster can also be searched by Title, Author/Creator, Subject, or language through its <a href="http://quod.lib.umich.edu/cgi/b/bib/bib-idx?c=oaister;page=simple">search page</a>.';
changeDiv (whichLayer, output);

}
if (destination == 'doaj')
{
output='<a href="http://www.doaj.org/">Directory of Open Access Journals</a> offers free, full text, quality controlled scientific and scholarly journals. There are now over <a href="http://www.doaj.org/doaj?func=findJournals">3600 journals</a> in the directory.  The search box above performs a phrase <a href="http://www.doaj.org/doaj?func=searchArticles">search for articles</a>.';
changeDiv (whichLayer, output);
}

if (destination == 'carl')
{
output='<a href="http://carl-abrc-oai.lib.sfu.ca/">Canadian Association of Research Libraries (CARL)</a> is the search service for the CARL Institutional Repositories Pilot Project and aggregates material from each of the participating Canadian institutions.';
changeDiv (whichLayer, output);
}
	
}


function quickoa(){
	var objDestination = window.document.quicksearchoa.searchmode; 
	var objSearchTerm = window.document.quicksearchoa.searchterms; 
	dosearchOA(objDestination, objSearchTerm);
}

function dosearchOA(objDestination, objSearchTerm){	
	roarURL='http://www.google.com/cse?cx=009118135948994945300%3Agvogitng0da&sa=Search&cof=FORID%3A0&q='
	doajURL='http://www.doaj.org/doaj?func=searchArticles&f1=all&b1=and&q2=&f2=all&q1=';
	
	oaisterURL='http://quod.lib.umich.edu/cgi/b/bib/bib-idx?type=boolean&size=10&rgn1=entire+record&rgn2=entire+record&rgn3=entire+record&c=oaister&sid=fd45b43991a76ed509aa50f42bfc5503&searchfield=Entire+Record&op2=And&searchfield=Entire+Record&q2=&op3=And&searchfield=Entire+Record&q3=&op6=And&rgn6=norm&restype=all+types&sort=weighted+hit+frequency&submit2=search&q1=';
	
	carlURL='http://carl-abrc-oai.lib.sfu.ca/index.php/search/results?query=';

	pubmedcentralURL='http://www.ncbi.nlm.nih.gov/sites/entrez?search=Find%20Articles&db=pmc&cmd=search&term=';
	
	spectrumURL='http://spectrum.library.concordia.ca/cgi/search/simple?&q=';
	
	BASEURL='http://www.base-search.net/index.php?lem=0&lem=1&thes=default&s=all&refid=dcbasen&q=';

	var searchterms = objSearchTerm.value;
	var destination = objDestination.options[objDestination.selectedIndex].value;
	
	if (destination=="spectrum"){
		
		if (searchterms!=''){
				searchURL=spectrumURL+searchterms;
			}
		else {searchURL='http://spectrum.library.concordia.ca/';}
	}
	if (destination=="base"){
		
		if (searchterms!=''){
				searchURL=BASEURL+searchterms;
			}
		else {searchURL='http://www.base-search.net';}
	}
	
	if (destination=="doaj"){
		
		if (searchterms!=''){
				searchURL=doajURL+searchterms;
			}
		else {searchURL='http://www.doaj.org/doaj?func=home';}
	}
	
	if (destination=="roar"){
		
		if (searchterms!=''){
				searchURL=roarURL+searchterms;
			}
		else {searchURL='http://www.google.com/coop/cse?cx=009118135948994945300%3Agvogitng0da';}
	}
	
	if (destination=="oaister"){
		
		if (searchterms!=''){
				searchURL=oaisterURL+searchterms;
			}
		else {searchURL='http://www.oaister.org/';}
	}
	
		if (destination=="carl"){
		
		if (searchterms!=''){
				searchURL=carlURL+searchterms;
			}
		else {searchURL='http://carl-abrc-oai.lib.sfu.ca/index.php/search';}
	}
	if (destination=="pubmedcentral"){
		
		if (searchterms!=''){
				searchURL=pubmedcentralURL+searchterms;
			}
		else {searchURL='http://www.pubmedcentral.nih.gov/';}
	}
	

if (searchURL!=''){
		window.location=searchURL;
	}

	
}



