// Only need to give first three params
function openCenteredWindow(url, height, width, name, parms)
{
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
   if (parms) { winParms += "," + parms; }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4)
   { 
   		if (win)
		{
			win.window.focus();
		}
   }
   return win;
}

function disablecopytext()
{
	if(event.srcElement.tagName!='INPUT' && event.srcElement.tagName!='IMG')
	{
		window.event.returnValue=false
	}
}

function disablerightclick()
{
	if (document.layers)
	{
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById)
	{
		document.onmousedown=clickIE4;
	}
}

function clickIE4()
{
	if (event.button==2)
	{
		return false;
	}
}

function clickNS4(e)
{
	if (document.layers||document.getElementById&&!document.all)
	{
		if (e.which==2||e.which==3)
		{
			return false;
		}
	}
}

function disablesaveas()
{	
	if(document.images)
    {
    	for(i=0;i<document.images.length;i++)
        {
            document.images[i].onmousedown = right;
            document.images[i].onmouseup = right;
        }
    }
}

function right(e)
{
	if (navigator.appName == 'Netscape' && e.which == 3)
	{
	   alert('Images are copyright of Sounds Live Ltd.');
	   return false;
    }
    if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2)
	{
       alert('Images are copyright of Sounds Live Ltd.');
	   return false;
	}
	else return true;
}


