function isDoubled() {
	//alert("width: "+screen.width+", height: "+screen.height);
	
	if((screen.width >= 1600) && (screen.height < 1200)) {
		return true; 
	}
	else {
		return false;
	}
}

function checkSize(width,height)
{
	returnArray = new Array();
	
	if(isDoubled()) {
		if((width <= ((screen.width / 2) - 50)) && (height <= (screen.height - 100)))
		{
			returnArray[0] = width;
			returnArray[1] = height;
			returnArray[2] = "no";
		}
		else if((width > ((screen.width / 2) - 50)) && (height <= (screen.height - 100)))
		{
			returnArray[0] = ((screen.width / 2) - 50);
			returnArray[1] = height;
			returnArray[2] = "yes";
		}
		else if((width <= ((screen.width / 2) - 50)) && (height > (screen.height - 100)))
		{
			returnArray[0] = width;
			returnArray[1] = (screen.height - 50);
			returnArray[2] = "yes";
		}
		else
		{
			returnArray[0] = ((screen.width / 2) - 50);
			returnArray[1] = (screen.height - 50);
			returnArray[2] = "yes";
		}
	}
	else {
		if((width <= (screen.width - 50)) && (height <= (screen.height - 100)))
		{
			returnArray[0] = width;
			returnArray[1] = height;
			returnArray[2] = "no";
		}
		else if((width > (screen.width - 50)) && (height <= (screen.height - 100)))
		{
			returnArray[0] = (screen.width - 50);
			returnArray[1] = height;
			returnArray[2] = "yes";
		}
		else if((width <= (screen.width - 50)) && (height > (screen.height - 100)))
		{
			returnArray[0] = width;
			returnArray[1] = (screen.height - 50);
			returnArray[2] = "yes";
		}
		else
		{
			returnArray[0] = (screen.width - 50);
			returnArray[1] = (screen.height - 50);
			returnArray[2] = "yes";
		}
	}
	return(returnArray);
}

function popup(URL,w,h,scrolling)
{
	sizeArray = new Array();
 	sizeArray = checkSize(w,h);
 	
 	var width = sizeArray[0];
 	var height = sizeArray[1];
 	
 	if(isDoubled()) {
  		var topLeftX = (((screen.width / 2) - width) / 2);
 	}
 	else {
  		var topLeftX = ((screen.width - width) / 2);
  	}
 	var topLeftY = ((screen.height - height) / 2) - 20;

	poppedWin = window.open(URL,'WindowB','left='+topLeftX+',top='+topLeftY+',width='+width+',height='+height+',menubar=no,toolbar=no,resizable=yes,status=no,scrollbars='+scrolling+' ');
}

// <!-- 1029309404
// This script is (C) Copyright 2002 Jim Tucek
// Leave these comments alone!  For more info, visit
// www.jracademy.com/~jtucek/ 

function mean(animal,closet,asteroid) {
animal += ' ';
var beast = animal.length;
var contact = 0;
var waste = '';
for(var energy = 0; energy < beast; energy++) {
contact = 0;
while(animal.charCodeAt(energy) != 32) {
contact = contact * 10;
contact = contact + animal.charCodeAt(energy)-48;
energy++;
}
waste += String.fromCharCode(sow(contact,closet,asteroid));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+waste;
}

function sit(experience,fire,humanity) {
experience += ' ';
var language = experience.length;
var hieroglyphic = 0;
for(var lake = 0; lake < language; lake++) {
hieroglyphic = 0;
while(experience.charCodeAt(lake) != 32) {
hieroglyphic = hieroglyphic * 10;
hieroglyphic = hieroglyphic + experience.charCodeAt(lake)-48;
lake++;
}
document.write('&');
document.write('#');
document.write(sow(hieroglyphic,fire,humanity));
}
}

function sow(mother,mark,method) {
if (method % 2 == 0) {
millenium = 1;
for(var object = 1; object <= method/2; object++) {
cloud = (mother*mother) % mark;
millenium = (cloud*millenium) % mark;
}
} else {
millenium = mother;
for(var eye = 1; eye <= method/2; eye++) {
cloud = (mother*mother) % mark;
millenium = (cloud*millenium) % mark;
}
}
return millenium;

/*

'javascript:mean("1030 924 706 703 381 594 1030 703 173 215 703 223 48 626 215 703 42 626 8 117 602 173 117 594 427 48 215 609 446 21 48 173 173 8 458 48 649 609 703 649 1013 1030 703 774 215 703 223 48",1073,605)'

*/

}



