// Used to load advertisments for the PointerOnline site.
/*----- Global variables -------*/
var fpVersion = "9.0.0";
var fpWidth = "330";
var fpHeight = "330";
var fpPath = "/Scripts/PointerAds.swf";
var fpBannerWidth = "680";
var fpBannerHeight = "100";
var fpBannerPath = "/Scripts/PointerBannerAds.swf";
/*------ starts to process functions when document is ready ----------*/
$(document).ready(function(){
   init();
});
function init(){
	if (swfobject.hasFlashPlayerVersion(fpVersion)){
		insertFP(); 
	}
}
/*--------- Adds the flash player to div elements that have class of "ads" ------*/
function insertFP(){
	$("div.ads").attr("id", function (arr) {
          return "ads" + arr;
        }).each(function () {
		  swfobject.embedSWF(fpPath, this.id, fpWidth, fpHeight, fpVersion);
        });
  $("div.bannerAds").attr("id", function (arr) {
          return "bannerAds" + arr;
        }).each(function () {
		  swfobject.embedSWF(fpBannerPath, this.id, fpBannerWidth, fpBannerHeight, fpVersion);
        });
}
/*-------- Used to pass page location to the flash player -------*/
function getUrl(){
    return location.href;
}
