/**
 * Put any style specific JavaScript code in here.
 *
 * @author Jeffrey Sambells <jeff@wecreate.com>
 * @version $Id: style.js 16 2007-02-14 15:06:34Z jeffrey $
 * @package semantic_theme
 */
/*
addEvent(window,'load',function() {
	if((var logoutButton = $('logoutButton'))) {
		addEvent(logoutButton,'click',function() {
			if( confirm('You are about to logout. Click OK to continue.') ) { document.location=''; return false;}
		});
	}
});
*/

function fixImageWidthInPage(contentAreaId,maxWidth) {
	if(!document.getElementsByTagName) return false;
	var page = document.getElementById(contentAreaId);
	if(!page) return;
	var img = page.getElementsByTagName('IMG');
	if(!img) return;
	for(i in img) {
		if(img[i].width > maxWidth) {
			img[i].style.height = Math.floor((maxWidth/img[i].width)*img[i].height) + 'px';
			img[i].style.width = maxWidth + 'px';
		}
	}
}
addEvent(window,'load',function() { fixImageWidthInPage('page',400); });

function initNavBar() {
	//jsir.replace('a','mainNavJSIR');
}
addEvent(window,'load',initNavBar);

