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 Homepage'] = docRoot+"/";
shows['CBS Video'] = docRoot+ "/video/";
shows['CBS Schedule'] = docRoot+ "/info/schedule/index.php";
shows['CBS Site Map'] = "http://www.cbs.com/info/sitemap.php";

shows['PRIMETIME'] = "";
shows['$#*! My Dad Says'] = docRoot+"/primetime/my_dad_says/";
shows['48 Hours Mystery'] = "http://www.cbs.com/primetime/48_hours/";
shows['60 Minutes'] = "http://www.cbs.com/primetime/60_minutes/";
shows['The Amazing Race'] = "http://www.cbs.com/primetime/amazing_race/";
shows['The Big Bang Theory'] = "http://www.cbs.com/primetime/big_bang_theory/";
shows['Big Brother'] = "http://www.cbs.com/primetime/big_brother/";
shows['Blue Bloods'] = docRoot+"/primetime/blue_bloods/";
shows['CHAOS'] = docRoot+"/primetime/chaos/";
shows['Criminal Minds'] = docRoot+"/primetime/criminal_minds/";
shows['Criminal Minds: Suspect Behavior'] = docRoot+"/primetime/criminal_minds_suspect_behavior/";
shows['CSI: Crime Scene Investigation'] = docRoot+"/primetime/csi/";
shows['CSI: Miami'] = docRoot+"/primetime/csi_miami/";
shows['CSI: NY'] =  docRoot+"/primetime/csi_ny/";
shows['The Defenders'] = docRoot+"/primetime/the_defenders/";
shows['Flashpoint'] = "http://www.cbs.com/primetime/flashpoint/";
shows['The Good Wife'] = docRoot+"/primetime/the_good_wife/";
shows['Hawaii Five-0'] = "http://www.cbs.com/primetime/hawaii_five_o/";
shows['How I Met Your Mother'] = "/primetime/how_i_met_your_mother/";
shows['Mad Love'] = docRoot+"/primetime/mad_love/";
shows['The Mentalist'] = docRoot+"/primetime/the_mentalist/";
shows['Mike & Molly'] = docRoot+"/primetime/mike_and_molly/";
shows['NCIS'] = docRoot+"/primetime/ncis/";
shows['NCIS: Los Angeles'] = docRoot+"/primetime/ncis_los_angeles/";
shows['Rules of Engagement']= docRoot+"/primetime/rules_of_engagement/";
shows['SURVIVOR'] = docRoot+"/primetime/survivor/";
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['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 Talk'] = docRoot+"/daytime/the_talk/";
shows['The Young and the Restless'] = docRoot+"/daytime/the_young_and_the_restless/";

shows['CLASSICS'] = "";
shows['Beverly Hills 90210'] = docRoot+"/classics/beverly_hills_90210/video/";
shows['The Brady Bunch'] = docRoot+"/classics/the_brady_bunch/video/";
shows['Dynasty'] = docRoot+"/classics/dynasty/video/";
shows['The Ed Sullivan Show'] = docRoot+"/classics/the_ed_sullivan_show/video/";
shows['Family Ties'] = docRoot+"/classics/family_ties/video/";
shows['Happy Days'] = docRoot+"/classics/happy_days/video/";
shows['I Love Lucy'] = docRoot+"/classics/i_love_lucy/video/";
shows['Jericho'] = docRoot+"/primetime/jericho/video/";
shows['The Love Boat'] = docRoot+"/classics/the_love_boat/video/";
shows['MacGyver'] = docRoot+"/classics/macgyver/video/";
shows['Melrose Place'] = docRoot+"/classics/melrose_place/video/";
shows['Perry Mason'] = docRoot+"/classics/perry_mason/video/";
shows['Star Trek'] = docRoot+"/classics/star_trek/video/";
shows['Star Trek Animated'] = docRoot+"/classics/star_trek_animated/video/";
shows['Taxi'] = docRoot+"/classics/taxi/video/";
shows['The Twilight Zone'] = docRoot+"/classics/the_twilight_zone/video/";
shows['Twin Peaks'] = docRoot+"/classics/twin_peaks/video/";

shows['NEWS & SPORTS'] = ""; 
shows['CBS Evening News'] = docRoot+"/cbs_evening_news/";
shows['CBS Sports'] = docRoot+"/sports/";
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;
}

