function trim(inputString) 
{  
	if (typeof inputString != "string") 
	{
		return inputString;
	}
	
	var retValue = inputString;
	var ch = retValue.substring(0, 1);
	
	while (ch == " ")
	{
		retValue = retValue.substring(1, retValue.length);
		ch = retValue.substring(0, 1);
	}
	
	ch = retValue.substring(retValue.length-1, retValue.length);
	
	while (ch == " ")
	{
		retValue = retValue.substring(0, retValue.length-1);
		ch = retValue.substring(retValue.length-1, retValue.length);
	}
	
	while (retValue.indexOf("  ") != -1)
	{
		retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
	}
	
	return retValue;
}

function GoTo(url)
{
	document.location.href = url;
}


function popUp(theUrl,theHeight,theWidth) 
{
	var newWin;
	newWin = window.open(theUrl,"campus_book_win","status=no,height="+theHeight+",width="+theWidth+",scrollbars=yes,resizable=yes,toolbar=no");
}

function button_on(imgname)
{
	document.images[imgname].src = "/images/buttons/" + imgname + "_on.gif";
}

function button_off(imgname)
{
	document.images[imgname].src = "/images/buttons/" + imgname + "_off.gif";
}

