var isIE = false;
var isIE8 = false;
var isNotIE = false;
var isFox = false;
var isChrome = false;
var isSafari = false;

getBrowser();

// set functions for run on load and on resize
(isNotIE) ? window.addEventListener( "load", init, false ) : window.attachEvent( "onload", init );


function getBrowser()
{
	// which version of IE do we have
	if( (navigator.userAgent).indexOf("MSIE") != -1 )
	{ 
		if( (navigator.userAgent).indexOf("MSIE 8.0") != -1 )
		{
			// IE 8 uses new javascript interpretation, specifically getAttribute('class') rather than getAttribute('className')
			isIE8 = true;
		}
		else
		{
			// old versions of IE
			isIE = true;
		}
	}
	//everything else
	else if( (navigator.userAgent).indexOf("Firefox") != -1 ) {	isNotIE = true; isFox = true; }
	else if( (navigator.userAgent).lastIndexOf("Chrome") != -1 ) { isNotIE = true; isChrome = true;	}
	else if( (navigator.userAgent).lastIndexOf("Safari") != -1 ) { isNotIE = true; isSafari = true;	}
}



function init()
{	
	var windowLocation = window.location.toString();
	
	if( windowLocation.indexOf("newsite") == -1 )
	{
		var windowBlocker = document.createElement("div");
		windowBlocker.setAttribute("id", "windowBlocker");
		windowBlocker.style.width = "100%";
		windowBlocker.style.height = "100%";
		windowBlocker.style.top = "0px";
		windowBlocker.style.left = "0px";
		windowBlocker.innerHTML = "<div style=\"padding:50px 0px 0px 200px;\"> <img src=\"http://www.andrewprinter.com/images/templogo.gif\" /><br />New site coming very soon.</div>";
		windowBlocker.style.zIndex = "400";
		windowBlocker.style.position = "absolute";
		windowBlocker.style.backgroundColor = "#C8B09D";
		windowBlocker.style.color = "#FBF9F7";
		windowBlocker.style.fontSize = "18px";
		(isIE || isIE8 ) ? windowBlocker.style.filter = 'alpha(opacity=85)' : windowBlocker.style.opacity = '.85';
		(isIE || isIE8 ) ? windowBlocker.className = "windowBlocker" : windowBlocker.setAttribute("class", "windowBlocker");
		//document.body.appendChild(windowBlocker);
	}
	
	
}