function vP(u) { g('ViewProfile.asp?UserID=' + u) }
function vL(u) { g('Library.asp?UserID=' + u) }
function vG(u) { g('Gallery.asp?UserID=' + u) }
function vPG(u) { g('XXXGallery.asp?UserID=' + u) }
function g(p) {	self.location.href = p + '&TargetURL=' + targetURL }
function viewMovie(fileName, credits, userid) {
	if(isLoggedIn) {
		if(userid != iUserID) {
			if (iBalance < credits) {
				if(confirm('You do not have a sufficient amount of credits to view this movie.\n\n      Credits Required: ' + credits + '\n      Current Balance: ' + iBalance + '\n\nWould you like to buy credits now?')) {
					buyCredits()
					alert('When you have completed your credit purchase, click OK and this page will be reloaded to recalculate your credits balance.')
					reloadMe()
				}
				else {
					return
				}
			}
			else {
				if(confirm('You will be charged ' + credits + ' Credit(s) to view this movie.\n\n      Do you wish to continue?')) {
					window.open('ViewMovie.asp?MovieID=' + fileName)
				}
				else {
					return
				}
			}
		}
		else {
			window.open('ViewMovie.asp?MovieID=' + fileName)
		} 
	}
	else {		
		self.location.href = 'Login.asp?Error=' + escape('Movies can only be viewed by registered members. Please Login or Register') + '&TargetURL=' + escape(sThisPageURL + '#AAC');
	}		
}
function buyCredits() {
	if(isLoggedIn) {	
		var buyCreditsWin = window.open('dlgBuyCredits.asp?Reload=1', 'buyCreditsWin', 'width=400,height=410,scrollbars=1,resizable=1,status=1')
	}
	else {	
		if(confirm('You must be logged in to purchase credits.  Would you like to login now?')) {
			self.location.href = 'Login.asp?TargetURL=' + escape('BuyCredits.asp')
		}
		else {
			return
		}	
	}
}
function reloadMe() {
	self.location.reload()
}
function vPG(userID) {
	self.location.href = 'XXXGallery.asp?TargetURL=' + escape(sThisPageURL) + '&UserID=' + userID;
}
function vX() {
	window.open('XXXGalleryImage.asp?1=' + arguments[0], '_blank', 'width=620,height=450,resizable=1,scrollbars=1')
}
function sG() {
	if(isLoggedIn) {	
		window.open('XXXGallerySubscribeToView.asp?1=' + arguments[0], '_blank', 'width=280,height=220,resizable=1,scrollbars=1')
	}
	else {
		if(confirm('Only registered members can view Private Galleries. Would you like to login or register now?')) {
			self.location.href = 'Login.asp?TargetURL=' + escape(sThisPageURL + '#G');
		} 
	}
}
function vB(u) { self.location.href = 'Blog.asp?UserID=' + u; }
function tL(id) {
	if(lastID>0 && lastID!=id){var dToggle2 = g_$('tbl' + lastID); dToggle2.className = 'Hidden'; document.images['img' + lastID].src = 'images/plus.gif'}
	lastID = id
	var doIt = true
	var dToggle = g_$('tbl' + id)	
	if(doIt) { switch (dToggle.className) {	case 'Hidden' : dToggle.className = 'Visible'; document.images['img' + id].src = 'images/minus.gif'; break; case 'Visible' : dToggle.className = 'Hidden'; document.images['img' + id].src = 'images/plus.gif'; break; } }
	else { alert('Your browser is too old to use this function.') }
}