// copyright (c) 1999 Metaforce Interactive.         //
// This script can be used free of charge, provided  //
// this copyright notice accompanies its usage.      //
// www.metaforce.com                                 //

function openPopUp(whichDoc,w,h)
{
	thisTarget ="PopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=yes," + ",width=" + w + ",height=" + h;
	winPointer = window.open(whichDoc,thisTarget,paramList);
}

function openWin(whichDoc)
{
	thisTarget ="PopWin";
	paramList = "toolbar=0,status=1,menubar=0,scrollbars=yes,resizable=yes,top=1" 
	winPointer = window.open(whichDoc,thisTarget,paramList);
}


function centerWin()
{
	var x,y
	x = ((screen.width - self.outerWidth)/2)
	y = ((screen.height - self.outerHeight)/2)
	self.moveTo(x,y)
}


function openPop(whichDoc) 
{
	w = 300;
	h = 280;
	fileExt = ".htm";
	refPath = "/";

	whichDoc = refPath + whichDoc + fileExt;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}

function openPopMonsterLegal(whichDoc) 
{
	var chks = document.getElementsByName('monsters');
	var cnt = 0;
	var i = 0;
	for (i=0; i<chks.length; i++) {
		if (chks[i].checked) {
			cnt=cnt+1;
			var themon = chks[i].value;
		}
	}
	if (cnt < 1) {
		alert("You must check one of the checkboxes below\nan image before you can download.");
		return
	}
	if (cnt > 1) {
		alert("You may only check one image at a time to download.\nPlease check only one, and try again.");
		return
	}
	w = 300;
	h = 280;
	fileExt = ".tml";
	refPath = "/";

	whichDoc = refPath + whichDoc + fileExt+"?img="+themon;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}

function openPopScrapbookLegal(whichDoc) 
{
	var chks = document.getElementsByName('sb');
	var cnt = 0;
	var i = 0;
	for (i=0; i<chks.length; i++) {
		if (chks[i].checked) {
			cnt=cnt+1;
			var themon = chks[i].value;
		}
	}
	if (cnt < 1) {
		alert("You must check one of the checkboxes below\nan image before you can download.");
		return
	}
	if (cnt > 1) {
		alert("You may only check one image at a time to download.\nPlease check only one, and try again.");
		return
	}
	w = 300;
	h = 280;
	fileExt = ".tml";
	refPath = "/";

	whichDoc = refPath + whichDoc + fileExt+"?img="+themon;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}

function openMonsterPopTall(whichDoc) 
{
	w = 288;
	h = 450;
	fileExt = ".htm";
	refPath = "/monster_pop_ups/";

	whichDoc = refPath + whichDoc + fileExt;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}

function openMonsterPopWide(whichDoc) 
{
	w = 360;
	h = 380;
	fileExt = ".htm";
	refPath = "/monster_pop_ups/";

	whichDoc = refPath + whichDoc + fileExt;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}

function openMonsterWallpaper(whichDoc) 
{
	w = 720;
	h = 500;
	fileExt = ".htm";
	refPath = "/monster_lovers/wallpaper/";

	whichDoc = refPath + whichDoc + fileExt;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}
function openPeanutsWallpaper(whichDoc) 
{
	w = 720;
	h = 500;
	fileExt = ".htm";
	refPath = "/free_stuff/wallpaper/";

	whichDoc = refPath + whichDoc + fileExt;

	thisTarget ="CountryPopWin";
	paramList = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1," + ",width=" + w + ",height=" + h;
	winContactPointer = window.open(whichDoc,thisTarget,paramList);
}
function focusWindow()
{
	// patch for IE4 Mac
	if ( (navigator.appName.indexOf( "Microsoft" ) != -1 ) &&
 	   ( navigator.appVersion.indexOf( "Macintosh" ) != -1 ) && 
 	   ( parseInt(navigator.appVersion) >=4 ) )
  		{
  			// IE4 Mac so don't re-focus Window
 		}else{
 			if (window.focus) 
				{
	 				self.focus();
	 			}
		}
}


function closeWindow()
{
	self.close();
}


function disabledAlert()
{
	alert("This link is currently inactive.");
}
