/* Browser check */
IS_DOM = (document.getElementById) ? true : false;
IS_IE = (document.all) ? true : false;
IS_IE50 = (navigator.userAgent.indexOf("IE 5.0") != -1);
IS_Mac = (navigator.appVersion.indexOf("Mac") != -1);

// misc images
go1on = new Image(); go1on.src = "" + sFolderLevel + "csspics/form-go-r.gif"; go1off = new Image(); go1off.src = "" + sFolderLevel + "csspics/form-go-0.gif";

function imgOn(imgName) {
  if (document.getElementById) {
	document.getElementById(imgName).src = eval(imgName + "on.src");
  }
}
 
function imgOff(imgName) {
  if (document.getElementById) {
    document.getElementById(imgName).src = eval(imgName + "off.src");
  }
}

function changeImages() 
{
  if (document.getElementById) {
    for (var i = 0; i < changeImages.arguments.length; i += 2) { 
  		document.getElementById(changeImages.arguments[i]).src = eval(changeImages.arguments[i + 1] + ".src"); 
	}
  }
}

function centeredPopUpWindow(mypage, myname, w, h, scroll)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function changeCountry(oSelector)
{
	var countrySel = oSelector;
	var forwardUrl = countrySel.options[countrySel.selectedIndex].value;
	if (forwardUrl > "")
	{
		window.open(forwardUrl);
	}
}

function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = 'block';
	}
}

function OpenWindow(sPath, iHeight, iWidth ) {
	var winName = "newWind" + Math.round(Math.random() * 9999999);
	window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars,resizable,top=20,left=20');
}