function changeStyle() {
	newBGImage = getStyle(document.body, "background-image");
	newBGColor = getStyle(document.body, "background-color");
	newBGColor = convertToHex(newBGColor);

	oldBGImage = "url(http://theblairhouse.net/assets/siteBG.png)";
	oldBGImageIE = "url(\"http://theblairhouse.net/assets/siteBG.png\")";
	oldBGImageC = "url(\"http://www.theblairhouse.net/assets/siteBG.png\")";
	oldBGColor = "#c5b798";

	document.body.style.backgroundImage = oldBGImage;
	document.body.style.backgroundColor = oldBGColor;

	if ((newBGImage != oldBGImage) && (newBGImage != oldBGImageIE) && (newBGImage != oldBGImageC)) {
		document.getElementById("content").style.backgroundImage = newBGImage;
	}
	if (newBGColor != oldBGColor) {
		document.getElementById("content").style.backgroundColor = newBGColor;
	}
}
function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}
function convertToHex(rgbval){
	var s = rgbval.match(/rgb\s*\x28((?:25[0-5])|(?:2[0-4]\d)|(?:[01]?\d?\d))\s*,\s*((?:25[0-5])|(?:2[0-4]\d)|(?:[01]?\d?\d))\s*,\s*((?:25[0-5])|(?:2[0-4]\d)|(?:[01]?\d?\d))\s*\x29/);

	if(s){ s=s.splice(1); }
	if(s && s.length==3){
	    d='';
	    for(i in s){
		e=parseInt(s[i],10).toString(16);
		e == "0" ? d+="00":d+=e;
	    } return '#'+d;
	}else{ return rgbval; }
}