var popupWindow=null;
function popupcontactus(ID)
{
	if(ID == null)
		mypage = 'contactus.php';
	else
		mypage = 'contactus.php?ID=' + ID;

		popup1(mypage, '360', '450', 'ContactUs');
}

function popupshowpictures(ID)
{	
	popup1('showpictures.php?ID=' + ID,'475', '650', 'Pictures');
}

function popupshowmovies(ID)
{
	popup1('showmovie.php?ID=' + ID, '475', '650', 'Movies');
}

function popupshowpedigree(ID)
{
	popup1('showpedigree.php?ID=' + ID, '800', '650', 'Pedigree');
}

function popupshownews(ID)
{
	popup1('showNews.php?ID=' + ID,'410','500','ShowNews');
}

function popupadmin()
{
	popup2('admin.php','850','600','Admin');
}

function popupnewuser()
{
	popup1('newuser.php','420','350','NewUser');
}

function popup1(mypage,w,h,wintitle)
{
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	popupWindow=window.open(mypage,wintitle,settings);
	popupWindow.focus();	
}

function popup2(mypage,w,h,wintitle)
{
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=yes,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes';
	popupWindow=window.open(mypage,wintitle,settings);
	popupWindow.focus();	
}

function popupDoAdmin() {
    popup1('submitlogin.php', '420','350','Admin');
}
