/*
RockYou AMS JS Framework

The framework is to control the execution of events handler or any javascript
code regardless of platform intererence (e.g. fb) on javascript or ad templates.

Developer can directly execute code in the init stage or attach an event
listener to a certain event. The defined function should be added to the
initListenerArray by calling the AddInitListener() method in your external JS
file. This JS file should be specified in the Placement.customPage column, and
that means additional coding needs to be done to update the column via Ad Mgr.
*/

function ryadjs () {
	/* Class Container */
}

ryadjs.prototype.initListenerArray = new Array();

ryadjs.prototype.AddInitListener = function(listener) {
	this.initListenerArray[this.initListenerArray.length] = listener;
}

ryadjs.prototype.init = function() {
	for (var i=0; i<this.initListenerArray.length; i++) {
		this.initListenerArray[i]();
	}
}

// object creation
var ___ryadjs = new ryadjs();


