var vBrowserType = "";
if (window.navigator.userAgent.indexOf("Firefox") != -1) vBrowserType = "Firefox";
if (window.navigator.userAgent.indexOf("MSIE") != -1) vBrowserType = "IE";
if (window.navigator.userAgent.indexOf("SV1") != -1) vBrowserType = "IESP2";
if (vBrowserType)
{
	var w = screen.availWidth;
	var h = screen.availHeight;
}

function fileBrowserCallBack(field_name, url, type, win) {
	blehwindow = win;
	openWin('filebrowser','../../../../../tools/fman/filebrowser.php?type=' + type + '&field_name=' + field_name,600,500,0,1);
}

function urlConvertCallBack(url, node, on_save) {
	return url;
}

function fillImage(field_name,url) {
	blehwindow.document.forms[0].elements[field_name].value = url;
}

function openWindow(url, name, width, height, scrollbar)
{
	self.name = "main"; 
	var leftPos = (w-width)/2, topPos = (h-height)/2;
	popupWin = window.open(url, name, "width=" + width + ",height=" + height + ",scrollbars=" + scrollbar + ",top=" + topPos + ",left=" + leftPos + ",toolbar=no,directories=no,menubar=no");
}

function changeIt(ImgAlpha, ImgBeta) { 
if (document.images) { document[ImgAlpha].src = ImgBeta; } 
} 
if (document.images)
{ 
	img01 = new Image; 
	img01.src = "graphics/menu_overview_on.png"; 
	img02 = new Image; 
	img02.src = "graphics/menu_biography_on.png"; 
	img03 = new Image; 
	img03.src = "graphics/menu_discography_on.png"; 
	img04 = new Image; 
	img04.src = "graphics/menu_tours_on.png"; 
	img05 = new Image; 
	img05.src = "graphics/menu_awards_on.png"; 
}


function openWin(winName, urlLoc) {
	l = (screen.availWidth - 620)/2;
	t = (screen.availHeight - 540)/2;
	features  = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,dependent,height=540,width=620,left=" + l + ",top=" + t;
	winName = winName.replace(/[^a-z]/gi,"_");
	return window.open(urlLoc,winName,features);
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function getAddress()
{
	if (document.formShipping.useship.checked)
	{
		document.formShipping.billname.value = document.formShipping.shipname.value;
		document.formShipping.billaddress01.value = document.formShipping.shipaddress01.value;
		document.formShipping.billaddress02.value = document.formShipping.shipaddress02.value;
		document.formShipping.billcity.value = document.formShipping.shipcity.value;
		document.formShipping.billprovince.value = document.formShipping.shipprovince.value;
		document.formShipping.billcountry.value = document.formShipping.shipcountry.value;
		document.formShipping.billpostal.value = document.formShipping.shippostal.value;
	} else {
		document.formShipping.billname.value = "";
		document.formShipping.billaddress01.value = "";
		document.formShipping.billaddress02.value = "";
		document.formShipping.billcity.value = "";
		document.formShipping.billprovince.value = "";
		document.formShipping.billcountry.value = "";
		document.formShipping.billpostal.value = "";
	}
}

