/*
* This helper allows you to define which advertisments 
* will show up in your html page. All you need to do
* is define a JavaScript array called advertisments:
* Flash 'Ad' objects div must match the div name here.  
* 'htmlAd' set to true will cause Flash to autorotate 
* those ads without 'Ad' Objects being required.

*  var advertisments = [
*    {"div":"name", "htmlAd":false, urls:[{"width":100,"height":100,"url":"foo"}]},
*    {"div":"name2","htmlAd":true, urls:[{"width":100,"height":100,"url":"bar"}]}
*  ]
*
* The div names must match actual (empty) divs in your
* document that will be replaced with a shiny new
* advertisment bearing your specified format.
*/

function getAds() { return advertisments ? advertisments : []; }

function displayAd(div, width, height, url) {
	var style = $("#"+div).attr("style");
	$("#"+div).replaceWith('<iframe id="'+div+'"/>');
	$("#"+div).attr({ 
						frameborder: "0",
						scrolling: "no",
						allowtransparency: "true",
						hspace: "0",
						vspace: "0",
						marginheight: "0",
						marginwidth: "0",
						src: url,
						width: width,
						height: height,
						style: style
					});
	try{
		resizeOnAd(div,width,height);
	}
	catch(err){}
}
function rotateAd(div, url) {
	url = 'http://www.taaz.com/taaz/' + url;
	$("#"+div).attr("src", url);
}