// A function used to calculate the background-position
// of the tattoo. It assumes the tattoo is 800 px and is
// to be placed 30px to the right of the right border of
// the #zone div.

function tatCalc()
{
	if (document.documentElement) {
		var win = document.documentElement.clientWidth;
		var zone = document.getElementById("zone").offsetWidth;
		var bgPos = zone + (win - zone)/2 - 773;
		var tat = document.getElementById("tat").style.backgroundPosition = bgPos + "px 0";
	}
}

// I'm using border-image properties for some elements and
// need to specify different attributes for those elements
// if the border-image property is supported.

function borderImage()
{
	if (document.getElementById && document.getElementsByTagName) {
		var isWebKit = WebKitDetect.isWebKit();
		if (isWebKit == true) {
			var pics = document.getElementsByTagName("img");
			for (var i=0; i < pics.length; i++) {
				if (pics[i].className == "frame") {
					pics[i].className = "frame_webkit";
				}
			}
		}
	}
}