// Retrieves the text from the search field and inserts a "+" in place of a space
function wordsplit(items) 
{
	var charect = "";

	for (var n = 1 ; n <= items.length ; n++) 
	{
		if (items.substring(n-1,n) == " ") 
		{
			charect+="+";
		}
		else 
		{
			charect+=items.substring(n-1,n);
		}
	}
	return charect;
}

// Creates a the URL that the user will be sent to for Pop Music
function searchPop()
{
	var keywords=document.searching.query.value+"&section=All"; 
	var search1;

	key=wordsplit(keywords); 

	if(document.searching.prms)
	{
		search1= document.searching.prms.value; 
		search1+=key;
		wind=window.open(search1);
	}
}

// Creates a the URL that the user will be sent to for Classical Music
function searchClass()
{
	var keywords=document.searching1.query1.value+"&section=All"; 
	var search1;

	key=wordsplit(keywords); 

	if(document.searching1.prms1)
	{
		search1= document.searching1.prms1.value; 
		search1+=key;
		wind=window.open(search1);
	}
}

// Creates a the URL that the user will be sent to for Movies
function searchMov()
{
	var keywords=document.searching2.query2.value+"&section=All"; 
	var search1;

	key=wordsplit(keywords); 

	if(document.searching2.prms2)
	{
		search1= document.searching2.prms2.value; 
		search1+=key;
		wind=window.open(search1);
	}
}
