// JavaScript Document

function LoginPopup() {
	
	this.loginHeader = "Please Login to Download";
	this.registerText = "All our songs and scores are available for FREE, so you\'re just a quick sign-up away from downloading this one.";

	this.open = function(tgtUrl) {
		
		var strHtml = '<div id="loginOverlay"><div id="loginPopup" class="clearfix"><div id="closeBtn"><A href="#" onClick="var lp = new LoginPopup(); lp.doClose(); return false;"><IMG src="/resources/core/img/close.png" border="0"></A></div><div id="loginBox"><H2>' + this.loginHeader + '</H2><iframe style="border: 0" frameBorder="0" src="/login/popupform?tgt=' + escape(tgtUrl) + '" id="loginFrame"></iframe></div><div id="signupBox" class="clearfix"><H2>Not Registered Yet?</H2><P>' + this.registerText + '</P><DIV id="acceptSignup"><A href="/register"><IMG src="/img/btn-bigsignup.png" border="0" alt="Sign Me Up!"/></A></DIV><DIV id="declineSignup"><A href="#" onClick="var lp = new LoginPopup(); lp.doClose(); return false;">No thanks, I\'d like to keep browsing for now &raquo;</A></DIV></div></div></div>';

		$('body').prepend(strHtml);
		
		
		
	//	$('#loginFrame').contents().find('#loginTarget')[0].value = tgtUrl;
				
	
	}
	
	
	this.doClose = function() {
		
		$('#loginOverlay').remove();
		
		
		
	}
	
}


