function openPopUpAndTrack (trackID, sUrl, nWidth, nHeight) {
	window.open(sUrl,'pirates','scrollbars=yes,resizable=yes,width=' + nWidth + ',height=' + nHeight + '');
	_hbflash(trackID,'n','n','n');
}



// JavaScript Document

/*    GET COMPETITION    */
function getComp() {
	var win = window.open("comp-terms.html",'terms','width=600,height=400,scrollbars=yes');
	win.focus();
}

/*    GET TRAILERS    */
function getTrailers() {
	var win = window.open(trailerPath, 'trailers', 'width=702, height=502');
	win.focus();
}
/*    GET GALLERY    */
function getGallery() {
	var win = window.open("gallery.html", 'icons', 'width=500, height=410');
	win.focus();	
}
/* open Screen SAver Popup */
function openScreensaver (os){
	var win = window.open('downloads/potc_screensaver_'+os+'.html', 'screensavers', 'width=396, height=465');
	win.focus();
}
/* open Countdown Screen Saver Popup */
function openCountdownScreensaver() {
	var win = window.open("downloads/countdown_screensaver.html", 'countdown', 'width=400, height=385');
	win.focus();	
}
//
/*    GET AIM ICONS   */
function getAIMIcons (aimID) {
	var iconName = getIconName (aimID);
	var win = window.open('downloads/potc_icon.html?'+iconName, 'icons', 'width=396, height=485');
	win.focus();
}
/*    GET WALLPAPERS  */
function getWallpaper (wpID, wpSize) {
    var wpName = getWpName (wpID);
	formatString = "potc2_"+wpName+"_"+wpSize+".jpg";
    path = "desktops/"+ wpName + "/" + formatString;
    var winl = ((screen.width)/2);
    var wint = ((screen.height)/2)-20;
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    //var settings = 'scrollbars=1&resize=1';
    win = window.open("downloads/displayWP.html?"+path);
	win.focus();
}
//
function  getIconName (iconID) {
	switch (iconID) {
	  case 1:
	  return "jack";
  	  break;
	  
	  case 2:
	  return "elizabeth";
	  break;
	  
	  case 3:
	  return "will";
	  break;
	  
	  case 4:
	  return "davyJones";
	  break;
	  
	  case 5:
	  return "skull";
	  break;
	};
}

//
function  getWpName (wpID) {
	switch (wpID) {
	  case 1:
	  return "jack";
  	  break;
	  
	  case 2:
	  return "will";
	  break;
	  
	  case 3:
	  return "group";
	  break;
	  
	  case 4:
	  return "elizabeth";
	  break;
	  
	  case 5:
	  return "davyJones";
	  break;
	  
	  case 6:
	  return "jackKing";
	  break;
	  
	}
}




function openRego(){
					window.open('uk/register.jsp','register','width=800,height=700,scrollbars=yes');
				}