// JavaScript Document
function imageSwap(sSource) {
	//document.getElementById(sImageID).src = document.getElementById('mainImage').src;
	document.getElementById('mainImage').src = sSource;
}

function setCursor(sCursor) {
	document.body.style.cursor = sCursor;
}

var popup_win;
function OpenWindow(url,iWidth,iHeight) {
	var pw_left=(screen.Width-parseInt(iWidth))/2;
	var pw_top=(screen.Height-parseInt(iHeight))/2;
	
	if (!popup_win || popup_win.closed) {
		popup_win=window.open(url, 'popupwin', 'menus=0, scrollbars=auto, toolbars=0, width='+iWidth+', height='+iHeight+', screenX='+pw_left+',screenY='+pw_top+',top='+pw_top+',left='+pw_left+';');
	} else {
		popup_win.close();
		popup_win=window.open(url, 'popupwin', 'menus=0, scrollbars=auto, toolbars=0, width='+iWidth+', height='+iHeight+', screenX='+pw_left+',screenY='+pw_top+',top='+pw_top+',left='+pw_left+';');
	}
}