﻿// JScript File

function godrop()
{
	box = document.aspnetForm.CountryBox;
	destination = box.options[box.selectedIndex].value;
	if (destination.substr(0,7) == "http://") {
		window.open(destination,"mywindow"); 
	} else {
		location.href = destination;
	}
}

function spawn(url, nameW, w, h)
{
	x4 = screen.width/2 - (w/2);
	y4 = screen.height/2 - (h/2);
	newwindow = window.open(url, nameW,'height='+h+',width='+w+',scrollbars=1,resizable=1,menubar=0,toolbar=0,status=0,location=0,directories=0,left='+ x4 + ',top=' + y4 + '');
	if (window.focus) {newwindow.focus()}
}

function clearsearchbox(theBox)
{
    theBox.value = ""
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function popUpDonation(){
	NewWindow=window.open("/donation.asp","popupdonation",'width=770,height=550,scrollbars=yes,resizable=0,menubar=0,toolbar=0,status=yes,location=0,directories=0');
}