//This file writes out the div to the article pages and also creates the links for flash promo on sectionfronts
//Updated to no longer write out the flash movie

var rawXml;
var xmlPath;
var envUrl ='';

//Omniture Variables
var _ss1='Digg';
var _ss2='Google';
var _ss3='Yahoo';
var _ss4='Delicious';
var _ss5='Reddit';
var _ss6='Facebook';
var _ss7='Newsvine';
var _ss8='MyLATimes';
var _ss9='Netvibes';
var _ss10='My Yahoo';
var _ss11='Mixx';

//New feedtable with source for raw xml for each section
var feedTable='';
feedTable+='/news/local/	http://feeds.latimes.com/latimes/news/local/	http://xml.latimes.com/news/local/rss2.0.xml\n';
feedTable+='/news/local/los_angeles_metro/	http://feeds.latimes.com/latimes/news/local/los_angeles_metro/	http://xml.latimes.com/news/local/los_angeles_metro/rss2.0.xml\n';
feedTable+='/news/local/orange/	http://feeds.latimes.com/latimes/news/local/orange/	http://xml.latimes.com/news/local/orange/rss2.0.xml\n';
feedTable+='/news/local/valley/	http://feeds.latimes.com/latimes/news/local/valley/	http://xml.latimes.com/news/local/valley/rss2.0.xml\n';
feedTable+='/news/local/ventura/	http://feeds.latimes.com/latimes/news/local/ventura/	http://xml.latimes.com/news/local/ventura/rss2.0.xml\n';
feedTable+='/news/local/inland/	http://feeds.latimes.com/latimes/news/local/inland/	http://xml.latimes.com/news/local/inland/rss2.0.xml\n';
feedTable+='/news/nationworld/nation/	http://feeds.latimes.com/latimes/news/nationworld/nation/	http://xml.latimes.com/news/nationworld/nation/rss2.0.xml\n';
feedTable+='/news/nationworld/world/	http://feeds.latimes.com/latimes/news/nationworld/world/	http://xml.latimes.com/news/nationworld/world/rss2.0.xml\n';
feedTable+='/business/	http://feeds.latimes.com/latimes/business/	http://xml.latimes.com/business/rss2.0.xml\n';
feedTable+='/business/investing/	http://feeds.latimes.com/latimes/business/investing/	http://xml.latimes.com/business/investing/rss2.0.xml\n';
feedTable+='/entertainment/news/	http://feeds.latimes.com/latimes/entertainment/	http://xml.latimes.com/entertainment/news/rss2.0.xml\n';
feedTable+='/entertainment/news/business/	http://feeds.latimes.com/entertainment/business/	http://xml.latimes.com/entertainment/news/business/rss2.0.xml\n';
feedTable+='/entertainment/news/business/newsletter/	http://feeds.latimes.com/entertainment/business/	http://xml.latimes.com/entertainment/news/business/rss2.0.xml\n';
feedTable+='/entertainment/news/celebrity/	http://feeds.latimes.com/entertainment/news/celebrity/	http://xml.latimes.com/entertainment/news/celebrity/rss2.0.xml\n';
feedTable+='/entertainment/news/features/	http://feeds.latimes.com/latimes/entertainment/	http://xml.latimes.com/entertainment/news/rss2.0.xml\n';
feedTable+='/entertainment/news/galleries/	http://feeds.latimes.com/latimes/entertainment/	http://xml.latimes.com/entertainment/news/rss2.0.xml\n';
feedTable+='/entertainment/news/homeentertainment/	http://feeds.latimes.com/entertainment/home/	http://xml.latimes.com/entertainment/news/homeentertainment/rss2.0.xml\n';
feedTable+='/entertainment/news/movies/	http://feeds.latimes.com/latimes/entertainment/news/movies/	http://xml.latimes.com/entertainment/news/movies/rss2.0.xml\n';
feedTable+='/entertainment/news/movies/summer/	http://feeds.latimes.com/latimes/entertainment/news/movies/	http://xml.latimes.com/entertainment/news/movies/rss2.0.xml\n';
feedTable+='/entertainment/news/movies/more/	http://feeds.latimes.com/latimes/entertainment/news/movies/	http://xml.latimes.com/entertainment/news/movies/rss2.0.xml\n';
feedTable+='/entertainment/news/newmedia/	http://feeds.latimes.com/entertainment/newmedia/	http://xml.latimes.com/entertainment/news/newmedia/rss2.0.xml\n';
feedTable+='/entertainment/news/tv/	http://feeds.latimes.com/latimes/entertainment/news/tv/	http://xml.latimes.com/entertainment/news/tv/rss2.0.xml\n';
feedTable+='/entertainment/news/tv/more/	http://feeds.latimes.com/latimes/entertainment/news/tv/	http://xml.latimes.com/entertainment/news/tv/rss2.0.xml\n';
feedTable+='/entertainment/news/music/	http://feeds.latimes.com/latimes/entertainment/news/music/	http://xml.latimes.com/entertainment/news/music/rss2.0.xml\n';
feedTable+='/entertainment/news/music/more/	http://feeds.latimes.com/latimes/entertainment/news/music/	http://xml.latimes.com/entertainment/news/music/rss2.0.xml\n';
feedTable+='/sports/	http://feeds.latimes.com/latimes/sports/	http://xml.latimes.com/sports/rss2.0.xml\n';
feedTable+='/sports/baseball/mlb/angels/	http://feeds.latimes.com/latimes/sports/baseball/mlb/angels/	http://xml.latimes.com/sports/baseball/mlb/angels/rss2.0.xml\n';
feedTable+='/sports/baseball/mlb/dodgers/	http://feeds.latimes.com/latimes/sports/baseball/mlb/dodgers/	http://xml.latimes.com/sports/baseball/mlb/dodgers/rss2.0.xml\n';
feedTable+='/sports/basketball/nba/lakers/	http://feeds.latimes.com/latimes/sports/basketball/nba/lakers/	http://xml.latimes.com/sports/basketball/nba/lakers/rss2.0.xml\n';
feedTable+='/sports/basketball/nba/clippers/	http://feeds.latimes.com/latimes/sports/basketball/nba/clippers/	http://xml.latimes.com/sports/basketball/nba/clippers/rss2.0.xml\n';
feedTable+='/sports/college/ucla/	http://feeds.latimes.com/latimes/sports/college/ucla/	http://xml.latimes.com/sports/college/ucla/rss2.0.xml\n';
feedTable+='/sports/college/usc/	http://feeds.latimes.com/latimes/sports/college/usc/	http://xml.latimes.com/sports/college/usc/rss2.0.xml\n';
feedTable+='/sports/hockey/nhl/	http://feeds.latimes.com/latimes/sports/hockey/nhl/	http://xml.latimes.com/sports/hockey/nhl/rss2.0.xml\n';
feedTable+='/sports/hockey/nhl/kings/	http://feeds.latimes.com/latimes/sports/hockey/nhl/kings/	http://xml.latimes.com/sports/hockey/nhl/kings/rss2.0.xml\n';
feedTable+='/sports/hockey/nhl/ducks/	http://feeds.latimes.com/latimes/sports/hockey/nhl/ducks/	http://xml.latimes.com/sports/hockey/nhl/ducks/rss2.0.xml\n';
feedTable+='/sports/soccer/	http://feeds.latimes.com/latimes/sports/soccer/	http://xml.latimes.com/sports/soccer/rss2.0.xml\n';
feedTable+='/sports/basketball/wnba/sparks/	http://feeds.latimes.com/latimes/sports/basketball/wnba/sparks/	http://xml.latimes.com/sports/basketball/wnba/sparks/rss2.0.xml\n';
feedTable+='/sports/baseball/mlb/	http://feeds.latimes.com/latimes/sports/baseball/mlb/	http://xml.latimes.com/sports/baseball/mlb/rss2.0.xml\n';
feedTable+='/sports/basketball/nba/	http://feeds.latimes.com/latimes/sports/basketball/nba/	http://xml.latimes.com/sports/basketball/nba/rss2.0.xml\n';
feedTable+='/sports/football/nfl/	http://feeds.latimes.com/latimes/sports/football/nfl/	http://xml.latimes.com/sports/football/nfl/rss2.0.xml\n';
feedTable+='/sports/golf/	http://feeds.latimes.com/latimes/sports/golf/	http://xml.latimes.com/sports/golf/rss2.0.xml\n';
feedTable+='/sports/college/basketball/	http://feeds.latimes.com/latimes/sports/college/basketball/	http://xml.latimes.com/sports/college/basketball/rss2.0.xml\n';
feedTable+='/sports/college/football/	http://feeds.latimes.com/latimes/sports/college/football/	http://xml.latimes.com/sports/college/football/rss2.0.xml\n';
feedTable+='/sports/highschool/	http://feeds.latimes.com/latimes/sports/highschool/	http://xml.latimes.com/sports/highschool/rss2.0.xml\n';
feedTable+='/sports/motorracing/	http://feeds.latimes.com/latimes/sports/motorracing/	http://xml.latimes.com/sports/motorracing/rss2.0.xml\n';
feedTable+='/sports/boxing/	http://feeds.latimes.com/latimes/sports/boxing/	http://xml.latimes.com/sports/boxing/rss2.0.xml\n';
feedTable+='/sports/horseracing/	http://feeds.latimes.com/latimes/sports/horseracing/	http://xml.latimes.com/sports/horseracing/rss2.0.xml\n';
feedTable+='/sports/tennis/	http://feeds.latimes.com/latimes/sports/tennis/	http://xml.latimes.com/sports/tennis/rss2.0.xml\n';
feedTable+='/news/politics/	http://feeds.latimes.com/latimes/news/politics/	http://xml.latimes.com/news/politics/rss2.0.xml\n';
feedTable+='/news/nationworld/politics/	http://feeds.latimes.com/latimes/news/nationworld/politics/	http://xml.latimes.com/news/nationworld/politics/rss2.0.xml\n';
feedTable+='/news/local/politics/cal/	http://feeds.latimes.com/latimes/news/local/politics/cal/	http://xml.latimes.com/news/local/politics/cal/rss2.0.xml\n';
feedTable+='/news/local/politics/socal/	http://feeds.latimes.com/latimes/news/local/politics/socal/	http://xml.latimes.com/news/local/politics/socal/rss2.0.xml\n';
feedTable+='/news/opinion/	http://feeds.latimes.com/latimes/news/opinion/	http://xml.latimes.com/news/opinion/rss2.0.xml\n';
feedTable+='/news/opinion/editorials/	http://feeds.latimes.com/latimes/news/opinion/editorials/	http://xml.latimes.com/news/opinion/editorials/rss2.0.xml\n';
feedTable+='/news/opinion/commentary/	http://feeds.latimes.com/latimes/news/opinion/commentary/	http://xml.latimes.com/news/opinion/commentary/rss2.0.xml\n';
feedTable+='/travel/	http://feeds.latimes.com/latimes/travel/	http://xml.latimes.com/travel/rss2.0.xml\n';
feedTable+='/classified/realestate/	http://feeds.latimes.com/latimes/classified/realestate/	http://xml.latimes.com/classified/realestate/rss2.0.xml\n';
feedTable+='/features/books/	http://feeds.latimes.com/features/books/	http://xml.latimes.com/features/books/rss2.0.xml\n';
feedTable+='/features/home/	http://feeds.latimes.com/latimes/features/home/	http://xml.latimes.com/features/home/rss2.0.xml\n';
feedTable+='/features/health/	http://feeds.latimes.com/latimes/features/health/	http://xml.latimes.com/features/health/rss2.0.xml\n';
feedTable+='/features/food/	http://feeds.latimes.com/latimes/features/food/	http://xml.latimes.com/features/food/rss2.0.xml\n';
feedTable+='/classified/automotive/highway1/	http://feeds.latimes.com/latimes/classified/automotive/highway1/	http://xml.latimes.com/classified/automotive/highway1/rss2.0.xml\n';
feedTable+='/news/science/environment/	http://feeds.latimes.com/latimes/news/science/environment/	http://xml.latimes.com/news/science/environment/rss2.0.xml\n';
feedTable+='/news/education/	http://feeds.latimes.com/latimes/news/education/	http://xml.latimes.com/news/education/rss2.0.xml\n';
feedTable+='/features/religion/	http://feeds.latimes.com/latimes/features/religion/	http://xml.latimes.com/features/religion/rss2.0.xml\n';
feedTable+='/features/lifestyle/	http://feeds.latimes.com/latimes/features/lifestyle/	http://xml.latimes.com/features/lifestyle/rss2.0.xml\n';
feedTable+='/news/science/	http://feeds.latimes.com/latimes/news/science/	http://xml.latimes.com/news/science/rss2.0.xml\n';
feedTable+='/technology/	http://feeds.latimes.com/latimes/technology/	http://xml.latimes.com/technology/rss2.0.xml\n';
feedTable+='/features/magazine/west/	http://feeds.latimes.com/latimes/features/magazine/west/	http://xml.latimes.com/features/magazine/west/rss2.0.xml\n';
feedTable+='/news/	http://feeds.latimes.com/latimes/news/	http://xml.latimes.com/news/rss2.0.xml\n';
feedTable+='/news/nationworld/world/africa/	http://feeds.latimes.com/latimes/africa/	http://xml.latimes.com/news/nationworld/world/africa/rss2.0.xml\n';
feedTable+='/news/nationworld/world/asia/	http://feeds.latimes.com/latimes/asia/	http://xml.latimes.com/news/nationworld/world/asia/rss2.0.xml\n';
feedTable+='/news/nationworld/world/europe/	http://feeds.latimes.com/latimes/europe/	http://xml.latimes.com/news/nationworld/world/europe/rss2.0.xml\n';
feedTable+='/news/nationworld/world/latinamerica/	http://feeds.latimes.com/latimes/latinamerica/	http://xml.latimes.com/news/nationworld/world/latinamerica/rss2.0.xml\n';
feedTable+='/news/nationworld/world/middleeast/	http://feeds.latimes.com/latimes/middleeast/	http://xml.latimes.com/news/nationworld/world/middleeast/rss2.0.xml\n';

function setPath() {
	var tHref = document.location.toString();
	var tSplit = new Array();
	var sectionPath='';
	tSplit = tHref.split('/');
	//alert(tSplit.length);
	
	if (tSplit[2]=='latimes.design.tii.trb' || tSplit[2]=='latimes.testprod.rc.trb' || tSplit[2]=='latimes.test.tii.trb' || tSplit[2]=='www.latimes.com' ) {
   		if (tSplit.length>=8) sectionPath='/'+tSplit[3]+'/'+tSplit[4]+'/'+tSplit[5]+'/'+tSplit[6]+'/';
		else if (tSplit.length==7) sectionPath='/'+tSplit[3]+'/'+tSplit[4]+'/'+tSplit[5]+'/';
		else if (tSplit.length==6) sectionPath='/'+tSplit[3]+'/'+tSplit[4]+'/';
		else if (tSplit.length==5) sectionPath='/'+tSplit[3]+'/';
		
	//alert(sectionPath);
	var s=feedTable.indexOf(sectionPath);
	
		if (s!=-1) {
			var v=feedTable.indexOf('\n', s+1);
		if (v!=-1) {
			var w=feedTable.substring(s, v);
			tSplit=w.split('\t');
			xmlPath=escape(tSplit[1]);
			rawXml= tSplit[2];
		}

		}
		else xmlPath='';
		
	//write story widget for sections without rss feeds
	//var t1Host=document.location.hostname;

	if (xmlPath == "") {
	
		var _s1='&nbsp;&nbsp;&nbsp;';
		var _l1=document.location.href; //+'%3Ftrack='
		var _t1=document.title;
		var _y1='';
	
		var _diggwire='http://digg.com/submit?phase=2&url=' +_l1+'&title='+ encodeURIComponent(_t1) +'&bodytext='+ _y1; //no need to encode bodytext';
			_diggwire='<a target="_blank" href="'+_diggwire+'" onClick="setVars(_ss1)">';
	
		var _gglewire='http://www.google.com/bookmarks/mark?op=add&title='+ _t1+'&labels=&annotation='+_y1+'&bkmk=' + _l1;
			_gglewire='<a target="_blank" href="'+_gglewire+'" onClick="setVars(_ss2)">';
	
		var _yhoowire='http://myweb.search.yahoo.com/myresults/bookmarklet?ei=UTF-8&u='+encodeURIComponent(_l1)+'&t='+escape(_t1)+'&d='+_y1; //+'\'&popup=true';
			_yhoowire='<a href="http://myweb.search.yahoo.com/" onClick="setVars(_ss3, \''+_yhoowire+'\'); return false;" >';
	
		var _deliwire='http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(_l1)+'&title='+escape(_t1)+'&notes='+_y1;
	            _deliwire='<a href="http://del.icio.us/" onClick="setVars(_ss4, \''+_deliwire+'\'); return false;" >';
	
		var _reddwire='http://reddit.com/submit?url='+ _l1+'&title='+ _t1;
	            _reddwire='<a target="_blank" href="'+_reddwire+'" onClick="setVars(_ss5)">';
	
		var _face2wire='http://www.facebook.com/sharer.php?u='+encodeURIComponent( _l1)+'&t='+escape(_t1);
	            _face2wire='<a href="http://www.facebook.com/" onClick="setVars(_ss6, \''+_face2wire+'\'); return false;" >';
	
		var _vinewire='http://www.newsvine.com/_wine/save?aff=latimes&h='+escape(_t1)+'&e='+_y1+'&u='+encodeURIComponent(_l1)+'&t1=';
			_vinewire='<a href="http://www.newsvine.com/" onClick="setVars(_ss7, \''+_vinewire+'\'); return false;" >';

		var _mixxwire='http://www.mixx.com/submit/story?page_url='+escape(_l1)+'&title='+escape(_t1)+'&description='+encodeURIComponent(unescape(_y1))+'&partner=LAT';
			_mixxwire='<a target="_blank" href="'+_mixxwire+'" onClick="setVars(_ss11)" >';

	var _myspacewire="javascript:GetThis('" + encodeURIComponent(_t1) + "', '"+_y1+"', '"+_l1+"', 5)";
	_myspacewire='<a href="'+_myspacewire+'" title="Post to MySpace!">';
			
		if (document.getElementById('socialnet')) {
		  var _ss='&nbsp;'; // 3 non breaking spaces

  document.write('<style type="text/css">');
  document.write('#newsocialnet { margin:0 1px; }');
  document.write('#newsocialnet a { margin-left:10px; }');
  document.write('#newsocialnet img { margin:4px 0; border-top:1px solid #cdcdcd; border-bottom:0px; vertical-align:middle; }');
  document.write('#socialnet {border-bottom: 0px; padding-bottom:2px;}');
  document.write('</style>');
		  
		var newstorywidgetwire='<div id="newsocialnet" style="height:28px; padding-left:4px;">';
		newstorywidgetwire+='<span style="font:11px Arial;vertical-align:text-top;">';
		newstorywidgetwire+='<span style="margin-top:1px;"><strong>Save</strong>/Share</span>';	
		newstorywidgetwire+=_mixxwire+'<img border="0" title="Mixx" src="http://www.latimes.com/images/mylatimes/mixx.gif"/></a>'+_ss;
		newstorywidgetwire+=_gglewire+'<img border="0" title="Google" src="http://www.latimes.com/images/mylatimes/google.gif"/></a>'+_ss;
		newstorywidgetwire+=_diggwire+'<img border="0" title="Digg" src="http://www.latimes.com/images/mylatimes/digg.gif"/></a>'+_ss;
		newstorywidgetwire+=_deliwire+'<img border="0" title="Del.icio.us" src="http://www.latimes.com/images/mylatimes/delicious.gif"/></a>'+_ss;
		newstorywidgetwire+=_reddwire+'<img border="0" title="Reddit" src="http://www.latimes.com/images/mylatimes/reddit.gif"/></a>'+_ss;
		newstorywidgetwire+=_face2wire+'<img border="0" title="Facebook" src="http://www.latimes.com/images/mylatimes/facebook.gif"/></a>'+_ss;
		newstorywidgetwire+=_yhoowire+'<img border="0" title="Yahoo" src="http://www.latimes.com/images/mylatimes/yahoo.gif"/></a>'+_ss;
		newstorywidgetwire+=_vinewire+'<img border="0" title="Newsvine" src="http://www.latimes.com/images/mylatimes/newsvine.gif"/></a>'+_ss;
		newstorywidgetwire+=_myspacewire+'<img src="http://www.latimes.com/images/mylatimes/myspace.gif" border="0" alt="Post to MySpace!" /></a>'+_ss;
		newstorywidgetwire+='</span></div>';
		document.getElementById('socialnet').innerHTML=newstorywidgetwire;
	        }
    	}
	//end write story widget
	}
}

function checkUrl() {
	envUrl = '';
	if (top.location.href.indexOf('.trb/') > -1) { envUrl = 'qa.'; }
}

function submylatimes(tVar) {
 checkUrl();
	//alert('submylatimes '+xmlPath);
	var tHost=document.location.hostname;
	if (tHost=='latimes.design.tii.trb' || tHost=='latimes.testprod.rc.trb' || tHost=='latimes.test.tii.trb' || tHost=='www.latimes.com') {
	
		if (xmlPath!='') {
			if (tVar=='flashwidget') window.location= 'http://' + envUrl + 'my.latimes.com/add_feed_external?link='+xmlPath;
			else if (tVar=='') storyWriteDiv();
		}	
	}
}

function storyWriteDiv() {
	checkUrl();
	// alert('storyWriteDiv');
    // Only write out if on an article page
    if (document.URL.indexOf(',') != -1) {
	
	var moreLink = unescape(xmlPath);
	// alert(moreLink);
	
	var _s='&nbsp;&nbsp;&nbsp;';
	var _l=document.location.href; //+'%3Ftrack='
	var _t=document.title;
	var _y='';
	
	if (document.getElementById('mltSubhead')) _y=escape(document.getElementById('mltSubhead').value);

        //var _digg='http://digg.com/submit?phase=2&url=' +_l+'&title='+ encodeURIComponent(_t) +'&bodytext='+ encodeURIComponent(_y); //+'&bodytext=sample abstract for story';
        var _digg='http://digg.com/submit?phase=2&url=' +_l+'&title='+ encodeURIComponent(_t) +'&bodytext='+ _y; //no need to encode bodytext';
			_digg='<a target="_blank" href="'+_digg+'" onClick="setVars(_ss1)">';
			
		var _ggle='http://www.google.com/bookmarks/mark?op=add&title='+ _t+'&labels=&annotation='+_y+'&bkmk=' + _l;
			_ggle='<a target="_blank" href="'+_ggle+'" onClick="setVars(_ss2)">';
			
		var _yhoo='http://myweb.search.yahoo.com/myresults/bookmarklet?ei=UTF-8&u='+encodeURIComponent(_l)+'&t='+escape(_t)+'&d='+_y; //+'\'&popup=true';
			_yhoo='<a href="http://myweb.search.yahoo.com/" onClick="setVars(_ss3, \''+_yhoo+'\'); return false;" >';
			
		var _deli='http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(_l)+'&title='+escape(_t)+'&notes='+_y;
			//_deli='<a href="http://del.icio.us/" onClick="void(setVars(_ss4);window.open(\''+_deli+'\', \'delicious\',\'toolbar=no,width=700,height=420\');)">';
			_deli='<a href="http://del.icio.us/" onClick="setVars(_ss4, \''+_deli+'\'); return false;" >';
			
		var _redd='http://reddit.com/submit?url='+ _l+'&title='+ _t;
			_redd='<a target="_blank" href="'+_redd+'" onClick="setVars(_ss5)">';
			
		var _face2='http://www.facebook.com/sharer.php?u='+encodeURIComponent( _l)+'&t='+escape(_t);
			_face2='<a href="http://www.facebook.com/" onClick="setVars(_ss6, \''+_face2+'\'); return false;" >';
			
		var _vine='http://www.newsvine.com/_wine/save?aff=latimes&h='+escape(_t)+'&e='+_y+'&u='+encodeURIComponent(_l)+'&t=';
			_vine='<a href="http://www.newsvine.com/" onClick="setVars(_ss7, \''+_vine+'\'); return false;" >';

		var _mixx='http://www.mixx.com/submit/story?page_url='+escape(_l)+'&title='+escape(_t)+'&description='+encodeURIComponent(unescape(_y))+'&partner=LAT';
			_mixx='<a target="_blank" href="'+_mixx+'" onClick="setVars(_ss11)" >';
		
	var _myspace="javascript:GetThis('" + escape(_t) + "', '"+encodeURIComponent(unescape(_y))+"', '"+escape(_l)+"', 5)";
		_myspace='<a href="'+_myspace+'" title="Post to MySpace!">';
	
	//document.write('<div id="mltpromo" class="content11" style="background-color:#FFFFFF;text-align:left;line-height:20px;"><table border="0" cellpadding="4" style="line-height:12px;border-top:1px solid #eee;border-bottom:1px solid #ccc"><tr><td><strong>Subscribe</strong><br />to Section</td>');
	
	//document.write('<td><a href="http://' + envUrl + 'my.latimes.com/add_feed_external?link='+xmlPath
	//			   +'" onClick="setVars(_ss8)"><img border=0 src="/images/mylatimes/mlt-2.gif" title ="Add to MyLATimes" alt="Add to MyLATimes"></a></td>');
	
	//document.write('<td><br /><a href="'+ moreLink +'">More RSS Readers&nbsp;&gt;</a></td></tr></table></div>');


	if (document.getElementById('socialnet')) {
		var _ss='';
		
  document.write('<style type="text/css">');
  document.write('#newsocialnet { margin:0 1px; }');
  document.write('#newsocialnet a { margin-left:10px; }');
  document.write('#newsocialnet img { margin:4px 0; border-top:1px solid #cdcdcd; border-bottom:0px; vertical-align:middle; }');
  document.write('#socialnet {border-bottom: 0px; padding-bottom:2px;}');
  document.write('</style>');

		
	var newstorywidget='<div id="newsocialnet" style="height:28px; padding-left:4px;">';
	newstorywidget+='<span style="font:11px Arial;vertical-align:text-top;">';
	newstorywidget+='<span style="margin-top:1px;"><strong>Save</strong>/Share</span>';
	
	_mixx=_mixx.replace(encodeURIComponent("latimes.testprod.rc.trb"), encodeURIComponent("www.latimes.com"));
	newstorywidget+=_mixx+'<img border="0" title="Mixx" src="http://www.latimes.com/images/mylatimes/mixx.gif" /></a>'+_ss;
	newstorywidget+=_ggle+'<img border="0" title="Google" src="http://www.latimes.com/images/mylatimes/google.gif" /></a>'+_ss;
	newstorywidget+=_digg+'<img border="0" title="Digg" src="http://www.latimes.com/images/mylatimes/digg.gif" /></a>'+_ss;
	newstorywidget+=_deli+'<img border="0" title="Del.icio.us" src="http://www.latimes.com/images/mylatimes/delicious.gif" /></a>'+_ss;
	newstorywidget+=_redd+'<img border="0" title="Reddit" src="http://www.latimes.com/images/mylatimes/reddit.gif" /></a>'+_ss;
	newstorywidget+=_face2+'<img border="0" title="Facebook" src="http://www.latimes.com/images/mylatimes/facebook.gif" /></a>'+_ss;
	newstorywidget+=_yhoo+'<img border="0" title="Yahoo" src="http://www.latimes.com/images/mylatimes/yahoo.gif" /></a>'+_ss;
	newstorywidget+=_vine+'<img border="0" title="Newsvine" src="http://www.latimes.com/images/mylatimes/newsvine.gif" /></a>'+_ss;
	newstorywidget+=_myspace+'<img src="http://www.latimes.com/images/mylatimes/myspace.gif" border="0" alt="Post to MySpace!" /></a>'+_ss;	
	newstorywidget+='</span></div>';
	document.getElementById('socialnet').innerHTML=newstorywidget;
		}
    }
}

setPath();
checkUrl();

function writeFlashSpan() {

}

function setVars(oVar, oData){
	if (oVar=='Yahoo') void(window.open(oData, 'MyWeb', 'toolbar=no,width=800,height=540,resizable=yes'));
	else if (oVar=='Delicious') void(window.open(oData, 'delicious', 'toolbar=no,width=700,height=290,resizable=yes'));
	else if (oVar=='Facebook') void(window.open(oData, 'sharer', 'toolbar=no,width=642,height=436,resizable=yes'));
	else if (oVar=='Newsvine') void(window.open(oData, 'newsvine', 'width=650,height=445,resizable=yes,scrollbars=no'));
	
   omnVar = oVar;
   //alert(omnVar);
   var s=s_gi(s_account);
     s.linkTrackVars='events,eVar27';
     s.linkTrackEvents='event11';
     s.events='event11';
     s.eVar27= omnVar;
     void(s.tl(this,'o','Social Bookmark Click')); 
     s.events = '';
     s.eVar27 = '';
     s.linkTrackVars = 'None';
     s.linkTrackEvents = 'None'; 
}

function GetThis(T, C, U, L) 
{ 
var targetUrl = 'http://www.myspace.com/Modules/PostTo/Pages/?' + 't=' + encodeURIComponent(T) + '&c=' + encodeURIComponent(C) + '&u=' + encodeURIComponent(U) + '&l=' + L; window.open(targetUrl); 
}