

function logoutPage_getAdvertisment(){
   document.MAX_ct0 ='INSERT_CLICKURL_HERE';

   var m3_u = (location.protocol=='https:'?'https://openads.ocasiao.pt/www/delivery/ajs.php':'http://openads.ocasiao.pt/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=50&amp;target=_blank");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {
       document.write ("&amp;ct0=" + escape(document.MAX_ct0));
   }
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");	
}

function mainLayoutPage_getAdvertisment(){

   document.MAX_ct0 ='INSERT_CLICKURL_HERE';

   var m3_u = (location.protocol=='https:'?'https://openads.ocasiao.pt/www/delivery/ajs.php':'http://openads.ocasiao.pt/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=48&amp;target=_blank&amp;block=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {
	   document.write ("&amp;ct0=" + escape(document.MAX_ct0));
   }
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
}

//activities
function activitiesReady(result) {
	for (var i = 0; i < result.DATA.length; i++) {
		var tmpTitle = result.DATA[i][2];
		var tmpDesc = result.DATA[i][4];
		var tmpLink = result.DATA[i][0];
		//fill the activity-divs
		if ($('FBActivity' + (i+1)) != null) {
			$('FBActivity' + (i+1)).setHTML(tmpTitle + "<br /><br />" + tmpDesc);
			$('FBActivityLink' + (i+1)).setProperty("href", webroot + "/ActivitiesRead/" + tmpLink);
		}
	}
}

//yoosers
function yooserReady(result) {
	for (var i = 0; i < result.DATA.length; i++) {
		var tmpTitle = result.DATA[i][1];
		var tmpImg = result.DATA[i][2];
		var tmpLink = result.DATA[i][0];
		//fill the yooser-divs
		if (tmpImg == "") {
			tmpImg = "view/assets/yooser_default.gif";
		} else {
			tmpImg = "files/PERSON/list/" + tmpImg;
		}
		
		if ($('FBYooser' + (i + 1)) != null) {
			$('FBYooser' + (i+1)).setHTML('<img src="' + tmpImg + '" alt="' + tmpTitle + '" class="FallBackYooserImg" /><br /><div>' + tmpTitle + '</div>');
			$('FBYooserLink' + (i+1)).setProperty("href", webroot + "/YooserRead/" + tmpLink);
		}
	}
}

