//**********************
function fcTab(type)
{
	if((type == "front") && (isNav3 || isIE3))
	{
		document.write("<a href='Javascript:scrollSearch()' ><img src=http://interactive.wsj.com/media/fc-search-front-3.gif width=83 height=20 border=0></a>");
		return;
	}

	if(type == "techpage")
		coords="524,52,608,72";
	else if(type == "techart")
		coords="386,52,470,72";
	else if(type == "market_extra")	
		coords="386,98,470,118";
	else
		coords="180,52,264,72";

	if((!isNav3) && (type == "techpage"))
        	document.write("<MAP name=SearchTab><AREA SHAPE=RECT COORDS='31,8,95,63' HREF='/documents/toc.htm' ALT='[Table of Contents]'></MAP>");
	
	if(isNav3 && (!(type == "techpage")))
        	document.write("<MAP name=SearchTab><AREA   alt=[Search] coords="+coords+"   href=Javascript:scrollSearch() shape=RECT></MAP>");

	if(isNav3 && (type == "techpage"))
        	document.write("<MAP name=SearchTab><AREA   alt=[Search] coords="+coords+"   href=Javascript:scrollSearch() shape=RECT><AREA SHAPE=RECT COORDS='31,8,95,63' HREF='/documents/toc.htm' ALT='[Table of Contents]'></MAP>");
}

function scrollSearch()
{
	if(isNav3)
		scroll(250,0)
}
	
function skip(){
	if(isNav4)
		doc=document.layers['tombstones'].document;
	else
		doc=window.document;

	  var location = doc.forms["bs"].url.options[doc.forms["bs"].url.selectedIndex].value;
	
	  //top.location.href=location;
	
	if(location != "")
	{
		newWindow=window.open(location, 'evolve', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=700');
		
		if(!isIE4)
		{
			newWindow.focus();
		}
	}	

	return false;
}
	
//**********************
function fc(family,ad_family)
{
	random=Math.random();

	if(!ad_family)
		ad_family='topbiz';

	if(family == 'front')
		ed_promo=front_promo;
	else if(family == 'tech')
		ed_promo=tech_promo;
	else if(family == 'money')
		ed_promo=money_promo;
	else if(family == 'market')
		ed_promo=market_promo;
	else if(family == 'market_extra')
		ed_promo=market_extra_promo;
	else
		ed_promo=front_promo;


	
	if(isNav3 || isIE3 )
	{
		ad_regular=
			'<b><font size=2 face=arial>Advertisements<br></font></b>'+
			'<a href="http://ad.doubleclick.net/jump/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';sz=120x240;ord='+random+'" target="_top">'+
			'<IMG SRC="http://ad.doubleclick.net/ad/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';sz=120x240;ord='+random+'" BORDER=0 WIDTH="120" HEIGHT="240" vspace="0" ALT="[Advertisement]"></A><BR CLEAR="ALL"><br>';

		ad=ad_regular;
	
		if(tombstones && (family == 'money'))
			ad=
				'<table cellpadding=0 cellspacing=0 border=1 bordercolor=#666666 width='+(tomb_width-14)+'><tr><td>'+
				'<table cellpadding=0 cellspacing=0 border=0 width=100%>'+
				'<tr><td bgcolor=#666666 align=center><font color=white size=2><b><nobr>ADVERTISEMENTS</nobr></b></font></td></tr>'+
				'<tr><td bgcolor=#cccc99 align=center><font color=white size=5><b><nobr>D E A L S</nobr></b></font></td></tr>'+
				'</table>'+
				'<table cellpadding=0 cellspacing=0 border=0 width=100%>'+
				'<tr><td align=left><a href="http://interactive.wsj.com/documents/fc-debt-eq.htm"><img src=http://interactive.wsj.com/media/fc-deals-3.gif border=0 height='+button_h+' width='+deals_button_w+' alt="'+deals_down_alt+'"></a></td></tr>'+
				'</table><center>'+
				ad_tombstones+
				'</td></tr></table>';
		document.writeln('<td valign=top width='+fc_width+' align=left rowspan=2>');

		if(family == 'front')		
			document.writeln('<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td align=right>'+
				'<img src='+spacer_gif+' width=1 height='+fc_front_top+'></td></tr></table>');
		
		if(family == 'market_extra')		
			document.writeln('<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td align=right>'+
				'<img src='+spacer_gif+' width=1 height='+fc_market_extra_top+'></td></tr></table>');

		document.writeln('<table  width=95% cellpadding=0 cellspacing=0 border=1><tr><td>');

		document.writeln(''+
			articles_search+
			quotes_search+
			'</td></tr><tr><td align=center>'+
			'<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=white align=right><img src='+spacer_gif+' width=1 height=10></td></tr></table>'+
			ed_promo+
			'<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=white align=right><img src='+spacer_gif+' width=1 height=10></td></tr></table>'+
		
			ad+

			'</td></tr></table>')
		document.writeln('</td>');
		return;	
	}

	if(isIE4 || isIE5)
		insideWindowWidth=document.body.clientWidth;
	if(isNav4)
		insideWindowWidth=window.innerWidth;
			
	x_out =tomb_left_0+tomb_width;

	search_button_w=87;
	search_button_h=22;
	spacer=2;
	z0=2;
	if(isNav4)
		z0=3;
	z1=2;
	d0=0;
	
	search_out=new Image();
	search_out.src="http://interactive.wsj.com/media/fc-search-out.gif";
	search_left=new Image();
	search_left.src="http://interactive.wsj.com/media/fc-search-left.gif";
	search_right=new Image();
	search_right.src="http://interactive.wsj.com/media/fc-search-right.gif";
	
	articles_down=new Image();
	articles_down.src="http://interactive.wsj.com/media/fc-articles-down.gif";
	articles_up=new Image();
	articles_up.src="http://interactive.wsj.com/media/fc-articles-up.gif";
	quotes_down=new Image();
	quotes_down.src="http://interactive.wsj.com/media/fc-quotes-down.gif";
	quotes_up=new Image();
	quotes_up.src="http://interactive.wsj.com/media/fc-quotes-up.gif";
	company_down=new Image();
	company_down.src="http://interactive.wsj.com/media/fc-company-down.gif";
	company_up=new Image();
	company_up.src="http://interactive.wsj.com/media/fc-company-up.gif";
	deals_down=new Image();
	deals_down.src="http://interactive.wsj.com/media/fc-deals-down.gif";
	deals_up=new Image();
	deals_up.src="http://interactive.wsj.com/media/fc-deals-up.gif";

	if(family == 'front')
	{
		d0=15;
		search_out.src="http://interactive.wsj.com/media/fc-search-front-out.gif";
		search_left.src="http://interactive.wsj.com/media/fc-search-front-left.gif";
		search_right.src="http://interactive.wsj.com/media/fc-search-front-right.gif";

		ed_promo=front_promo;
		spacer=10;
		search_button_top+=33;
		if(isIE4 || isIE5)
			search_button_top+=1;
		
		search_button_left=526;
		search_button_left=528;
		search_button_w=88;
		search_button_h=27;
		tomb_left_0=615;
		z0=8;
		z1=2;
	}
	else if(family == 'tech')
		ed_promo=tech_promo;
	else if(family == 'money')
		ed_promo=money_promo;
	else if(family == 'market')
		ed_promo=market_promo;
	else if(family == 'market_extra')
	{
		ed_promo=market_extra_promo;
		tomb_top+=33;
		search_button_top+=48;
		if(isIE4 || isIE5)
			search_button_top+=1;
			
		spacer=8;	
		z0=5;
		z1=2;
		
	}	
	else 
		ed_promo=front_promo;
	
	d1=tomb_top+button_h+z0+d0;
	d2=tomb_top+2*button_h+spacer+z0+d0;
	d3=tomb_top+3*button_h+2*spacer+z0+d0-1;

	if(insideWindowWidth>x_out)
	{
		state='out';
		cursor='text';
		search_alt=search_out_alt;
	}
	else
	{
		state='left';
		cursor='hand';
		search_alt=search_in_alt;
	}

	
	document.writeln('<td valign=top width='+tomb_width+' align=center rowspan=2>')
	
	if(isNav4)
	{
		document.writeln('<layer id=tombstones  class=tom left='+tomb_left_0+' width='+tomb_width+' top='+tomb_top+' background=http://interactive.wsj.com/media/fc-bgline.gif Z-INDEX=2>')
		if(family == 'front')
			document.writeln('<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td bgcolor=#ffffff><img src='+spacer_gif+' width=1 height='+d0+'></td></tr></table>')
		document.writeln('<center><table cellpadding=0 cellspacing=0 border=0 width='+(tomb_width-4)+'>'+
			'<tr height=2><td bgcolor=#777777><img src='+spacer_gif+' width=1 height=2></td></tr>'+
			'</table>'
		)
	}
	
	if(isIE4 || isIE5)
	{
		document.writeln('<div id=tombstones style="position=absolute;z-index:0;left='+tomb_left_0+';top='+tomb_top+';width='+tomb_width+';visibility=visible;background-image:url(http://interactive.wsj.com/media/fc-bgline.gif);" >')
		if(family == 'front')
			document.writeln('<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td bgcolor=#ffffff><img src='+spacer_gif+' width=1 height='+d0+'></td></tr></table>')
		document.writeln('<center><table cellpadding=0 cellspacing=0 border=0 width='+(tomb_width-4)+'>'+
			'<tr height=2><td bgcolor=#777777><img src='+spacer_gif+' width=1 height=2></td></tr>'+
			'</table>')
	}

	document.writeln(
		'<center>'+

		'<table cellpadding=0 cellspacing=0 border=0 background=http://interactive.wsj.com/media/fc-bg.gif width='+(tomb_width-8)+'>'+
		'<tr><td><img src='+spacer_gif+' width=1 height='+z0+'></td></tr>'+
		'<tr><td><a href="" onClick="change(\'articles\');return false;"><img id=articles name=articles src='+articles_down.src+' border=0 height=21 width='+button_w+' alt="'+articles_down_alt+'"></a></td></tr>'+
		'<tr><td><img src='+spacer_gif+' width=1 height='+spacer+'></td></tr>'+
		'<tr><td><a href="" onClick="change(\'quotes\');return false;"><img id=quotes name=quotes src='+quotes_down.src+' border=0 height=21 width='+button_w+' alt="'+quotes_down_alt+'"></a></td></tr>'+
		'<tr><td><img src='+spacer_gif+' width=1 height='+spacer+'></td></tr>'+
		'<tr><td><a href="" onClick="change(\'company\');return false;"><img id=company name=company src='+company_down.src+' border=0 height=21 width='+button_w+' alt="'+company_down_alt+'"></a></td></tr>'+
		'<tr><td><img src='+spacer_gif+' width=1 height='+z1+'></td></tr>'+
		'</table>'+
		'<img src='+spacer_gif+' width=100 height=10>'+

		ed_promo+
	
		'<img src='+spacer_gif+' width=100 height=10 ><br>'
	
	)

	if(isNav4)
	{
		if(tombstones && (family == 'money'))
		{
			document.writeln('<ilayer name=deals >'+
				'<table cellpadding=0 cellspacing=0 border=1 bordercolor=#666666 width='+(tomb_width-14)+'><tr><td>'+
				'<table cellpadding=0 cellspacing=0 border=0 width=100%>'+
				'<tr><td bgcolor=#666666 align=center><font color=white><b><span class=tombad><nobr>A D V E R T I S E M E N T S</nobr></span></b></font></td></tr>'+
				'<tr><td bgcolor=#cccc99 align=center><font color=white><b><span class=dealsad><nobr>D E A L S</nobr></span></b></font></td></tr>'+
				'</table>'+
				
				''+
				'<center>'+
				'<table cellpadding=0 cellspacing=0 border=0 width=100%>'+
				'<tr><td align=left><a href="" onClick="change(\'deals\');return false;"><img id=deals name=deals src='+deals_down.src+' border=0 height=21 width='+deals_button_w+' alt="'+deals_down_alt+'"></a></td></tr>'+
				'</table>'+
				'<table cellpadding=3 cellspacing=0 border=0 width=100%><tr><td align=center>'+
				ad_tombstones+
				'</td></tr></table>'+
				'</td></tr></table></ilayer>'					
			);
		}	
		else if(isMoz401)
			document.writeln('<span class=ad-tit>Advertisements</span>'+
				'<a href="http://ad.doubleclick.net/jump/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';sz=120x240;ord='+random+'" target="_top">'+
				'<IMG SRC="http://ad.doubleclick.net/ad/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';sz=120x240;ord='+random+'" BORDER=0 WIDTH="120" HEIGHT="240" vspace="0" ALT="[Advertisement]"></A><BR CLEAR="ALL"><br>');
		else
			document.writeln('<span class=ad-tit>Advertisements</span>'+
				'<br><ilayer id=adv height=240 width=120 left='+((tomb_width-120)/2)+'></ilayer>');
	}		


	
	if(isIE4 || isIE5)
	{
		if(tombstones && (family == 'money'))
			document.writeln(
				'<table cellpadding=0 cellspacing=0 border=1 bordercolor=#666666 width='+(tomb_width-14)+'><tr><td>'+
				'<table cellpadding=0 cellspacing=0 border=0 width=100%>'+
				'<tr><td bgcolor=#666666 align=center><font color=white><b><span class=tombad><nobr>A D V E R T I S E M E N T S</nobr></span></b></font></td></tr>'+
				'<tr><td bgcolor=#cccc99 align=center><font color=#009999><b><span class=dealsad><nobr>D E A L S</nobr></span></b></font></td></tr>'+
				'</table>'+
				'<table cellpadding=0 cellspacing=0 border=0 width='+deals_button_w+'>'+
				'<tr><td align=left><a href="" onClick="change(\'deals\');return false;"><img  id=deals  src='+deals_down.src+' border=0 height='+button_h+' width='+deals_button_w+' alt="'+deals_down_alt+'"></a></td></tr>'+
				'</table>'+
				'<table cellpadding=3 cellspacing=0 border=0 width=100%><tr><td align=center>'+
				ad_tombstones+
				'</td></tr></table>'+
				'</td></tr></table>'		
			);
		else
		document.writeln('<span class=ad-tit>Advertisements</span><iframe  id=ad-v SRC="http://ad.doubleclick.net/adi/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';sz=120x240;ord='+random+'" width=120 height=240 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor="#000000"></iframe>');

		document.writeln(
			'<table width=100% cellpadding=0 cellspacing=0 border=0><tr height=2><td><spacer type=block height=2></td></tr></table>'
			);
	}		

	if(family == 'tech') 
	{
		document.writeln(
			'<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td height=10></td></tr></table>'
			);
		document.writeln(
		'<center><table width=156>'+
		'<form name=bs>'+
		'<tr>'+
		"<td bgcolor=black align=center><a href=http://www.bearstearns.com/evolvead/evolvea.htm target=evolve onClick=\"newWindow=window.open('http://www.bearstearns.com/evolvead/evolvea.htm', 'evolve', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=700');if(!isIE4) newWindow.focus();return false;\"><img src=/media/fc-bearstearn.gif "+
		'width=140 height=50 vspace=3 hspace=3 border=0></a>'+
		'<br>'+
		'<SELECT NAME=url onChange="return skip();">'+
		'<OPTION value="">Click for Report'+   
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvea.htm>About Report'+   
		'<OPTION value=http://www.bearstearns.com/evolvead/evolveb.htm>Introduction'+   
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvec.htm>Invstmt Strtgy'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolved.htm>Economics'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvee.htm>Emerging Mkts'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvef.htm>Accounting'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolveg.htm>Technology'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolveh.htm>Media'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvei.htm>Telecom'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvej.htm>Basic Industry'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvek.htm>Comm Srvcs'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvel.htm>Consumer'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvem.htm>Energy'+ 
		'<OPTION value=http://www.bearstearns.com/evolvead/evolven.htm>Fin Services'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolveo.htm>Health Care'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolvep.htm>Infrastructure'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolveq.htm>Europe'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolver.htm>Asia'+
		'<OPTION value=http://www.bearstearns.com/evolvead/evolves.htm>Latin America'+
		
		'</select>'+
		'<br>'+
		'<span class=fc-bs>FREE Technology Research!</span>'+
		'</td></form></tr></table>'
		);
	}

	document.writeln(
		'<br><span class=ad-tit>Special Advertising Section: <a href=http://public.wsj.com/ads/specials/europe.html>Europe Online</a></span>'
		);

	document.writeln(
		'<table width=100% cellpadding=0 cellspacing=0 border=0><tr height=5><td><spacer type=block height=5 width=140></td></tr></table>'
		);


	if(isNav4)
	{
		document.writeln(
			'<table cellpadding=0 cellspacing=0 border=0 width='+(tomb_width-4)+'>'+
			'<tr height=2><td bgcolor=#777777><img src='+spacer_gif+' width=1 height=2></td></tr>'+
			'</table>'+
			'</layer>'+

			'<layer id=arr name=arr left='+search_button_left+' top='+search_button_top+'><a href="" onclick="dealsMouseClick(\''+family+'\');return false;"><img id=arrim name=arrim src="'+eval("search_"+state+".src")+'" border=0 width='+search_button_w+' height='+search_button_h+' alt="'+search_alt+'"></a>'+
			'</layer>'
			)

		if((!tombstones || !(family == 'money')) && !isMoz401)
			document.writeln('<layer id=adl src="http://ad.doubleclick.net/adl/cfour.wsj.com/demo_yes.htm;famil='+ad_family+';abr=!ie4;abr=!ie5;sz=120x240;ord='+random+'" visibility=hide onload="moveToAbsolute(tombstones.document.adv.pageX,tombstones.document.adv.pageY);visibility=\'show\';"></layer>');

		document.writeln(
			'<layer top='+d1+' class=panel bgcolor=#dedede name=articles-panel z-index=6 left='+(tomb_left_0+3)+' width='+(button_w-2)+' visibility=hidden>'+
			articles_expanded+
			'</layer>'+		

			'<layer top='+d2+' class=panel bgcolor=#dedede name=quotes-panel z-index=6 left='+(tomb_left_0+3)+' width='+(button_w-2)+' visibility=hidden>'+
			quotes_expanded+
			'</layer>'+		

			'<layer top='+d3+' class=panel bgcolor=#dedede name=company-panel z-index=6 left='+(tomb_left_0+3)+' width='+(button_w-2)+' visibility=hidden>'+
			company_expanded+
			'</layer>'+		

			'<layer top=30 id=temp class=temp bgcolor=dedede name=temp z-index=6 width='+(button_w-4)+' visibility=hidden height=0>'+
			'</layer>'	

		)
		if(tombstones && (family == 'money'))
		{
			document.writeln(
				'<layer top='+(55+button_h+document.tombstones.document.deals.pageY)+' class=panel bgcolor=#dedede name=deals-panel z-index=6 left='+(tomb_left_0+(tomb_width-deals_button_w)/2)+' width='+(deals_button_w)+' visibility=hidden>'+
				deals_expanded+
				'</layer>'
			)		
		}
	}

	if(isIE4 || isIE5)
	{
		document.writeln(
			'<table cellpadding=0 cellspacing=0 border=0 width='+(tomb_width-4)+'>'+
			'<tr height=2><td bgcolor=#777777><img src='+spacer_gif+' width=1 height=2></td></tr>'+
			'</table>'+
			
			'</div>'+
		
			'<div id=arr style="position:absolute;z-index:100;left:'+search_button_left+';top:'+search_button_top+';width:'+search_button_width+';cursor:'+cursor+';">'+
				'<img id=search onclick=dealsMouseClick("'+family+'") src="'+eval("search_"+state+".src")+'" alt="'+search_alt+'">'+
			'</div>'+
		
			'<div id=articles-panel class=panel style="padding:3px;position:absolute;top:'+d1+';background:#dedede;z-index:6;left:'+(tomb_left_0+3)+';width:'+(button_w-2)+';visibility:hidden">'+
			articles_expanded+
			'</div>'+		

			'<div id=quotes-panel class=panel style="padding:3px;position:absolute;top:'+d2+';background:#dedede;z-index:6;left:'+(tomb_left_0+3)+';width:'+(button_w-2)+';visibility:hidden">'+
			quotes_expanded+
			'</div>'+		

			'<div id=company-panel class=panel style="padding:3px;position:absolute;top:'+d3+';background:#dedede;z-index:6;left:'+(tomb_left_0+3)+';width:'+(button_w-2)+';visibility:hidden">'+
			company_expanded+
			'</div>'+		

			'<div id=deals-panel class=panel style="left:'+(tomb_left_0+((tomb_width-deals_button_w)/2))+';top:0;padding:3px;position:absolute;background:#dedede;z-index:6;width:'+(deals_button_w)+';visibility:hidden">'+
			deals_expanded+
			'</div>'+		

			'<div id=temp class=temp style="position:absolute;top:0;left:610;background:dedede;z-index:60;width:'+(button_w-4)+';visibility:hidden;height:0;">'+
			'</div>'	
		);
	}
	
	document.writeln('</td>')
	tombObj=eval(layerRef+"[ 'tombstones' ]"+styleRef);
}
