//Date Created: 10.21.2008
//Created By:   Hutch.White


//Function for music pop-up player
//for security reasons, making player
//pop-up outside page with disabled source
//and minimal browser tools to discourage
//download theft.

function musicpop(songPath, accountID)
{
var url;
var musicPlayerWindow;


url='player.asp?songTitle='+songPath+'&user='+accountID;

	if (window.frames && window.frames.playerFrame) {
		window.frames.playerFrame.location.href = url;
	}
	
setVisible('playerPop');
}

//disabling right click event
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
//End right click disable


//Floating DIV Layer Popup

x = 20;
y = 70;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	
	//stops player when closing window
	if (obj.style.visibility == 'hidden') {
		window.frames.playerFrame.location.href = 'player.asp';
	}
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
}

//End Floating DIV Popup

//Function for message contract terms pop-up
//div pop-ups will not be blocked by pop-up blockers...
//at least as of the time this was created.
function messagecontractpop()
{
var url;

url='messageContractTerms.asp';

	if (window.frames && window.frames.playerFrame) {
		window.frames.playerFrame.location.href = url;
	}
	
setVisible('messageContract');
}

//Function for mp3 conversion instructions pop-up
//div pop-ups will not be blocked by pop-up blockers...
//at least as of the time this was created.
function mp3conversionpop()
{
var url;

url='mp3Instructions.asp';

	if (window.frames && window.frames.playerFrame) {
		window.frames.playerFrame.location.href = url;
	}
	
setVisible('mp3Instructions');
}

//Function for message contract terms pop-up
//div pop-ups will not be blocked by pop-up blockers...
//at least as of the time this was created.
function popUpShow(url,div)
{
    if (window.frames && window.frames.playerFrame) {
		window.frames.playerFrame.location.href = url;
	}
	
setVisible(div);
}
