var infowindow;

function BigPicLink(picID, w, h, newWin)
{
	if( newWin )
		ShowPopUpWindow("BigPic","bigpic.aspx?pic_id="+picID,w,h,"no","no","yes");
	else
		document.location.href = 'bigpic.aspx?pic_id=' + picID;
}

function PopupPDF(pdfId)
{
	ShowPopUpWindow("", "PDFViewer.aspx?loadpdf=" + pdfId + "&ReturnUrl=PDFViewer.aspx?loadpdf=" + pdfId, 750, 550, "no", "yes", "no");
}

function ShowPopUpWindow(name, file, w, h, Status, Resize, Scroll)
{
	var t = 0, l = 0, winstring = "";
	
	l = ((screen.width / 2) - (w / 2))
	t = ((screen.height / 2) - (h / 2))

	winstring = "width=" + w + ", height=" + h + ",left=" + l + ",top=" + t + ",status=" + Status + ",resizable=" + Resize + ",scrollbars=" + Scroll;

	infowindow = window.open(basehref + file, name, winstring);
}

function OpenInPopUpWindow(name, file, w, h, Status, Resize, Scroll)
{
	var t = 0, l = 0, winstring = "";
	
	l = ((screen.width / 2) - (w / 2))
	t = ((screen.height / 2) - (h / 2))

	winstring = "width=" + w + ", height=" + h + ",left=" + l + ",top=" + t + ",status=" + Status + ",resizable=" + Resize + ",scrollbars=" + Scroll;

	infowindow = window.open(file, name, winstring);
}

function ShowPopUp(url, w, h) 
{
	OpenInPopUpWindow("", url, w, h, "yes", "no", "yes");
}

function ShowBigPic(f,w,h) 
{
	ShowPopUpWindow("BigPic","bigpic.aspx?pic_id="+f,w,h,"no","no","yes");
}

function bigpiclink(f,w,h)
{
	ShowPopUpWindow("BigPic","bigpic.aspx?pic_id="+f,w,h,"no","no","yes");
}

function ShowBigPic2(f,w,h) 
{
	ShowPopUpWindow("BigPic",basehref + "bigpic.aspx?bigpic="+f,w,h,"no","no","yes");
}

function OpenInPopup(url)
{
	ShowPopUpWindow("",url,570,450,"yes","yes","yes");
}

function OpenQuicktimePopup(vidId)
{
	ShowPopUpWindow("qtpopup", "quicktime.aspx/loadvideo." + vidId, 300, 300, "no", "no", "no");
}

function OpenInParent(url)
{
	window.opener.location.href=basehref + url;
	window.close();
}
