/************************************************************************************
AMAURY MEDIAS DIGITAL / SMART ADSERVER
Type: Standard (JavaScript)
Date: 2011-07-05
Version: 1 ; Revision: 1
************************************************************************************/
sas_target=""; sas_tmstp=Math.round(Math.random()*10000000000); sas_masterflag=1;
function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
	if(sas_masterflag==1){sas_masterflag=0;sas_master='M';}else{sas_master='S';}
	document.write('<scr'+'ipt src="http://ww84.smartadserver.com/call/pubj/'+sas_pageid+'/'+sas_formatid+'/'+sas_master+'/'+sas_tmstp+'/'+escape(sas_target)+'?"></scr'+'ipt>');
	if (undefined !== SmartAdServerPub.list) {SmartAdServerPub.list[sas_formatid] = sas_formatid;}
}

if ("undefined" == typeof SmartAdServerPub) SmartAdServerPub = {};
SmartAdServerPub = {
	list: [],
	presence: function(sas_formatid){
		if ((div_pub = document.getElementById("Ads_"+sas_formatid))) {
			for(les_img=div_pub.getElementsByTagName("img"),cnt_img=les_img.length; cnt_img>0&&64>(les_img[cnt_img-1].width*les_img[cnt_img-1].height); cnt_img--){}
			var les_object = div_pub.getElementsByTagName("object"); var les_embed = div_pub.getElementsByTagName("embed");
			if (!cnt_img && !les_object.length && !les_embed.length) {return true;}
			return false;
		}
	},
	presencePub: function() {for (sas_formatid in SmartAdServerPub.list) {if (SmartAdServerPub.presence(sas_formatid)) {div_pub.style.visibility="hidden"; div_pub.style.display="none";}}}
}
if (window.addEventListener) {window.addEventListener("load", SmartAdServerPub.presencePub, false);} else {window.attachEvent("onload", SmartAdServerPub.presencePub);}
