﻿rndNumber = Math.floor(Math.random()*9000000000)+1000000000

function printAdvert(ad)
{
	document.write("<scri"+"pt language=\"JavaScript1.1\" type=\"text/javascript\" src=\""+ad+"ord="+rndNumber+"\"></scri"+"pt>")
}


 function google_ad_request_done(google_ads) 
 {
   // Proceed only if we have ads to display!
   if (google_ads.length < 1 )
     return;
	
   if (google_ads[0].type == 'text') 
   {
     for(i = 0; i < google_ads.length; ++i) 
	 {
		gavurl=google_ads[i].visible_url
		//if (gavurl.length > 18)	gavurl=gavurl.substr(0, 15)+" ..."
        document.write("<a href=\"" +  google_ads[i].url + "\" target=\"_blank\" OnMouseOver=\"status='"+google_ads[i].visible_url+"'; return true;\" OnMouseOut=\"status=''; return true;\"><h4>" +
        google_ads[i].line1 + "</h4><p>" +
        google_ads[i].line2 + " " +
        google_ads[i].line3 + "<br /><span>" +
 		gavurl + "</span></p></a>");
     }
   }   
}
