	var arr_url = window.location.toString().split( '/' );
	var tld = arr_url[3];
	var second_tld = arr_url[4];

	var current_topic_id = null;

	var arr_tlds = Array(
			{ id: 1026100523, tld: 'aboutscc' }
		,	{ id: 1253944231, tld: 'policies-procedures' }
		,	{ id: 1501834748, tld: 'athletics' }
		,	{ id: 1191426936, tld: 'ofb' }
		,	{ id: 2004508437, tld: 'adulted' }
		,	{ id: 1757973867, tld: 'communityeducation' }
		,	{ id: 1871130480, tld: 'langinst' }
		,	{ id: 2036555114, tld: 'english' }
		,	{ id: 936871171, tld: 'artssciences' }
		,	{ id: 1862884485, tld: 'math' }
		,	{ id: 1032130687, tld: 'automotive' }
		,	{ id: 585454483, tld: 'businessadmin' }
		,	{ id: 993214193, tld: 'economics' }
		,	{ id: 1388611654, tld: 'e-business' }
		,	{ id: 1844381237, tld: 'legalassist' }
		,	{ id: 121779383, tld: 'legalsecretary' }
		,	{ id: 833680985, tld: 'constrution' }
		,	{ id: 129396336, tld: 'childcare' }
		,	{ id: 657063833, tld: 'healthcare' }
		,	{ id: 302061361, tld: 'it' }
		,	{ id: 1219595278, tld: 'science' }
		,	{ id: 1370671193, tld: 'publicsafety' }
		,	{ id: 1224376017, tld: 'socialscience' }
		,	{ id: 1709902855, tld: 'dl' }
		,	{ id: 1834167190, tld: 'foundation' }
		,	{ id: 1008408446, tld: 'hr' }
		,	{ id: 2063936697, tld: 'library' }
		,	{ id: 743306354, tld: 'catalog' }
		,	{ id: 298638948, tld: 'planet' }
		,	{ id: 816310832, tld: 'sccorp' }
		,	{ id: 2071173444, tld: 'studentservices' }
		,	{ id: 599131124, tld: 'admissions' }
		,	{ id: 59316262, tld: 'testing' }
		,	{ id: 176724716, tld: 'careers' }
		,	{ id: 1090867942, tld: 'crop' }
		,	{ id: 1338795563, tld: 'counseling' }
		,	{ id: 1248243797, tld: 'dss' }
		,	{ id: 1768799073, tld: 'financialaid' }
		,	{ id: 916999617, tld: 'international' }
		,	{ id: 1285033379, tld: 'registrar' }
		,	{ id: 1722504098, tld: 'techprep' } );

	var arr_second_tlds = Array(
			{ id: 1494088254, tld: 'baseball' }
		,	{ id: 1517025226, tld: 'mbasketball' }
		,	{ id: 718845031, tld: 'wbasketball' }
		,	{ id: 849715164, tld: 'softball' }
		,	{ id: 175009919, tld: 'art' }
		,	{ id: 130228656, tld: 'music' }
		,	{ id: 452131900, tld: 'theatre' } )

	for( var i = 0; i < arr_second_tlds.length; i++ )
	{
		if( second_tld == arr_second_tlds[i].tld )
		{
			window.onload = AddSiteSearch;
			current_topic_id = arr_second_tlds[i].id;
			break;
		}
	}

	if( !current_topic_id )
	{
		for( var i = 0; i < arr_tlds.length; i++ )
		{
			if( tld == arr_tlds[i].tld )
			{
				window.onload = AddSiteSearch;
				current_topic_id = arr_tlds[i].id;
				break;
			}
		}
	}

	function do_search()
	{
		var f = document.getElementById( 'frmSearch' );
		var td = f.R1[0].parentNode;
		var child = td.firstChild;

		do
		{
			if( child.nodeName.toLowerCase() == 'input' && child.type == 'radio' && child.checked == true )
			{
				var label = child.nextSibling.nodeValue.replace( /\s+/g, '' );
				switch( label )
				{
					case 'thissite':
						var u = "http://www2.scc-fl.edu:8765/query.html?qt=" + f.T1.value + "&ct=" + current_topic_id;
						break;
					case 'directory':
						var u = "http://www.scc-fl.edu/aboutscc/employeedir.php4?LastName=" + f.T1.value;
						break;
					case 'Website':
					default:
						var u = "http://www2.scc-fl.edu:8765/query.html?qt=" + f.T1.value;
						break;
				}
			}
		} while( child = child.nextSibling );

		if( u )
			window.location = u;
		return false;
	}

	if (document.images)
	{
		var searchOff = new Image(); // inactive image
		searchOff.src= "/media/images/search1.gif";

		var searchOn = new Image(); // active image
		searchOn.src= "/media/images/search2.gif";
	}

	function roll(imagename,objectsrc)
	{
		if (document.images)
			document.images[imagename].src=eval(objectsrc+".src")
	}

  function AddSiteSearch()
  {
	  var td = document.getElementById( 'frmSearch' ).R1[0].parentNode;
	  var child = td.firstChild;

	  do
	  {
		  if( child.nodeName == '#text' && child.nodeValue.replace( /\s+/g, '' ) == 'Website' )
			  break;
	  } while( child = child.nextSibling );

	  var txt = document.createTextNode( 'this site' );
	  txt = td.insertBefore( txt, child.nextSibling );

	  var input = document.createElement( 'input' );
	  input.type = 'radio';
	  input.value = 'V1';
	  input.name = 'R1';
	  input.className = 'teal';
	  input.style.background = 'transparent';
	  input = td.insertBefore( input, txt );

	  if( document.getElementsByName( 'R1' ).length != 3 )
	  {
		  td.removeChild( input );
		  input = document.createElement( '<input type="radio" name="R1" value="V1" class="teal" style="background:transparent;" />' );
		  input = td.insertBefore( input, txt );
	  }

  }