var mlist_ad=new Array("&lt;br&gt;","</p>")
var tot, b, c;
document.writeln('<link href="http://www.eai.in/ml/screen.css" rel="stylesheet" type="text/css" />');
var url = window.location.href;
if(url.match("sol")){
	 var $information="<div class='info' style='margin-bottom:20px'><p class='info_head'>Solar Shines while Diesel Whines</p><p>India Inc. turns to solar to fight against diesel price increase</p><p>As the price of diesel continues to increase, thousands of companies in India have started debating whether it is time for them to start looking at solar PV as a replacement for diesel as a source for backup power. Solar PV photovoltaic can work on small scales, be distributed in nature and being able to provide a reliable power for 25 years with the same system.</p><p>With the costs of solar panels falling significantly over the past few years, the use of solar PV for off-grid, captive power production in India is expected to increase significantly.</p><p>A survey conducted by EAI suggests that the growth in captive, off-grid solar PV installations in India will grow by a CAGR of over 100% until 2015 – essentially, a more than doubling of the annual installed capacity every year.</p><p>If your company too is interested in exploring solar PV as a replacement for diesel for backup power, you can get to know more, from here - <br><a href='http://www.eai.in/ref/reports/captive_power.html'>http://www.eai.in/ref/<br>reports/captive_power.html</a></p></div>";}
	
	
	
	else if(url.match("bio")){
					var $information="<div class='info' style='margin-bottom:20px'><p class='info_head'>Escape Velocity for Indian Villages via Biomass Gasification</p><p>Biomass gasification fastest way to electrify villages, says study</p><p>Currently, over 60,000 Indian villages have no access to electricity, and most of these require less than 100 kW of installed capacity. Recent news items and reports suggest that India could see a significant acceleration in the adoption of biomass gasification as the route for power production, especially for capacities lower than 2 MW.</p><p>Biomass gasification has significant advantages over other methods of biomass power. It can work well at small scales (as low as 50 kW), can use a wide variety of biomass feedstocks and also produce a valuable co-product in biochar.</p><p>While the current installed capacity of biomass gasification based power plants in India is less than 125 MW, it is expected that by 2015 this could be as high as 500 MW, thus having a CAGR of over 40% for the period 2011-15.</p> <p>For entrepreneurs and businesses keen on knowing more about the opportunities in biomass gasification power in India, the India Biomass Gasification Power Production report will be of immense help. For more about this report, see here - <br><a href='http://www.eai.in/ref/reports/biomass_gasification.html'>http://www.eai.in/ref/reports/<br>biomass_gasification.html</a></p></div>";
					
					}
					
					else{
						var $information="<div class='info' style='margin-bottom:20px'><p class='info_head'>Sun Shines on Modules in India</p><p>India presents an attractive market for solar module makers, says EAI study</p><p>Latest news reports suggest significant interest among Indian companies to enter the solar PV module production segment.</p><p>With the presence of a local content requirement that mandates the use of locally produced solar modules for the solar PV power plants under the National Solar Mission, there could be a significant increase in the demand for solar PV modules made in India.</p><p>Projections by EAI suggest that while the current installed capacity for modules in India is about 1000 MW, this installed capacity is set to grow significantly over the next two years. EAI predicts that the country will have a total installed capacity of about 2400 MW of modules by 2013, showing a CAGR of over 50% for the period 2011-13. This capacity will cater to the enhanced requirements in the Indian market for solar PV power plants, and, with the fast growth in the global installed capacity of solar PV power plants, to the international markets as well.</p><p>These prospects have made solar PV module making an attractive business opportunity for Indian companies, and a number of Indian entrepreneurs and businesses are keenly exploring this segment for investments.</p><p>To know more about the solar PV module market in India, have a look at the special report India Solar PV Module Market Report published by EAI - <br><a href='http://www.eai.in/ref/reports/solar/solar_pv_module.html'>http://www.eai.in/ref/reports/solar/<br>solar_pv_module.html</a></p></div>";
						} 

function doHighlight_mlist(bodyText, searchTerm, highlightStartTag, highlightEndTag,index)
{
  // the highlightStartTag and highlightEndTag parameters are optionalBiodiesel - Definition, Glossary, Details
  //alert(index);
  
  var newText = "";
  var i = -1;
  var lcSearchTerm = searchTerm.toLowerCase();
  var lcBodyText = bodyText.toLowerCase();
  var alm, almm, leng, ll, lll;
  var found=0;
  var no_fd;
  //alert(bodyText.length);
		    if(bodyText.length < 1000)
			   {
				   no_fd = 1;
				   
			   } else if(bodyText.length > 8000 && bodyText.length < 15000) {
				   no_fd = 2;
			   } else {
				   no_fd = 3;
			   }
  while (bodyText.length > 0) {
	//alert(i);
	i = lcBodyText.indexOf(lcSearchTerm, i+1);
	
	if (i < 0) {
	  newText += bodyText;
	  bodyText = "";
	} else {
		   if (bodyText.lastIndexOf("/a>", i) >= bodyText.lastIndexOf("<a", i)) {
			    //stip anything inside an table tag
			    if (lcBodyText.lastIndexOf("/table>", i) >= lcBodyText.lastIndexOf("<table", i)) {
		// skip anything inside a <script> block
		if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
				alm = bodyText.substr(i-1, searchTerm.length);
				almm = bodyText.substr(i+1, searchTerm.length);
				//var nmm = bodyText.substring(0, i);
				leng = alm.length;
				//alert(leng);
				ll = alm.charAt(0);
				lll = almm.charAt(leng-1);						   
		  //alert(lll);
		  var txt = bodyText.substring(0, i);
		  var tot_midl_worda = txt.length;
		 //alert(tot_midl_worda);
		  if((found < no_fd) && tot_midl_worda > 3000)
		  {
	  
	   if(found == 0)
	   {
 var url = window.location.href;

if(url.match("bio")){
highlightStartTag ='<a style="text-decoration:none" href="http://www.eai.in/ref/reports/biomass_gasification.html"><div class="catg" style="background-color:#f0f0f0; width:330px;text-align:center; padding:1px; "><p><span style="font-size:20px; color:#0066CC">Power from Biomass Gasification</span><br /><span style="font-size:14px; color:#993300; ">Technical and Economic Feasibility Report</span></p></div></a><br style="clear:both">';

}
else if(url.match("sol")){
highlightStartTag='<a style="text-decoration:none" href="http://www.eai.in/ref/reports/captive_power.html"><div class="catg" style="background-color:#f0f0f0; width:330px;text-align:center; padding:1px;"<p><span style="font-size:20px; color:#0066CC">Using Diesel Generators for Backup?</span><br /><span><b>Time You Shifted to Solar</b></span><br /><span style="font-size:14px; color:#993300; ">Know more from the “Replacing Diesel with Solar” report</span></p></div></a>';

}
else{
highlightStartTag='<a style="text-decoration:none" href="http://www.eai.in/ref/reports/captive_power.html"><div class="catg" style="background-color:#f0f0f0; width:330px;text-align:center; padding:1px; " ><p><span style="font-size:20px; color:#0066CC">Using Diesel Generators for Backup?</span><br /><span><b>Time You Shifted to Solar</b></span><br /><span style="font-size:14px; color:#993300; ">Know more from the “Replacing Diesel with Solar” report</span></p></div></a><br style="clear:both">';

}highlightEndTag = "";
			
		
		
				
	   }
else if(found ==1 ) {
	var url = window.location.href;
	highlightStartTag='<a href="http://www.eai.in/ref/services/download.php?name=Levi_Strauss_or_Also_Rans.pdf"><img src="http://www.eai.in/images/levis_strauss.png"/></a><br style="clear:both">';
	
	}highlightEndTag = "";
	   


		   
   //alert(found);
				newText += bodyText.substring(0, i) + bodyText.substr(i, searchTerm.length)+ highlightStartTag + highlightEndTag;  
				bodyText = bodyText.substr(i + searchTerm.length);
				lcBodyText = bodyText.toLowerCase();
				//alert(i);
				i = -1;
				found++;
				//alert(found);&& (found < 5) && (tot_link < 50)
		  }
		 
		}
		   }
	   }
	}
  }
  return newText;
}
function highlightSearchTerms_mlist(warnOnFailure, highlightStartTag, highlightEndTag)
{
	//alert(warnOnFailure);
 if (!document.body || typeof(document.body.innerHTML) == "") {
	  //alert(searchText);
    if (warnOnFailure) {
      alert("Sorry, for some reason the text of this page is unavailable. Searching will not work.");
    }
    //return false;
  }
 
  //var bodyText = document.body.innerHTML;
  var bodyText = document.getElementById('entry').innerHTML;
 
 
  for (var i = 1; i < mlist_ad.length; i++) {
    bodyText = doHighlight_mlist(bodyText, mlist_ad[i], highlightStartTag, highlightEndTag,i);
  }
  document.getElementById('entry').innerHTML = bodyText;
  $('.entry').prepend($information);
  return true;
}
highlightSearchTerms_mlist(false);
