function break_words(word_length,middle_string,input_string)
{
var re = new RegExp("[^ ]{"+word_length+",}","g");
if(!(str_ary = input_string.match(re)))return input_string;
for(var i=0;i<str_ary.length;i++)
{
newstr = str_ary[i].substring(0,word_length)+middle_string+str_ary[i].substring(word_length,str_ary[i].length);
input_string = input_string.replace(str_ary[i],newstr); } return input_string;
}

function google_ad_request_done(google_ads) 
{
	if (google_ads.length < 1 )
		return;
	var max_word_len=40;
	var break_char="<br>";

	if(google_ads.length == 1)
	{
		document.write('<table width=100% height="181"  border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #d0d7de ">');
	
		document.write('<tr height="45px"><td height="215" class="vads bb"><span class="bads"><a target="_blank" href="'+google_ads[0].url+'">'+ break_words(max_word_len,break_char,google_ads[0].line1) +'</a></span><br /><br /><a target="_blank" href="'+google_ads[0].url+'">'+break_words(max_word_len,break_char,google_ads[0].line2)+'&nbsp;'+break_words(max_word_len,break_char,google_ads[0].line3)+'</a><br /><br><span class="gads"><a target="_blank" href="'+google_ads[0].url+'">'+google_ads[0].visible_url+'</a></span></td></tr><tr><td bgcolor="#B02727" class="wads"><div align="right">Ads By Google&nbsp;</div></td></tr>');
		document.write('</table>');
	}
	else
	{
		document.write("<table width='100%' border='0' align='center' cellpadding='2' cellspacing='0' style='border:1px solid #d0d7de'><tr><td height='20' bgcolor='#993333' class='hf-toplinks'  style='padding-left:10px;'>");
	
		if (google_info.feedback_url) 
		{
			document.write('<a href=\"" + google_info.feedback_url +"\"><b>Ads by Google</b></a>');
		} 
		else 
		{
			document.write("<b >Ads By Google</b>");
		}
		document.write("</td></tr>");
		for(i = 0; i < google_ads.length; ++i)
		{
			var str="<tr><td height='60' style='padding-left:10px;' class='hf-htext'><a href=\"" +  google_ads[i].url + "\" target=\"_new\" onMouseover=\"window.status='" + google_ads[i].visible_url + "'; return true\" onMouseout=\"window.status=''; return true\" style=\"color:#0000FF \" ><b style='color:#993333;'>" + break_words(max_word_len,break_char,google_ads[i].line1) + "</b></a></span><br><span class=blacklink>" +"<a href=\"" +  google_ads[i].url + "\" target=\"_new\" onMouseover=\"window.status='" + google_ads[i].visible_url + "'; return true\" onMouseout=\"window.status=''; return true\" >" + break_words(max_word_len,break_char,google_ads[i].line2) +" "+ break_words(max_word_len,break_char,google_ads[i].line3) + "</a></span>&nbsp;&nbsp;<span class=blacklinku>" + "<a  href=\"" +  google_ads[i].url + "\" target=\"_new\" onMouseover=\"window.status='" + google_ads[i].visible_url + "'; return true\" onMouseout=\"window.status=''; return true\" style='color:blue;' >" + "<br>"+ break_words(max_word_len,break_char,google_ads[i].visible_url) +"</a>";
			document.write(str);
		}

		document.write ("</table>");
	}
}
//var names=new Array('home loan','finance','home finance','home','interior design','architect');
var names=new Array("home loan in India","home loan ","insurance","car loans","life insurance","ICICI loans","cheaper life insurance","deals on life insurance","Financial security","health insurance","investment policy","Investment security","mutual fund investment","Mutual Funds","Regular income options","Savings","types of insurance","insurance claims","life insurance industry","online insurance","general insurance ","insurance management","health","auctions","automobiles","cars","watches","televisions","refrigerators","stereo’s","CD","play station","music system","restaurants","hotels","phones","dictionary","wikipedia","train schedules","flight schedules","sudoku","games","Ring tones","cricket","football","soccer","FIFA","Tourism board","Kerala","Maharashtra","Karnataka","Goa","Chennai","Bangalore","Assam","Sikkim","Punjab","Incredible India","Toshiba","Philips","Whirlpool","Godrej","BPL","Onida","Haier","Havells","      Nokia","Samsung","Motorolla","Ben Que","Panasonic","Sony","LG","JVC","ICICI","Citibank","American Express","HDFC","HSBC","Oriental bank of commerce","LIC","SBI","Reliance insurance","TATA AIG","ICICI Lombard","Kotak finance","IDBI","PNB","Centurian bank","Bank of India","Titan","Timex","Omega","Swatch","Espirit","Levis","Nike","Reebok","Adidas","Yonex","Converse","Sprandi","Puma","Donations","NGO","Cry","UN","Times of India","Hindustan times","Airports","Ebay","NRI","Remittances","Money transfers","Stock tips","Stock market","Shares","Autocad","Autodesk","Cad","3D max","hardware","Delhi airfares","Chennai airfares","Mumbai airfares","Mumbai airlines","Digicams","Handycams","      Currency converters","Hutch","Airtel","Idea","Spice","Vaastu shastra","Fengshui","Construction equipments","Construction material","furniture","interiors","architects","interior designers","glass work","wood work","paintings","carpets","electrical fittings","switches","marble flooring","granite","bathroom fittings","wall tiles","mirrors","paintings","showpieces","home accessories","lamps","chandeliers","crystal");
namesize=names.length;
var ranNum= Math.round(Math.random()*namesize);

google_ad_client   = 'ca-99acres_site_js';
//google_bid= 'cpm,cpc';
google_ad_channel = 'misc_site';
google_ad_output   = 'js';
google_max_num_ads = '3';
google_ad_type   = 'text';
google_image_size   = '728x90';
google_color_line = "ff0000";
google_language  = 'en';
google_encoding  = 'latin1';
google_safe      = 'high';
google_adtest    = 'off';
google_kw = names[ranNum];
google_kw_type = 'broad';
google_page_url = 'http://www.99acres.com';
