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=35;
	var break_char="<br>";
	if(0)
	{
		document.write("<div style='padding:10px'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tbody>");
		URL =google_ads[0].url;
		document.write("<tr><td class='big_bdr'><table width='100%' border='0' cellspacing='0' cellpadding='5'><tbody>");
		document.write("<tr><td align='center' class='cmpy_big'><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[0].visible_url + "';return true\" onmouseout=\"window.status='';return true\"  target='_blank'>"+break_words(max_word_len,break_char,google_ads[0].line1)+"</a></td></tr><tr><td align='center' class='desc_big'><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[0].visible_url + "';return true\" onmouseout=\"window.status='';return true\" style='text-decoration:none;color:#000000' target='_blank'>"+google_ads[0].line2+"&nbsp;"+google_ads[0].line3+"</a></td></tr><tr><td align='center' class='link_big'><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[0].visible_url + "';return true\" onmouseout=\"window.status='';return true\"  target='_blank'>"+break_words(max_word_len,break_char,google_ads[0].visible_url)+"</a></td></tr></tbody></table></td></tr>");
		document.write("<tr><td class='big1' align='right'>Ads By Google</td></tr></tbody></table></div>");
	}
	else
	{// New Ads UI
//*!	       document.write("<table width='100%' border='0' align='left' cellpadding='7' cellspacing='0' style='border:1px solid #D9D9D9;'><tr><td class='jdhd' style='border-top:none;text-align:left;'><a href='"+google_info.feedback_url+"' target='_blank' style='text-decoration:none;color:#B5B5B5;font:normal 11px Arial, Verdana;font-weight:normal;cursor:hand;'>Ads By Google</a></td></td>");
                document.write("<div style='text-align:left;height:25px; line-height:25px;' class='doty'> &nbsp; <a href='"+google_info.feedback_url+"' target='_blank' style='text-decoration:none;color:#B5B5B5;font:normal 11px Arial, Verdana;font-weight:normal;cursor:hand;'>Ads By Google</a></div><table width='98%' border='0' align='left' cellpadding='7' cellspacing='0' style='border:1px solid #5F9AE0;'>");

		if(google_ads[0].type == 'text')
		{
			for(i=0; i<google_ads.length; ++i)
			{
                                URL =google_ads[i].url;

                //*! document.write("<tr height='45px'><td align='left' class='vads' style='border-bottom: 1px solid #F1F1F1'><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url +"';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><b style='color:#000000;font-weight:bold;'>"+break_words(max_word_len,break_char,google_ads[i].line1)+"</b></a><br /><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><span class='descp' style='color:#666666;'>"+google_ads[i].line2+" "+google_ads[i].line3+"</span></a><br /><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><span class='bads' style='color:#0000FF;text-decoration:underline;font-weight:bold;'>"+break_words(max_word_len,break_char,google_ads[i].visible_url)+"</span></a></td></tr>");
                                if(i==(google_ads.length-1))
                                        document.write("<tr height='45px'><td align='left' class='vads'>");
                                else
                                        document.write("<tr height='45px'><td align='left' class='vads' style='background:url(http://static.naukimg.com/jobsearch/images/dotline.gif) repeat-x bottom;'>");
                                document.write("<a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url +"';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><b style='text-decoration: underline'>"+break_words(max_word_len,break_char,google_ads[i].line1)+"</b></a><br /><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><span class='descp'>"+google_ads[i].line2+" "+google_ads[i].line3+"</span></a><br /><a href='"+URL+"' onmouseover=\"window.status='"+ google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\" target='_blank'><span class='bads'>"+break_words(max_word_len,break_char,google_ads[i].visible_url)+"</span></a></td></tr>");

			}
		}
		
		document.write("</table><div class=\"spacer\"></div>");
		
/*		if(google_info.feedback_url)
		{
			document.write("<div align=\"right\" style=\"width: 100%;\"><a href='"+google_info.feedback_url+"' target='_blank' style='font:normal 11px Arial, Verdana;color:#B5B5B5;text-decoration:none; height:20px';>Ads By Google</a></div></div>");
		}
		else
		{
			document.write("<div align=\"right\" style=\"width: 100%;\"><div align='right'>Ads By Google</div></div>");
		}*/
	}
}

google_ad_client = "ca-naukri_site_js";
google_ad_output = "js";
google_max_num_ads = 5;
google_safe = "high";
google_feedback= "on";
google_ad_type = "text";
google_color_line = "FF0000";
google_kw_type='broad';
google_bid_type='cpc,cpm';

