function insertFlash() {
swfobject.embedSWF('flash/hrmax_intro_movie.swf', "intro", "908", "250", "9.0.0");
//swfobject.embedSWF('flash/powered.swf', "powered", "150", "50", "9.0.0" , "wmode:transparent");	
}
function valForm() {
j_username = document.forms[0].elements[0].value;
j_password = document.forms[0].elements[1].value;
if (j_username == '' || j_password == '') {
alert('Please complete the Account Login form.'); return false;
} else {
	if(window.XMLHttpRequest) {
	XHR = new XMLHttpRequest(); 
	}
	else if (window.ActiveXObject) {
	XHR  = new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	XHR.onreadystatechange = function()
		{ 
			if(XHR.readyState == 4)
			{
				if(XHR.status == 200)
				{
					eval(XHR.responseText);
				} 
			}
		};
	XHR.open("POST","XHRlogin.cfm",true)
	XHR.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
	XHR.send('j_username='+encodeURIComponent(j_username)+'&j_password='+encodeURIComponent(j_password)); 
	}
	return false;
}

function getWidth() {
var myWidth = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
} else if( document.body && document.body.clientWidth) {
//IE 4 compatible
myWidth = document.body.clientWidth;
}
if (myWidth <= 800) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_800.jpg)';
	return;
}
if (myWidth <= 1024) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1024.jpg)';
	return;
}
if (myWidth <= 1152) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1152.jpg)';
	return;
}
if (myWidth <= 1280) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1280.jpg)';
	return;
}
if (myWidth <= 1440) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1440.jpg)';
	return;
}	
if (myWidth <= 1680) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1680.jpg)';
	return;
}	
if (myWidth <= 1920) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_1920.jpg)';
	return;
}	
if (myWidth <= 2600) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_2600.jpg)';
	return;
}	
if (myWidth <= 3840) {
	document.getElementById('root').style.backgroundImage = 'url(images/backgrounds/datametrix_3840.jpg)';
	return;
}	
}

Event.observe(window, 'load', function() {
	getWidth();	
	insertFlash();
	Event.observe(window, 'resize', getWidth);
}
);


