function page_init() {
	var bodyWidth;
	
	switch (browser_type())
	{
		//Netscape
		case 0:
			bodyWidth     = window.innerWidth;
			break;
		case 1:
			bodyWidth     = document.body.offsetWidth;
			break;
	}
	
	page_layout.style.left = getLayoutLeft(bodyWidth);
	page_layout.style.visibility = "visible";
}

function browser_type() {
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") 				{	browser = 0;	}
 		if (navigator.appName.indexOf("Microsoft")!=-1) {	browser = 1;	}
	}
	return browser;
}

function getLayoutLeft(bodyWidth) {
	var posLeft = Math.floor((bodyWidth-800)/2);
	if (posLeft < 0) {
		posLeft = 0;
	}
	return posLeft;
}

function canvas_redirect(pageID) {
	switch (pageID) {
		case 'home':
			window.location = 'index.html';
			break;
		case 'call for papers':
			window.location = 'callforpapers.html';
			break;
		case 'call for workshops':
			window.location = 'callforworkshops.html';
			break;
		case 'important dates':
			window.location = 'importantdates.html';
			break;
		case 'organizing committees':
			window.location = 'organizingcommittees.html';
			break;
		case 'online author kit':
			window.location = 'onlineauthorkit.html';
			break;
		case 'external: uab':
			window.location = 'http://www.uab.edu/';
		    break;
		case 'external: fiu':
			window.location = 'http://www.fiu.edu/';
		    break;
		case 'external: ieee':
			window.location = 'http://www.ieee.org/';
		    break;
		case 'external: ieee computer society':
			window.location = 'http://www.computer.org/';
		    break;
		case 'external: ieee conference publishing service':
			window.location = 'http://www.computer.org/portal/site/cscps/';
		    break;
		case 'external: ftrg':
			window.location = 'http://www.ftrg.org/CSA2009/';
		    break;
		default:
			window.location = 'construction.html';
	}
}


