 /******************************
 *  BROWSWER FIXES             *
 *  BY MATT WILCOX             *
 *	CLS VISUAL COMMUNICATIONS  *
 *	http://www.clsvis.com      *
 *******************************/

function screenFix() {
	var screenW = screen.width;
	var negativeMargin = 402;
	var screenMargin = (screenW * .95) / 2;
	
	if (screenMargin <= negativeMargin)
	{
		document.getElementById('abs-wrapper').style.margin="0px";
		document.getElementById('abs-wrapper').style.left="20px";
	}	
}

function browserChanges() {
	var thisBrowser = BrowserDetect.browser + " " + BrowserDetect.version;
	if(thisBrowser == "Explorer 6")
	{
		IE6cssInsert();
	}
}

function IE6cssInsert() {
	var headID = document.getElementsByTagName("head")[0];         
	var cssNode = document.createElement('link');
	cssNode.type = 'text/css';
	cssNode.rel = 'stylesheet';
	cssNode.href = 'ie6Hack.css';
	cssNode.media = 'screen';
	headID.appendChild(cssNode);
}

function setHeights() {
	var theHeight = document.getElementById('abs-wrapper').offsetHeight;
	document.getElementById('content').style.height=theHeight-345+"px";
	document.getElementById('black-side-bar').style.height=theHeight-315+"px";
	document.getElementById('side-banner').style.height=theHeight-315+"px";
	document.getElementById('body-wrapper').style.height=theHeight-40+"px";
}

function cancelPage() {window.location = "http://www.mastergutter.com/";}

function init(){
	browserChanges();
	screenFix();
	setHeights();
}

window.onload=init;