function vIE(){return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;}


function setOperaBg() {
	//opera bg position err
	var agt = navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) {
		document.body.style.backgroundPosition = "50% top";
		if (document.getElementById('footbg')) {
			document.getElementById('footbg').style.backgroundPosition = "50% top";
		}
	}
}


function setIE6() {
	//only ie6 - do check
	// set on resize as well

	if (vIE() == 6) {

		// fix background-image/anchor flicker | only ie6 sp1+
		try { document.execCommand('BackgroundImageCache', false, true);} catch(e) {}

		if (document.getElementById('footbg')) {
			document.getElementById('footbg').style.width = getScreenWidth()+"px";
		}

	}

}



function loadDock() {
	$('#dock').Fisheye({maxWidth:10, items:'a', itemsText:'span', container:'.dock-container', itemWidth:60, proximity:50, halign:'center'});

	if (document.getElementById('dockcontainer')) {
		document.getElementById('dockcontainer').style.display = "";
	}
}



// bind events onload
if (window.attachEvent) { //IE
	window.attachEvent("onload", loadDock);
} else if (window.addEventListener) { // FF
	window.addEventListener("load", loadDock, false);
}