var ie	= document.all ? 1 : 0;
var mac	= navigator.userAgent.indexOf("Mac")>=0 ? 1 : 0;
var primary_nav_buttons	= ["nav_home","nav_grips","nav_gloves","nav_other"];

function init(){
	if(ie && !mac){
		initIeMenus(primary_nav_buttons);
	}
}

function initIeMenus(triggers){
	for (var i=0; i<triggers.length; i++) {
		triggers[i]	= document.getElementById(triggers[i]);
		triggers[i].onmouseover = function(){
			this.getElementsByTagName("ul")[0].style.display = "block";
		};
		triggers[i].onmouseout = function(){
			this.getElementsByTagName("ul")[0].style.display = "none";
		};
	}
}

function popUp(file, width, height) {
	void window.open(file,'abs','width='+width+',height='+height+',scrollbars');
}

function confirmation() {
	var answer = confirm("Are you sure that you want to perform this action ?");
	if (answer)
		return true;
	else
		return false;

}

//this function is used to swap images
function swapImages(divid, image) {
		document.getElementById(divid).style.background = "url("+image+") top right no-repeat";
}