//Google ads generator (javascript)//David Jamin  //********** Global Variables **********//var temp_google_kw = "";var google_set = 0;var o_urlstring = document.URL;o_urlstring = path(o_urlstring);o_urlstring = replace(o_urlstring, "_");function google_ad_request_done(google_ads) {    /*     * This function is required and is used to display     * the ads that are returned from the JavaScript     * request. You should modify the document.write     * commands so that the HTML they write out fits     * with your desired ad layout.     */    var s = '';    var i;    /*     * Verify that there are actually ads to display.     */    if (google_ads.length == 0) {      return;    }	google_set = 1;    /*     * If an image ad is returned, then that ad should be     * displayed. Otherwise, build a string containing all of     * the ads and then use a document.write() command to     * print it when the string is complete.     */    if (google_ads[0].type == "image") {      s += '<a href="../../../wingswing/files/%27%20%2B%20google_ads%5B0%5D.url%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27" target="_top" title="go to ' + google_ads[0].visible_url +              '"><img border="0" src="../../../wingswing/files/%27%20%2B%20google_ads%5B0%5D.image_url%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27"width="' + google_ads[0].image_width +              '"height="' + google_ads[0].image_height + '"></a>';	} else {      s += '<table bgcolor="#FFFFFF" width="100% border="0 cellspacing="0" cellpadding="0">' +			'<tr>' +			'<td align="center">';            if ((o_urlstring.indexOf("vendor") != -1) || (o_urlstring.indexOf("marketcenter") != -1) || (o_urlstring.indexOf("firms-1") != -1) || (o_urlstring.indexOf("news.lp") != -1)){			s +='<table width="95%" border="0" cellspacing="0" cellpadding="2">';      }else if (o_urlstring.indexOf("writ") != -1) {			s +='<table bgcolor="#9C9D9D" width="100%" border="0" cellspacing="0" cellpadding="2">';	  }else{			s +='<table bgcolor="#9C9D9D" width="95%" border="0" cellspacing="0" cellpadding="2">';	  }	  s += '<tr>' +			'<td>' +     		'<table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding= "0">' +    		'<tr>' +    		'<td bgcolor="#F3F3F3" height="20" width="10"></td>' +    		'<td bgcolor="#F3F3F3" height="20" align="left" valign="middle">' +			'<span class="textxsmall-lgray">Ads by Google</span></td>' +    		'</tr>' +    		'<tr>' +    		'<td colspan="2" height="10" width="100%"></td>' +    		'</tr>' +    		'<tr>' +    		'<td height="20" width="10"></td>' +    		'<td class="textsmall">';      if (google_ads[0].bidtype == "CPM") {        /*         * Partners should adjust text sizes         * so ads occupy the majority of ad space.         */        s += '<a href="' + google_ads[0].url + '" ' +                          'onmouseout="window.status=\'\'" ' +                          'onmouseover="window.status=\'go to ' +                          google_ads[0].visible_url + '\'; return true" ' +                          'style="text-decoration:none">' +                          '<span style="text-decoration:underline;" class="text14">' +                          '<b><i>' + google_ads[0].line1 + '</i></b><br></span>' +                           '<span style="color: rgb(0, 0, 0);" class="text14">' +                          google_ads[0].line2 + ' ' +                          google_ads[0].line3 + '<br></span>' +                          '<span style="color: rgb(0, 128, 0);" class="text14">' +                          google_ads[0].visible_url + '</span></a>';      } else {        /*         * For text ads, append each ad to the string.         */        for(i=0; i < google_ads.length; ++i) {		  if (i > 0){      			if ((o_urlstring.indexOf("vendor") != -1) || (o_urlstring.indexOf("marketcenter") != -1) || (o_urlstring.indexOf("firms-1") != -1) || (o_urlstring.indexOf("news.lp") != -1)){				s += '<table height="3px"><tr height="3px"><td height="3px"></td></tr></table>';			}else{				s += '<table height="3px" width="350"><tr height="3px"><td height="3px"></td></tr></table>';			}		  }          s += '<a href="' + google_ads[i].url + '" ' +                            'onmouseout="window.status=\'\'" ' +                            'onmouseover="window.status=\'go to ' +                            google_ads[i].visible_url + '\'; return true" ' +                            'style="text-decoration:none">' +                            '<span style="text-decoration:underline;" class="textsmall">' +                            '<b>' + google_ads[i].line1 + '</b><br></span>' +                             '<span style="color: rgb(0, 0, 0);" class="textsmall">' +                            google_ads[i].line2 + ' ' +                            google_ads[i].line3 + '<br></span>' +                            '<span style="color: rgb(0, 128, 0)" class="textsmall">' +                            google_ads[i].visible_url + '</span></a>';        }      }	  s += '</td>' +    		'</tr>' +    		'<tr>' +    		'<td colspan="2" height="10" width="100%"></td>' +    		'</tr>' +     		'</table>' +			'</td>' +			'</tr>' +			'</table>' +			'</td>' +			'</tr>' +			'</table>' +			'<br \>';    }     document.write(s);    return;  }     google_ad_client = 'ca-findlaw_js';     google_ad_output = 'js';	 google_kw_type = 'broad';	 if ((o_urlstring.indexOf("news.") != -1) || (o_urlstring.indexOf("infirmation.") != -1) || (o_urlstring.indexOf("vendor") != -1) || (o_urlstring.indexOf("marketcenter") != -1) || (o_urlstring.indexOf("stu.") != -1) || (o_urlstring.indexOf("boards.") != -1)){     	google_max_num_ads = '5';		var num=Math.floor(Math.random()*6)		if (num == 5){			/*google_kw = 'Home Equity Loan';*/			google_kw = 'VOIP, voice over IP';			google_ad_channel = 'channel5';		}else if (num == 1){			/*google_kw = 'VOIP, voice over IP';*/			google_kw = 'Online Trading';			google_ad_channel = 'channel1';		}else if (num == 3){			google_kw = 'Online Trading';			google_ad_channel = 'channel3';		}else if (num == 4){			google_kw = 'VOIP, voice over IP';			google_ad_channel = 'channel4';		}else{ 			google_kw = 'VOIP, voice over IP';			google_ad_channel = 'channel2';		}		temp_google_kw = google_kw;	 }else{     	google_max_num_ads = '3';		if (o_urlstring.indexOf("forms.") != -1){			google_ad_channel = 'forms';		}else if (o_urlstring.indexOf("11stategov") != -1){			google_ad_channel = 'jurisdictions';		}else if ((o_urlstring.indexOf("casecode") != -1) || (o_urlstring.indexOf("caselaw") != -1)){			google_ad_channel = 'cases_codes';		}else if (o_urlstring.indexOf("01topics") != -1){			google_ad_channel = 'practice_areas';		}	}     google_safe = 'high';