
<!--//

function autoOpen() {
	// for windows that popup on the homepage
	//popWin('url','name', width, height);
}


website = "pirates";

net = (document.layers && true);

widgetBuf = (net) ? 0:50

function popWin(url, name, width, height, scroll, resizable) {
	bWidth = (net) ? top.innerWidth:parseInt(top.document.body.clientWidth);
	bHeight = (net) ? top.innerHeight:parseInt(top.document.body.clientHeight);
	bLeft = (net) ? top.screenX:parseInt(top.screenLeft);
	bTop = (net) ? top.screenY:parseInt(top.screenTop);
	scroll = (scroll) ? scroll:"auto"
	resizable = (resizable) ? resizable:"yes"
	if (!bLeft) {
		bLeft = 0;
		bWidth = screen.width;
	}
	if (!bTop) {
		bTop = 0;
		bHeight = screen.height;
	}
	xer = bLeft + ((bWidth/2) - width/2);
	yer = (bTop - widgetBuf) + ((bHeight/2) - height/2);
	if (xer < 2) {
		xer = 2;
	}
	if (xer < 2) {
		xer = 2;
	}
	
	paramStr = "width=" + width + ",height=" + height + ",screenX=" + xer + ",screenY=" + yer + ",left=" + xer + ",top=" + yer + ",dependent=1,directories=0,location=0,menubar=0,resizable="+resizable+",scrollbars="+scroll+",toolbar=0";
	top[name] = window.open(url, name, paramStr);
	top[name].focus();
}

popups = new Object();

function launchPopUp(name) {
	//tP = popups[name];
	//popWin(tP.url, website+tP.name, tP.width, tP.height, tP.scroll, tP.resizable);
	
	switch(name) {
		case "rogues_battleship":
				url = "../games/rogues_battleship/index.html";
				width = 740; 
				height = 540; 
				popscroll = "no"; 
				resizable = "no";
				break;
			case "warrrr":
				url = "../games/warrrr/index.html";
				width = 740; 
				height = 540; 
				popscroll = "no"; 
				resizable = "no";
				break;
			case "fortune_red":
				url = "../games/fortune_red/index.html";
				width = 740; 
				height = 540; 
				popscroll = "no"; 
				resizable = "no";
				break;
			case  "previews":
				url = "../trailer_select.html";
				width = 550; 
				height = 500; 
				popscroll = "no"; 
				resizable = "no";
				break;
		}
		popWin(url,name,width,height,popscroll,resizable);
}
function launchDesktop(title, num, size) {
	var url = "../downloads/desktops/index.html?path=POC_"+title+""+num+"_"+size+".jpg";
	//alert(" url:"+url);
	popWin(url, website+"_desktop", 740, 540, "yes", "yes");
}
function launchDownload(type, num) {
	var url = "../downloads/"+type+"/index.html?num="+num;
	//alert(" url:"+url);
	popWin(url, website+"_"+type, 740, 540, "yes", "yes");
}

function _hbPageView(a,b){
}
//-->
