window.onresize = function() {
	if (window.ie6) {
		var left = document.getElementById('leftContainer');
		var center = document.getElementById('centerContainer');		
		var right = document.getElementById('rightContainer');
		if (document.body && document.body.clientWidth < 1000) {
			center.style.marginLeft = '0';
			left.style.display = "none";
			right.style.display = "none";
		} else {
			center.style.marginLeft = '-500px';
			left.style.display = "block";
			right.style.display = "block";
		}
	}
}

function anchorEvents() {
	var a = document.getElementsByTagName('a');	
	var len = a.length;
	for (var i=0;i<len;i++) {	
		if (a[i].getAttribute('odata') != null) {			
			if (document.addEventListener) {a[i].addEventListener('click', function() {
				sendOmnitureVals(this.getAttribute('odata'));
			}, false);} 
			else {a[i].attachEvent('click', function() {
				sendOmnitureVals(this.getAttribute('odata'));
			});}
		}
		if (a[i].getAttribute('target') == '_blank') {			
			if (document.addEventListener) {a[i].addEventListener('click', function(e) {
				newWindow(e,this);
			}, false);} 
			else {a[i].attachEvent('click', function() {
				newWindow(e,this);
			});}
		}		
	}	
}

function newWindow(e,ele) {	
	var width = window.innerWidth || document.documentElement.clientWidth;
	var height = window.innerHeight || document.documentElement.clientHeight;
	window.open(ele.getAttribute('href'), "aiu",'width='+(width * .9)+',height='+(height * .9)+',toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes');
	e = e || window.event;
	e.preventDefault ? e.preventDefault() : e.returnValue = false;
}

function changeEntities() {
	document.body.innerHTML = document.body.innerHTML.replace(/(k|9)(12){1}(?!@|\.|\/|_|-|%|#|"|&|912"|912_|912\/|[A-Za-z0-8]+)/ig, function($0, $1){
		return $1 ? $1 + '&sup1;&sup2;' : $0;
	});
}

function openReg(filename,width,height) {
	window.open(filename,'demowindow','width='+width+',height='+height+',resizable=1,scrollbars=1');
}
