presentUrl = document.location;
urlString = presentUrl.toString();
docRoot = ''
urlString.indexOf('stage.cbs.cbsig.net')>=0?docRoot='':urlString.indexOf('stager.cbsig.net')>=0?docRoot='':urlString.indexOf('stage.ad.cbsig.net')>=0?docRoot='':docRoot='http://www.cbs.com';

shows = new Array();
shows['CBS.com Home Page'] = docRoot+"/";
shows['CBS Site Map'] = "http://www.cbs.com/info/sitemap.php";
shows['CBS Schedule'] = docRoot+ "/info/schedule/index.php";
shows['CBS Video'] = docRoot+ "/video/";

shows['PRIMETIME'] = "";
shows['48 Hours Mystery'] = "http://www.cbs.com/primetime/48_hours/";
shows['60 Minutes'] = "http://www.cbs.com/primetime/60_minutes/";
shows['Accidentally on Purpose'] = "http://www.cbs.com/primetime/accidentally_on_purpose/";
shows['The Amazing Race'] = "http://www.cbs.com/primetime/amazing_race/";
shows['Arranged Marriage'] = docRoot+"/primetime/arranged_marriage/";
shows['The Big Bang Theory'] = "http://www.cbs.com/primetime/big_bang_theory/";
shows['Big Brother'] = "http://www.cbs.com/primetime/big_brother/";
shows['Cold Case'] = docRoot+"/primetime/cold_case/";
shows['Criminal Minds'] = docRoot+"/primetime/criminal_minds/";
shows['CSI: Crime Scene Investigation'] = docRoot+"/primetime/csi/";
shows['CSI: Miami'] = docRoot+"/primetime/csi_miami/";
shows['CSI: NY'] =  docRoot+"/primetime/csi_ny/";
shows['Flashpoint'] = "http://www.cbs.com/primetime/flashpoint/";
shows['Gary Unmarried'] =  docRoot+"/primetime/project_gary/";
shows['Ghost Whisperer'] = docRoot+"/primetime/ghost_whisperer/";
shows['The Good Wife'] = docRoot+"/primetime/the_good_wife/";
shows['Harper\'s Island'] = docRoot+"/primetime/harpers_island/";
shows['How I Met Your Mother'] = "/primetime/how_i_met_your_mother/";
shows['Medium'] = docRoot+"/primetime/medium/";
shows['The Mentalist'] = docRoot+"/primetime/the_mentalist/";
shows['NCIS'] = docRoot+"/primetime/ncis/";
shows['NCIS: Los Angeles'] = docRoot+"/primetime/ncis_los_angeles/";
shows['New Advs. of Old Christine'] = docRoot+"/primetime/old_christine/";
shows['Numb3rs'] = docRoot+"/primetime/numb3rs/";
shows['Rules of Engagement']= docRoot+"/primetime/rules_of_engagement/";
shows['Survivor'] = docRoot+"/primetime/survivor/";
shows['There Goes the Neighborhood'] = docRoot+"/primetime/there_goes_the_neighborhood/";
shows['Three Rivers'] = docRoot+"/primetime/three_rivers/";
shows['Two and a Half Men'] = docRoot+"/primetime/two_and_a_half_men/";
shows['Undercover Boss'] = docRoot+"/primetime/undercover_boss/";

shows['LATENIGHT'] = ""; 
shows['Late Show with David Letterman'] = docRoot+"/late_night/late_show/";
shows['The Late Late Show with Craig Ferguson'] = docRoot+"/late_late_show/";

shows['DAYTIME'] = "";
shows['As the World Turns'] = docRoot+"/daytime/as_the_world_turns/";
shows['The Bold and the Beautiful'] = docRoot+"/daytime/the_bold_and_the_beautiful/";
shows['Daytime Home Page'] = docRoot+"/daytime/";
shows['Let\'s Make a Deal'] = docRoot+"/daytime/lets_make_a_deal/";
shows['The Price Is Right'] = docRoot+"/daytime/the_price_is_right/";
shows['The Young and the Restless'] = docRoot+"/daytime/the_young_and_the_restless/";

shows['CLASSICS'] = "";
shows['Beverly Hills 90210'] = docRoot+"/classics/beverly_hills_90210/";
shows['Dynasty'] = docRoot+"/classics/dynasty/";
shows['Family Ties'] = docRoot+"/classics/family_ties/";
shows['Have Gun - Will Travel'] = docRoot+"/classics/have_gun_will_travel/";
shows['Hawaii Five-0'] = docRoot+"/classics/hawaii_five_0/";
shows['Jericho'] = docRoot+"/primetime/jericho/";
shows['The Love Boat'] = docRoot+"/classics/the_love_boat/";
shows['MacGyver'] = docRoot+"/classics/macgyver/";
shows['Melrose Place'] = docRoot+"/classics/melrose_place/";
shows['Perry Mason'] = docRoot+"/classics/perry_mason/";
shows['Star Trek'] = docRoot+"/classics/star_trek/";
shows['The Twilight Zone'] = docRoot+"/classics/the_twilight_zone/";
shows['Twin Peaks'] = docRoot+"/classics/twin_peaks/";

shows['NEWS'] = ""; 
shows['CBS Evening News'] = docRoot+"/cbs_evening_news/";
shows['The Early Show'] = docRoot+"/daytime/the_early_show";

function findersHTML( finder ) {
	var maxlength = 32; 			// one LESS than the longest allowable line (in chars)
/* edited by afa on 11/06/02 */
if(cbs.mac){maxlength = 23;}
/* edited by afa on 11/06/02 */
	var retval 	= '<SELECT'+ " class='showfinders'" +' NAME="' + finder + 'FINDER" onChange="locChange( this.options[this.selectedIndex].value, top )\">\n';
	retval 	       += '<OPTION SELECTED VALUE="">Choose a CBS ' + finder.charAt(0).toUpperCase() + finder.substring(1, finder.length).toLowerCase() + '</OPTION>\n';
	retval 	       += '<OPTION VALUE="">';
	for( var i=0; i<maxlength; i++ )
		retval += '-';
		retval += '</OPTION>\n';
	var sf 		= eval( finder + 's' );
	for( key in sf ) {
		var spacer 	= '';
		if( !sf[key] ) {
			retval += '<OPTION VALUE=""></OPTION>\n';
			spacer 	= '';
		}
		var start 	= 0;
		while( key.length-start > maxlength ) {
//			alert( key + " beginning at " + start )
			retval += '<OPTION VALUE="' + sf[key] + '">' + spacer + key.substring(start, key.lastIndexOf(' ', start+maxlength)) + '</OPTION>\n';
			start  = key.lastIndexOf(' ', start+maxlength);
//			alert( "start is now " + start );
			spacer 	= '&nbsp;&nbsp;';
		}
		retval 	       += '<OPTION VALUE="' + sf[key] + '">' + spacer + key.substring(start, key.length) + '</OPTION>\n';
	}
	retval 	       += '</SELECT>\n';
	return retval;
}

function locChange( newLoc, framey ) {
if( !framey ) framey = self;
if( newLoc ) framey.location = newLoc;
}
