OrgLogo = new Object();
OrgLogo.maxWidth = 160;//px
OrgLogo.maxHeight = 50;//px
OrgLogo.logos = new Array();

OrgLogo.addLogo = function(imgLogo) {
	OrgLogo.logos.push(imgLogo);
	OrgLogo.setSize(imgLogo);	
}

OrgLogo.setSize = function(imgLogo) {
	if (imgLogo == null)
	{
		return;
	}	

	if (imgLogo.width > this.maxWidth) {
		imgLogo.height = imgLogo.height * (this.maxWidth / imgLogo.width);
		imgLogo.width = this.maxWidth;		
	}
	
	if (imgLogo.height > this.maxHeight) {
		imgLogo.width = imgLogo.width * (this.maxHeight / imgLogo.height);
		imgLogo.height = this.maxHeight;		
	}
}

OrgLogo.doLoad = function() {
	for(i = 0; i < this.logos.length; i++) {	
		OrgLogo.setSize(this.logos[i]);	
	}	
}

OrgLogo.load = function() {
	OrgLogo.doLoad();
	window.setTimeout("OrgLogo.doLoad();",1000);
	window.setTimeout("OrgLogo.doLoad();",5000);
}

