
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

/* shopnav */
function topframe_tab_over(obj, img_name) {
	obj.style.backgroundImage = "url("+img_name+")";
}
function topframe_tab_out(obj) {
	obj.style.backgroundImage = "";
}

function newWin(name, url, width, height, args) {

	var popupurl = url;
	var newWin = new Object();

	newWin.args = args;
	newWin.url = url;
	newWin.name = name;
	newWin.width = width;
	newWin.height = height;

	if (document.layers) {// browser is NN
			newWin.left = window.screenX + ((window.outerWidth - newWin.width) / 2);
			newWin.top = window.screenY + ((window.outerHeight - newWin.height) / 2);
			var attr = 'screenX=' + newWin.left + ',screenY=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	} else {// browser is MSIE
		newWin.left = (screen.width - newWin.width) / 2;
		newWin.top = (screen.height - newWin.height) / 2;
		var attr = 'left=' + newWin.left + ',top=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
	}
	newWin.win=window.open(newWin.url, newWin.name, attr);
	if( (!newWin.win) || (newWin.win.closed) ) {// probably popup-blocker active
		popupblocker_alert();
		return;
	}
	newWin.win.opener=self;
	newWin.win.focus();
}


function changeBg(object, color) {
	object.style.backgroundColor = color;
}
