var newWin = null;
var mp3Win = null;
var winPosX = 0;
var winPosY = 0;
	
function getScreenCenter(theWidth, theHeight) { // Get ScreenCenter
	winPosX = (screen.width/2) - (theWidth/2);
	winPosY = (screen.height/2) - (theHeight/2);
	//if (newWin) newWin.close();
	if (theWidth == 0) theWidth = 300;
	if (theHeight == 0) theHeight = 200;
}
function showPopUp(pageurl, theWidth, theHeight, pagetitle) { // Picture Pop Up...
    // Tracker Code
    pageTracker._trackPageview('/PopUp/' + pageurl);
    //alert(pagetitle);
	if (newWin) newWin.close();
	getScreenCenter(theWidth, theHeight);
	newWin = window.open('','newWin','scrollbars=no,resizable=no,width='+(theWidth+20)+',height='+(theHeight+50)+',status=no,location=no,left='+winPosX+',top='+winPosY+',menubar=no');
	var output = '<html><head><title>' + (pagetitle ? pagetitle : 'Hot n Spicy - Photo');	    
	output += '</title><link rel="stylesheet" type="text/css" href="global.css"></head><body>';
	output += '<table width="100%" align="center"><tr><td align="center">';
	output += '<img src="'+pageurl+'" alt="' + (pagetitle ? pagetitle : '') + '" border="1"><br><br><a href="javascript:window.close();">close this window</a></td></tr></table>';
	output += '</body></html>';
	newWin.document.write(output);
	newWin.focus();
}
function showSubPage(pageurl, theWidth, theHeight) { // Sub Page Pop Up...
    // Tracker Code
    pageTracker._trackPageview('/SubPage/' + pageurl);
	if (newWin) newWin.close();
	getScreenCenter(theWidth, theHeight);
	newWin = window.open('','newWin','scrollbars=yes,resizable=no,width='+(theWidth)+',height='+(theHeight)+',status=no,location=no,left='+winPosX+',top='+winPosY+',menubar=no');
	newWin.window.location.href = pageurl;
	newWin.focus();
}
function showFlashPlayer(pageurl, theWidth, theHeight) { // Flash Player Pop Up...
    // Tracker Code
    pageTracker._trackPageview('/Player/' + pageurl);
	if (mp3Win) mp3Win.close();
	getScreenCenter(theWidth, theHeight);
	mp3Win = window.open('','mp3Win','scrollbars=yes,resizable=no,width='+(theWidth)+',height='+(theHeight)+',status=no,location=no,left='+winPosX+',top='+winPosY+',menubar=no');
	mp3Win.window.location.href = pageurl;
	mp3Win.focus();
}