this.whoamI="Chad Chamberlain\nSr.Web Programmer @ \nCBSNews.com\nE-mail:webmail@cbsnews.com\n";
this.update = "This script was last updated on: 05-06-2003 at 6:50pm";
this.comment = "";
var creator = whoamI+update+comment;
	
var moz1_5,ns4,ns6,ns7,ns8,ie4,ie5,ie5_5,ie,iex,ns,win,ie6,aol,opera,icab,omniWeb,linux,Mac,safari,firefox,da_text;
var pluginlist ="";
var nUser=navigator.userAgent.toLowerCase();
var bname = navigator.appName.toLowerCase();
var ver = navigator.appVersion;
var site = "showbuzz";
var int_ver = parseInt(ver);
if (nUser.indexOf('linux')!=-1){linux = true;}
if (nUser.indexOf('konqueror')!=-1){linux = true;}
if (nUser.indexOf('omniWeb')!=-1){omniWeb = true;}
if (nUser.indexOf('opera')!=-1){opera = true;}
if (nUser.indexOf('icab')!=-1){icab = true;}
if (nUser.indexOf('aol')!=-1){aol = true;}
if (nUser.indexOf('mac')!=-1){Mac = true;}
if (nUser.indexOf('Safari/') >0) safari =1;
if (bname.indexOf("netscape") >= 0 && int_ver == 4) ns4 = true;/*netscape 4 +*/
if (nUser.indexOf("gecko/") != -1 && nUser.indexOf("firefox/")!=-1){firefox = true;}/*firefox*/
if (nUser.indexOf("gecko/") != -1 && (nUser.indexOf("netscape/6")!=-1 || nUser.indexOf("netscape6/")!=-1)){ns6 = true;}/*netscape 6*/
if (nUser.indexOf("gecko/") != -1 && nUser.indexOf("netscape/7")!=-1){ns7 = true;}/*netscape 7*/
if (nUser.indexOf("gecko/") != -1 && nUser.indexOf("netscape/8")!=-1){ns8 = true;}/*netscape 8*/
if (nUser.indexOf("gecko/200") != -1 && int_ver == 5 && (nUser.indexOf("netscape/6")==-1 && nUser.indexOf("netscape/7")==-1)){moz1_5 = true;}/*mozilla 1.5 7*/
if (nUser.indexOf('compatible; msie 5.22; mac_powerpc')>0){iex=true}
if (nUser.indexOf('msie 4') >0){ie4 = 1;}/*internet explorer 4*/
if (nUser.indexOf('msie 5') >0 && nUser.indexOf('msie 5.5')==-1){ie5 = true;}/*internet explorer 5*/
if (nUser.indexOf('msie 5.5') >0){ie5_5 = true;}/*internet explorer 5*/
if (nUser.indexOf('msie 6') >0){ie6 = true;}/*internet explorer 6*/
var win = ((nUser.indexOf("win")!=-1) || (nUser.indexOf("32bit")!=-1));

var ie  = (nUser.indexOf("msie") != -1);


/*templates for video player*/
var	templ0="http://www.cbsnews.com/htdocs/videoplayer/newVid/framesource_old.html";
var	templ1="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer.shtml";//obj+"&title="+title;
var	templ2="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer_help.html";
var templ4="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer_settings.html";
var templ5="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer_help.html";
var templ6="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer_help_windows.html";
var templ7="http://www.cbsnews.com/htdocs/videoplayer/newVid/small_player/cbsnews_videoplayer_help_real.html";
/*end template for video player*/


var RealMode=0;
var RealPlayer8=0;
var RealPlayerG2=0;

var WMPV70 = 0;/*Windows Media Player Version 7.0*/

	        if (navigator.userAgent.indexOf("MSIE")<0 )
        	{
        		numPlugins = navigator.plugins.length;
	        	for (i = 0; i < numPlugins; i++)
        		{
                		plugin = navigator.plugins[i];
                		if (plugin.name.substring(0,10)=="RealPlayer")
	                	{
        	                	RealMode=1;
                		}
	        	}
        	}
	        document.write('<SCRIPT LANGUAGE=VBScript\> \n');
        	document.write('on error resume next \n');
	        document.write('RealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n');
        	//document.write('RealPlayer7 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))\n');
	        document.write('RealPlayer8 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))\n');
        	document.write("</SCRIPT\> \n");
			/*test to see if user has real or not*/
	        if ( RealPlayerG2 || RealPlayer8 ) /*|| RealPlayer7*/
        	{
	        	/*alert();*/
				isReal="yes";
			}
			else if ( Mac || linux || opera || RealMode )
			{
				isReal="yes";
			}
			/*else if (Mac || linux || opera)
	   		{
	   			isReal="yes";
			}*/
			else 
	   		{
	   			isReal="no";
			}


/*Windows Media Detection for Netscape and IE*/
 
 //Detect ActiveX Architecture on Both IE and on Gecko
//Defer to plugin architecture for other browsers

function AlertContinue(object) {
if(confirm("You will lose all unsaved data, are you sure you want to leave?"))
	{location = object.href;
	return true;}
	
else{return false;}

}

function detectWMP()
{
	var wmpInfo = {
		installed: false,
		scriptable: false,
		type: null,
		versionInfo: null
	};
	var wmp64 = "MediaPlayer.MediaPlayer.1";
	var wmp7 = "WMPlayer.OCX.7";
	if((window.ActiveXObject && navigator.userAgent.indexOf('Windows') != -1) || window.GeckoActiveXObject)
	{
		wmpInfo.type = "ActiveX";
		var player = createActiveXObject(wmp7);
		if(player)
		{
			wmpInfo.installed = true;
			wmpInfo.scriptable = true;
			wmpInfo.versionInfo = player.versionInfo;
			return wmpInfo;
		}
		else
		{
			player = createActiveXObject(wmp64);
			if(player)
			{
				wmpInfo.installed = true;
				wmpInfo.scriptable = true;
				wmpInfo.versionInfo = "6.4";
				return wmpInfo;
			}
			else
			{
				wmpInfo.versionInfo = "none";
				return wmpInfo;
			}
		}
	}
	else if(navigator.mimeTypes)
	{
		wmpInfo.type = "NetscapePlugin";
		numPlugins = navigator.plugins.length;
		for (i = 0; i < numPlugins; i++)
		{
		plugin = navigator.plugins[i];
			if (plugin.name.substring(0,10)=="Windows Media Player")
			{
				wmpInfo.installed = true;
				//wmpInfo.scriptable = false;
				wmpInfo.versionInfo = "PluginVersion";
				return wmpInfo;
			}
		}

		/*if(player)
		{	
			
			alert("if netscape and windows media");
			wmpInfo.installed = true;
			wmpInfo.scriptable = false;
			wmpInfo.versionInfo = "PluginVersion";
			return wmpInfo;
		}*/
		return wmpInfo;
	}
	
	
}
function createActiveXObject(id)
{
  var error;
  var control = null;

  try
  {
    if (window.ActiveXObject)
    {
      control = new ActiveXObject(id);
    }
    else if (window.GeckoActiveXObject)
    {
      control = new GeckoActiveXObject(id);
    }
  }
  catch (error)
  {
    ;
  }
  return control;
}
/*******End Windows Media Detection for Netscape and IE*******/

/*Detect windows media player*/
function playerResults(){
var detectionResults = detectWMP();
if(!Mac){
	if(detectionResults.installed)
		{
			/*alert("this is not mozilla");*/
			if(detectionResults.versionInfo.indexOf("9")!=-1 || detectionResults.versionInfo.indexOf("10")!=-1 || detectionResults.versionInfo.indexOf('PluginVersion')!=-1){return  true}
		}
		else if(detectionResults == "[object Object]")
		{
		return true;/*alert("detection Results :  "+detectionResults);*/
		}
	}
	else
	{ 
		return true;
	}
	
}
/*End detect windows media*/


	/*alert(nUser+' '+int_ver);*/
	var is_over = 0;
	var divelement = new Array();
		divelement[0] = 'popupDiv1';
	
	function clearall(obj){		
		if(ns4){
			for(i=0;i<divelement.length;i++){
				if(divelement[i] != obj){document.layers[divelement[i]].visibility = "hide"}
				}
		}else if(ie5||ie6||ns6||ns7||moz1_5||Mac){
			for(i=0;i<divelement.length;i++){
				if(divelement[i] != obj){document.getElementById(divelement[i]).style.visibility = "hidden";}
				}
		}/*else if(ie4){
			for(i=0;i<divelement.length;i++){
				if(divelement[i] != obj){alert();}else{'document.all.'+divelement[i]+'.style.visibility'+'="hidden"';}
			}
		}*/
	}
	function popUp(divobj) {
	if (ns4) {
	        document.layers[divobj].visibility="view";
			clearall(divobj);	
	} else if (ie5||ie6||ns6||ns7||moz1_5||Mac) {
			document.getElementById(divobj).style.visibility = "visible";
			clearall(divobj);			
	}else if(ie4){
			'document.all.'+divobj+'.style.visibility'+'="visible"';
	}
	
	}
	function popDown(divobj) {
	if (ns4) {
		document.layers[divobj].visibility="hide";
		//alert(document.layers[divobj].visibility);
	} else if (ie5||ie6||ns6||ns7||moz1_5||Mac) {
	    document.getElementById(divobj).style.visibility = "hidden";
	}else if(ie4){
		'document.all.'+divobj+'.style.visibility'+'="hidden"';
	}
	
	}
	
	function launch(pageTitle,w,h,address)
	{
		newWin = window.open("",pageTitle,'width='+w+',height='+h+',status=no,toolbar=no,scrollbars=no')
		newWin.location = address
	}
				
	/*function PopUp(url,w,h,winname) {
	if ((w == 540) && (h == 400)) {
		w = 740;
		h = 461;
	}
	var dim = eval('"width=' + w + ',height=' + h + '"');
	if(winname == null || winname==" ")
	{
		winname = "cbsnews";
	}
	Npop = window.open(url,winname,dim,'status=no,toolbar=no,scrollbars=no');
	}*/
	
	function PopUp(url,w,h,winname,tools) {
	if ((w == 540) && (h == 400)) {
		w = 740;
		h = 461;
	}
	var dim = eval('"width=' + w + ',height=' + h + '"');
	if(winname == null || winname==" ")
	{
		winname = "cbsnews";
	}
	
	if(tools == 1)
	{	
	Npop = window.open(url,winname,'status=yes,' + dim + ',menubar=yes,toolbar=yes,scrollbars=yes,location=yes,resizable=yes');
	}
	
	else{
	Npop = window.open(url,winname,dim);
	}
	
	}    //end of function
	
	look_here=document.location.href;
	h=570;
	w=550;
	var loc='http://www.cbsnews.com/htdocs/feedback/fb_news_form.shtml';
	
	function OpenFeedBack()
	{
		if(look_here.indexOf('earlyshow') != -1)
			{
			var er=3465;
			popwin =window.open("http://www.cbsnews.com/htdocs/feedback/fb_news_form.shtml",er,"height="+h+",width="+w+",status=0 ,scrollbars=0 ,location=0 ,menubar=0 ,resizable=0");
			}
		else
			
			{
			popwin =window.open("http://www.cbsnews.com/htdocs/feedback/fb_news_form.shtml",secid ,"height="+h+",width="+w+",scrollbars=0 ,location=0 ,menubar=0 ,resizable=0");
			}
	}


/*this is to get the date and time*/			
var month = new Array('Jan.','Feb.','March','April','May','June','July','August','Sept.','Oct.','Nov.','Dec.');
var the_date = new Date();
var the_day = the_date.getDate();
var the_month = the_date.getMonth();
var the_year = the_date.getFullYear();
var the_minutes = fixTime(the_date.getMinutes());
var the_hour = fixhour(the_date.getHours());
/*alert(the_date.getMinutes()+" this is the hour"+the_date.getHours());*/
var the_current_dateAndTime = month[the_month]+" " +the_day +", " + the_year+" " + the_hour + ":" + the_minutes;
var the_currentTime = the_hour + ":" + the_minutes;
function fixhour(the_hour) {

	if (the_hour >12) 
	{
		the_hour = eval(the_hour - 12);
	}
	else if(the_hour == 0)
	{
		the_hour = eval(the_hour+12)
	}
	//alert(the_hour);
	return the_hour;
}

function fixTime(the_time) {
	
	if ((the_time <10) && (the_date.getHours()<=11)) 
	{
		the_time = "0" + the_time + "am";
	}
	else if ((the_time >=10) && (the_date.getHours()<=11)) 
	{
		the_time = the_time + "am";
	}
	else if ((the_time >=10) && (the_date.getHours() >= 12)) 
	{
		the_time = the_time + "pm";
	}
	else if ((the_time <10) && (the_date.getHours() >= 12)) 
	{
		the_time = "0" + the_time + "pm";
	}
	//alert(the_time);
	return the_time;
}
function Time(){
document.write(the_currentTime);
}
function DateandTime(){
document.write(the_current_dateAndTime);
}

/*Update cac 2:15pm on 4-15-2002*/
/*call this function to scroll a window's x coordinate*/
var x = 0;
window.onerror=null
function ScrollRight(dist) {
		if (x < 2000) {
                scrollEnd = x + dist;
                x = x + 8;
                ScrollRight2();
        }
}

function ScrollRight2() {
		if (x < scrollEnd) {
                window.scrollTo(x,0);
                x = x + 8;
                setTimeout('ScrollRight2()', 5);
        } else {
                x = scrollEnd;
				
        }
}



function ScrollLeft(dist2) {
        x = scrollEnd;
    if (x > 0) {
        scrollEnd = x - dist2;
        x = x - 8;
        ScrollLeft2();
        }
} 


function ScrollLeft2() {
        if (x > scrollEnd) {
        window.scrollTo(x,0);
                x = x - 8;
                setTimeout('ScrollLeft2()', 1);
        } else {
                x = scrollEnd;
        }
}
/*Update cac 2:15pm on 4-18-2002*/
/*call this function to make this url your home page*/
 var home;
 var loc = document.location.href;
 var instructions = "Drag this link " +loc + " onto your Home button to make this your Home Page."
 	
function check(){
	if(ns4||ns6||ns7){
	alert('To make TheShowbuzz.com your home page:\n\n- Under "Edit" menu select "Preferences"\n- Inside "Navigator" form click on "Use Current Page"');
	}
	else{
		alert('To make TheShowbuzz.com your home page:\n\n- Under "Tools" menu select "Options"\n- Inside "General" form click on "Use Current Page"');
	}
}

function checkUrl()
{
	if (story_url.indexOf('.com')) {
		var a = story_url.split('.com', 2);
		story_url = a[1];
	}
	if (previous_url.indexOf(story_url) < 0) {
		document.location.href = story_url;
	}
}
	
 function makeHome(){
	 if(ie4||ie5||ie6){
	 	home  = document.write('<a href="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(loc); return false;">');
		home += document.write('<img src="http://www.showbuzz.cbsnews.com/common/images/button_home_homepage.gif" alt="Make Us Your Home Page" border="0"></a>');
	}
	else if(ns4||ns6||ns7)
	{
		home = document.write('<a href="javascript:history.go(0);" onclick="check(\'ns4\'); return false;"><img src="http://www.showbuzz.cbsnews.com/common/images/button_home_homepage.gif" alt="Make Us Your Home Page" border="0"></a>');
		//PopUp(\'framesource_instructions.html\',280,400,\'CBSNewsHome\');
	}
	else
	{
		home = document.write('<a href="javascript:history.go(0);" onclick="check(\'other\');  return false;"><img src="http://www.showbuzz.cbsnews.com/common/images/button_home_homepage.gif" alt="Make Us Your Home Page" border="0"></a>');
	}
	
	return home;
	}

/*Update cac 12:47pm on 4-19-2002*/
/*call this function to change email_summary edition time*/
	function edition(){
	var edition;
	}
/*Update cac 11:13am on 10-14-2002*/
/*call this function to change email preferrences*/
function unsubCheck(fobj)
	{
		var email = fobj.mod_email;	//alert(email.name);
		var main_email = document.forms[0].email;
		//alert(main_email.value);
		if(email.value == '')
		{
			alert("please fill in your email address");//email.value = main_email.value;
			email.focus();
			return false;
		}
		document.location = "http://cgi.cbs.com/news/unsubscribe.pl?email="+email.value;
		//alert(document.location);
	}
	/*Update cac 6:15pm on 10-23-2002*/
	/*this will be our primary cookie function to be used to story all types of interesting stuff*/
	var cookieString = document.cookie;
	var today = new Date(); 
	var cookieExpires = new Date(today.getTime() + 712 * 24 * 60 * 60 * 1000); // plus 30 day
	var deletecookieExp = new Date(today.getTime() - 72 * 60 * 60 * 1000);  //
	var cookiePath = ";Path=/"; 
  
  function getCookieValue(name) { 
	var index = cookieString.indexOf(name + "="); 
	if (index == -1) return null; 
		index = cookieString.indexOf("=", index) + 1; 
	var endstr = cookieString.indexOf(";", index); 
	if (endstr == -1) endstr = cookieString.length; 
	return unescape(cookieString.substring(index, endstr)); 
	}
	 
	function deleteCookie(name)
	{
		value = escape(name); 
		document.cookie=name + "=null; expires=" + deletecookieExp.toGMTString();
		cookieString = document.cookie;
	}
	
	function setCookie(cookieName, cookieValue)
	{ 
	 if (cookieValue != null && cookieValue != "")
		cookieValue = escape(cookieValue); 
		document.cookie=cookieName + "=" + cookieValue + "; expires=" + cookieExpires.toGMTString() + cookiePath;
		cookieString = document.cookie;
	}
	
	/*This function does a simple image swap. takes 3 parameters an img and a element ID and type of image swapped*/
	function imageExchange(locId,img,type)
	{
		if (ns4) {
        	eval('document.locId.'+type+'= img');
		} else if (ie5||ie6||ns6||ns7) {
			eval('document.getElementById(locId).'+type+' = img');
		}else if(ie4){
			'document.all.'+locId+'.'+type+'= img';
		}
	}
	var is_over = 0;
	var inlink = 0;
	function linkpopUp(bgc,da_header,da_content,third) {
	inlink = 1;
	da_text = '<table cellspacing=0 cellpadding=1 border=0 width=200><tr><td bgcolor="'+bgc+'">';
	da_text += '<table width=100% cellspacing=0 cellpadding=2 border=0 bgcolor=#DDDDDD><tr><td align=left><font class="bodysmall">';
	da_text += da_content+third;
	da_text += '</font></td></tr></table></td></tr></table>';
	
	/*alert("this is the head:\n"+da_header+ "this is the content: \n"+da_content+ " this is the third :\n" +third+ "this is the fourth:\n"+fourth);*/
	
	/*if (ns4) {
	        document.layers['linkDiv'].visibility = "visible";
	        document.layers['linkDiv'].document.open();
	        document.layers['linkDiv'].document.writeln(da_text);
	        document.layers['linkDiv'].document.close();
	} else */
	if (ie6||ie5||ns6||ns7) {
	        linkDiv.style.visibility = "visible";
	        linkDiv.innerHTML = da_text;
	}
	
	}
	
	function linkpopDown() {
	inlink = 0;
	/*if (document.layers) {
	        document.layers['linkDiv'].visibility = "hidden";
	        document.layers['linkDiv'].document.open();
	        document.layers['linkDiv'].document.writeln("");
	        document.layers['linkDiv'].document.close();
	} else*/ 
	if (ie6||ie5||ns6||ns7) {
	        linkDiv.style.visibility = "hidden";
	        //popupDiv.innerHTML = "";
	}
	
	}
	
	function daMouseCapture(e) { 
			/*if (document.layers) { alert();*/
	        /*alert();*/
			if((ie6||ie5||ns6||ns7||firefox||safari) && (inlink != 0)){linkDiv.style.left = window.event.clientX + document.body.scrollLeft + 5; linkDiv.style.top = window.event.clientY + document.body.scrollTop-48;}
			/*if(ns4){document.layers['linkDiv'].left = e.pageX -60; document.layers['linkDiv'].top = e.pageY - 53;}*/
	}
	
	
	function sendCBSNews_HBX(pdfpage){
			
	 thisACCT = "DM52100714BB;DM530910EMZA"	  
  	 thisPN = "complete+report+"+pdfpage+"+-+201";
	
	 _hbSet("hb", thisACCT);
	_hbSet("vcon", 'national');
	_hbSet("n", thisPN);
	
	_hbSend();
	}  
	
	function gotoURL(obj){
		var url = obj.split("?");
		var isTaken = getCookieValue("usability_survey");
		var loc = obj.split("?url=");
		var newloc = "http://www.cbsnews.com"+loc[1];
		if(isTaken=='taken'){document.location.href=newloc;}
		else if(isTaken!="taken")
		{	if(cbsnews_ip.substring(0, 7)!="170.20."){document.location.href = "/htdocs/user_survey/story_usability_survey.html?"+url[1];}
			else{document.location.href=newloc;}
		}
	}
	/*************************************************************
	This function generates a pop up box that takes the 
	user's info, attaches it to an email and sends the 
	video url as well.  It requires one parameter, video url
	**************************************************************/
	function Emailvideo(t,v,hb,ent)
	{
		var videoTitle = t; //.replace(/'/g, "&lsquo;");
		var videoUrl = v;
		if (ent == '1'){
		launch('SendVideo',336,535,'http:\/\/www.showbuzz.cbsnews.com/htdocs/send_article/entertainment.html?story_headline='+videoTitle+'&story_url=http:\/\/www.cbsnews.com/sections/video/main500620.shtml?clip='+videoUrl+'&title='+t.replace(/ /g, "$@$")+hb);}
		else {
		launch('SendVideo',540,400,'http:\/\/www.cbsnews.com/htdocs/send_article/framesource.html?story_headline='+videoTitle+'&story_url=http:\/\/www.cbsnews.com/sections/i_video/main500251.shtml?clip='+videoUrl+'&title='+t.replace(/ /g, "$@$")+hb);}
	}
	
	function emailVid(headline,id) {
	launch('SendVideo', 336,580, '/htdocs/send_article/entertainment.html?story_headline='+ headline +'&amp;story_url=http://www.showbuzz.cbsnews.com/sections/video/main500620.shtml?id='+ id);
}
	/*End videoEmail Function*/
	

		
	function linkTo(tag) {
	//alert("linkTo " + tag.href);
		if (tag.href.indexOf("javascript:") !=-1) {
			return true;
		} else if ((tag.href.indexOf("/video") > 0) && (tag.href.indexOf('/videoarchive') < 0) && (tag.href.indexOf('/video/main') < 0) && (tag.href.indexOf('/i_video/main') < 0)) {
			var p = tag.href.indexOf("/video");
			if (p >= 0) {
				var id = tag.href.substring(p+6);
				p = id.indexOf('.');
				if (p > 0) {
					id = id.substring(0, p) + "n";
					tag.href = "http://www.showbuzz.cbsnews.com/sections/video/main500620.shtml?id=" + id;
					tag.target = "_top";
					return true;
				}
			}
		} else if (tag.href.indexOf("/audio") > 0) {
			// Audios can be either site
			tag.href = tag.href.replace("www.cbsnews.com/media", "audio.cbsnews.com");
			tag.href = tag.href.replace("www.showbuzz.cbsnews.com/media", "audio.cbsnews.com");
			tag.target = "_new"; 
			return true;
		} else {
			if (tag.href.indexOf("/elements") > 0) {
				if(tag.href.indexOf("javascript:") !=-1){
				return true;		
				}
				else if(tag.href.indexOf("showbuzz.cbsnews") > 0)
				{
					if(document.location.href.indexOf("www.cbsnews.com") > 0)
					{
					var newWin = window.open(tag.href, "cbsnews", "width=740,height=461");
						newWin.focus();
						return false;
					}
					else
					{
						if(tag.href.indexOf('_0_1_photo.shtml') > 0){
							document.getElementById('IFrame1').src = tag.href;
							scrollUp();
							return false;
						}else{
						tag.target = "_top";
						return true;
						}
					}
				}
				else if( tag.href.indexOf("videoarchive") > 0 && tag.href.indexOf("i_video") > 0 ){
				tag.target = "_new";
				return true;
				}
				else
				{
					var newWin = window.open(tag.href, "cbsnews", "width=740,height=461");
						newWin.focus();
						return false;
				}
			
			} else if (tag.href.indexOf("/htdocs") > 0) {
				if ((tag.href.indexOf("register") > 0) || 
						(tag.href.indexOf("wireless") > 0)) {
					tag.target = "_new";
					return true;
				} else {
					var newWin = window.open(tag.href, "cbsnews", "width=740,height=461");
					newWin.focus();
					return false;
				} 
			} else if (tag.href.indexOf("/stories") > 0) {
				if(tag.href.indexOf("www.cbsnews") > 0){
				tag.target = "_new";
				return true;
				}
				else
				{
				tag.target = "_top";
				return true;
				}
				
				
			} else {
				if (tag.href.indexOf("/sections/video/main500620.shtml?id=") > 0){
					tag.target = "_top";
					return true;
				}else if (tag.href.indexOf("showbuzz.cbsnews") > 0){
					tag.target = "_top";
					return true;
				}else{
					tag.target = "_new";
					return true;
				}
			}
		}
	}

	
	
	function getLink(){
	var href = document.referrer;
		if(href.indexOf('500619')!=-1){
			document.location = "http://www.showbuzz.cbsnews.com/sections/ttv/schedule0.html";
		}
		else
		{
		 document.location = history.go(-1);
		}
	}
	
	function displayvid(){
		document.write('<object width="175" height="131" id="flv_early" align="middle">');
		document.write('<param name="movie" value="http://www.cbsnews.com/htdocs/swf/CronkiteAS2.swf" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="http://www.cbsnews.com/htdocs/swf/CronkiteAS2.swf" bgcolor="#ffffff" width="175" height="131" align="middle" />');
		document.write('</object>');
		
		document.write('</div><BR>');
}
	
	
	/*************************************************************
	This function reloads the home page unless a video is playing
	*************************************************************180000*/
	function CBSautoReload(){setTimeout("isReloadable()", 180000);}
	/*End iautoReload Function*/

	/*************************************************************
	Return the offset to eastern time
	**************************************************************/
	function getEasternOffset() {
		return 300;
	}
	
	
	/*************************************************************
	toggle for most popular:  added by cchamberlain@cbs.com:
	October 18th, 2006	
	*************************************************************/
	function togglePopular(selection){
		var menu = Array('popular-photos', 'popular-stories', 'popular-videos');
	
		if(selection == ''){
			selection = menu[0];
		}
		for(i=0; i<menu.length; i++){
			if(menu[i] == selection){
				gebid(menu[i] + '-menu').className = "menu-selected header"
				gebid(menu[i] + '-menu').getElementsByTagName('a')[0].className = "link-selected";
				gebid(menu[i] + '-list').style.display = '';
			} else {
				gebid(menu[i] + '-menu').className = "menu-unselected"
				gebid(menu[i] + '-menu').getElementsByTagName('a')[0].className = "link-unselected header";
				gebid(menu[i] + '-list').style.display = 'none';
			}
		}
	}
	
	function gebid(e){
		return document.getElementById(e);
	}
	
	
	/*************************************************************
	Function for check omniture variables
	**************************************************************/
	function checkOmniture() {
		var string = "acct = " + s_account + "\n";
		string += "name = " + s.pageName + "\n";
		string += "p1 = " + s.prop1 + "\n";
		string += "p2 = " + s.prop2 + "\n";
		string += "p3 = " + s.prop3 + "\n";
		string += "p4 = " + s.prop4 + "\n";
		string += "p5 = " + s.prop5 + "\n";
		string += "p6 = " + s.prop6 + "\n";
		string += "p7 = " + s.prop7 + "\n";
		string += "p8 = " + s.prop8 + "\n";
		string += "p9 = " + s.prop9 + "\n";
		string += "p10 = " + s.prop10 + "\n";
		string += "p11 = " + s.prop11 + "\n";
		string += "p12 = " + s.prop12 + "\n";
		string += "p13 = " + s.prop13 + "\n";
		string += "p14 = " + s.prop14 + "\n";
		string += "p15 = " + s.prop15 + "\n";
		string += "p16 = " + s.prop16 + "\n";
		string += "p17 = " + s.prop17 + "\n";
		string += "p18 = " + s.prop18 + "\n";
		string += "p19 = " + s.prop19 + "\n";
		string += "p20 = " + s.prop20 + "\n";
		string += "p21 = " + s.prop21 + "\n";
		string += "p22 = " + s.prop22 + "\n";
		string += "p23 = " + s.prop23 + "\n";
		alert(string);
	}
	/*document.onclick = function() {
		if (window.event.ctrlKey) {
			checkOmniture();
			window.event.cancelBubble = true;
		}		
	}*/ 
		function checkDART() {
			if (typeof(vtag) != "undefined") {
				alert(vtag);
			} else if (typeof(dcTag) != "undefined") {
				alert(dcTag);
			} else {
				alert("unknown");
			}
		}
function bug() {
	window.open("http://bugzilla.sportsline.com/enter_bug.cgi?product=Buzz%20Website&short_desc=&bug_file_loc=" + escape(document.location.href), "bug");
}

function checkCookie(){	return true; }

/* Generic popup implementation - raccettura */
function cbsPopup(id){
	this.id = id; return false;
};

cbsPopup.prototype = {

	open: function(url){
		this.url = url;
		if(!document.getElementById(this.id)){
			this.xmlHttpRequester('/common/popups/'+this.id+'.xml', this.buildPopup);
		}
		return false;
	},

	close: function(obj){
		obj.parentNode.parentNode.parentNode.parentNode.parentNode.removeChild(obj.parentNode.parentNode.parentNode.parentNode);
		return false;
	},

	buildPopup: function(response){
		var doc = response.responseXML;
		var iframe = false;
		var footer = false;
		var type = 'L';
		var contentHeight = null;

		if(this.getNode('url', doc) && this.getNode('url', doc).firstChild){
			iframe = true;
		}

		if(this.getNode('footer', doc) && this.getNode('footer', doc).firstChild){
			footer = true;
		}

		if(this.getNode('type', doc) && this.getNode('type', doc).firstChild){
			type = this.getNode('type', doc).firstChild.data;
			if(type == 'L'){ type = ''; }
		}
		
		if(this.getNode('contentHeight', doc) && this.getNode('contentHeight', doc).firstChild){
			contentHeight = this.getNode('contentHeight', doc).firstChild.data;
		}
		

		frame = this.genPopup(footer, iframe, type, contentHeight);

		// iFrame URL
		if(this.url){
			this.gebid(this.id+'_frame').src = this.url;
			//this.gebid(this.id+'_frame').contentWindow.document.body.style.border = 0;
		}
		else if(this.getNode('url', doc) && this.getNode('url', doc).firstChild){
			this.gebid(this.id+'_frame').src = this.getNode('url', doc).firstChild.data;
		} else {

			if(this.getNode('content', doc) && this.getNode('content', doc).firstChild){
				this.gebid(this.id+'_content').innerHTML = this.getNode('content', doc).firstChild.data;
			}
		}

		if(this.getNode('footer', doc) && this.getNode('footer', doc).firstChild){
			this.gebid(this.id+'_footer').innerHTML = this.getNode('footer', doc).firstChild.data;
		}

		if(this.getNode('header', doc) && this.getNode('header', doc).firstChild){
			this.gebid(this.id+'_header').innerHTML = this.getNode('header', doc).firstChild.data;
		} else {
			this.gebid(this.id+'_header').innerHTML = '&nbsp;'; // should be 1 char space if nothing
		}

		var scrollX = 0, scrollY = 0;
		if(document.body.scrollTop){
			scrollX = document.body.scrollLeft;
			scrollY = document.body.scrollTop;
		} else if (document.documentElement){
			scrollX = document.documentElement.scrollLeft;
			scrollY = document.documentElement.scrollTop;
		} else {
			scrollX = window.pageXOffset;
			scrollY = window.pageYOffset;
		}

		var wX =0,  wY = 0;
		if(document.all){
			wX = document.body.offsetWidth;
			wY = document.body.offsetHeight;
		} else {
			wX = window.innerWidth
			wY = window.innerHeight;
		}
		var y = scrollY + (wY/2) - (frame.clientHeight/2);
		var x = scrollX + (wX/2) - (frame.clientWidth/2);
		
		frame.style['position'] = 'absolute';

		// Move off center
		y =  scrollY + 150;
		x = scrollX + 125;

		frame.style['top'] = y + 'px';
		frame.style['left'] = x + 'px';
		frame.style['z-index'] = '1000';
	},

	gebid: function(el){
		return document.getElementById(el);
	},

	getNode: function(n, doc){
		return doc.getElementsByTagName(n)[0];
	},

	genPopup: function(footer, iframe, type, contentHeight){
		if(navigator.userAgent.indexOf("MSIE")!=-1){
			cname = 'className';
		} else {
			cname = 'class';
		}

		// Build out the dom, and assign classes
		var popupFrame = document.body.appendChild(document.createElement('div'));
		popupFrame.setAttribute(cname, 'popupFrame'+type);
		popupFrame.setAttribute('id', this.id);

		var popupHeader = popupFrame.appendChild(document.createElement('div'));
		popupHeader.setAttribute(cname, 'popupHeader'+type);

		var popupHeaderInner = popupHeader.appendChild(document.createElement('div'));
		popupHeaderInner.setAttribute(cname, 'popupHeaderInner'+type);
		popupHeaderInner.setAttribute('id', this.id+'_header');

		var popupContentFrame = popupHeader.appendChild(document.createElement('div'));
		if(iframe){
			var popupContent = popupContentFrame.appendChild(document.createElement('iframe'));
			popupContent.setAttribute('id', this.id+'_frame');
			popupContent.setAttribute('frameborder', '0');
		} else {
			var popupContent = popupContentFrame.appendChild(document.createElement('div'));
			popupContent.setAttribute('id', this.id+'_content');
		}
		popupContent.setAttribute(cname, 'popupContent'+type);

		if(contentHeight != null){
			popupContent.style['height'] = contentHeight;
		}
		
		if(footer){
			// Set the class on content frame now
			popupContent.setAttribute(cname, 'popupContentFrame'+type);

			var popupFooter = popupHeader.appendChild(document.createElement('div'));
			popupFooter.setAttribute(cname, 'popupFooter');
			popupFooter.setAttribute('id', this.id+'_footer');
		} else {
			popupContentFrame.setAttribute(cname, 'popupContentFrameNoFooter'+type);
	}

		// also some css specific to IE to work around IE bugs
		if(document.all && navigator.userAgent.indexOf("Opera") ==-1){
			if (window.XMLHttpRequest) {
				if(type == 'S'){
					document.styleSheets[0].addRule("#"+this.id, "background-image: url(http://wwwimage.cbsnews.com/common/images/v2/popq_shadow.png); background-repeat: no-repeat;");
				} else {
					document.styleSheets[0].addRule("#"+this.id, "background-image: url(http://wwwimage.cbsnews.com/common/images/v2/popup_shadow.png); background-repeat: no-repeat;");
				}
			}
			document.styleSheets[0].addRule("#"+this.id+'_header', "margin: 0px 8px 19px 8px; padding-top: 8px");

			if(footer){
				document.styleSheets[0].addRule("#"+this.id+'_footer', "margin-right: 4px");
			}
		}
		return popupFrame;
	},

	xmlHttpRequester: function(url, loadingFunct) {
		var request = false;
		if (window.XMLHttpRequest) {
			request = new XMLHttpRequest();
			if(request.overrideMimeType){ // IE7 doesn't support this
				request.overrideMimeType('text/xml');
			}
		}
		else if (window.ActiveXObject) {
			request = new ActiveXObject("Microsoft.XMLHTTP");
		}
		request.open('GET', url, true);
		var _this = this;
		request.onreadystatechange = function() {
			if (request.readyState == 4) {
				if (request.status == 200) {
					_this.buildPopup(request);
				} else {
					alert('Sorry, we couldn\'t perform the action you requested.');
				};
			}
		}
		request.send('');
	}

};

/* digg */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('A={8:9(6,4,5,3){z(!6)y;4=4||\'\';5=5||\'\';3=3||\'\';x.w(\'v://u.t/s-r?q=2&6=\'+6+\'&4=\'+4+\'&5=\'+5+\'&3=\'+3,k j().h(),\'l=0,m=1,f=0,e=1,d=0,b=1,i=n,7=p,a = o,c = g\')}}',37,37,'|||topic|title|bodytext|url|height|remoteSubmit|function|left|resizable|top|menubar|statusbar|location|150|getTime|width|Date|new|toolbar|scrollbars|650|470|450|phase|submit|remote|com|digg|http|open|window|return|if|Digg'.split('|'),0,{}))

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


/* search */
/*******************
 * search
 *******************/
function searchForm(frm, type, loc) {
	var action_web="http://www.showbuzz.cbsnews.com/htdocs/search/websearch.php";  	
	var action_cbs="http://search.showbuzz.cbsnews.com/";
	var action_go = action_cbs;
	var needed_web = new Array('searchString', 'x', 'y', 'num', 'offset', 'advanced', 'section', 'sort', 'type');
	var needed_cbs = new Array('x', 'sb');
	var id = new String("search" + loc);

	// Web Selected Search
	if (type == "web") {
		pruneInputElements(needed_cbs, id, loc);
		frm.searchString.value = frm.q.value;
		frm.type.value = "all";
		action_go = action_web;		
	}

	// CBS Selected Search
	else // remove web params
	{
		pruneInputElements(needed_web, id, loc);
	}

	frm.action = action_go;
	return true;
}

function pruneInputElements(array, id, loc) {
	var str = "";
	for (var i = 0; i < array.length; i++) {
		elemName = new String(array[i] + loc);
		if (elemName != "") {
			str += elemName;
			removeElement(id, elemName);
		}
		
	}
}

function removeElement(frmElement, inputElement) {
//	var d = document.getElementById(frmElement);
//	var rd = document.getElementById(inputElement);
//	if (rd) { d.removeChild(rd); }
	var d = document.getElementById(inputElement);
	if(d){ d.parentNode.removeChild(d) };
}

function swapPoweredBy(obj){
	var i = document.getElementById('search_branding');
	if(obj.value == 'web'){
		i.src = 'http://wwwimage.cbsnews.com/common/images/v3/google_powered.gif';
	} else {
		i.src = 'http://wwwimage.cbsnews.com/common/images/v3/google_enhanced.gif';
	}
}
