//USED by webcontent
//used by the ShowPic tag
//21/08/03 DM   New Forms
//04/Jun/04 SA updated popupListDetails to cater for eventdetails in stripped sites
//19Feb07 ShowDynFormSSP
//10Apr07 ShowDynFormQueryString
function showPic(picture,sCaption) {
	var iHeight=398;
	var iWidth=600;
	var iTop=(window.screen.height-iHeight)/2;
	var iLeft=(window.screen.width-iWidth)/2;
	var toOpen='ShowPic.asp?p='+picture+'&caption='+sCaption;
	var winDetails='titlebar=no,left='+iLeft+',top='+iTop+',width='+iWidth+',height='+iHeight;
	var win2=window.open(toOpen,'picture',winDetails); 
	win2.focus();
};
//used by details of the lists (eventlist, personnellist, docList & imageList)
//this window size is proportional to the screen size unlike above, where the popup is fixed, but positioned based upon screen size
function popupListDetailsXY(sURL,iWidth,iHeight){
	var iTop=(window.screen.height-iHeight)/2;
	var iLeft=(window.screen.width-iWidth)/2;
	//var winDetails='titlebar=no,left='+iLeft+',top='+iTop+',width='+iWidth+',height='+iHeight;
	var winDetails='scrollbars=yes,directories=no,location=no,menubar=no,resizable=yes,left=';
	winDetails+=iLeft+',top='+iTop+',width='+iWidth+',height='+iHeight;
	
	var winListDets=window.open(sURL,'ListDetails',winDetails);
	window.event.cancelBubble=true;
	window.event.returnValue=false;
	//winListDets.focus();
};
function popupListDetails(sURL) {
	var iHeight=500;
	var iWidth=400;
	var toOpen;
	if (sURL.indexOf(".asp")>0) toOpen='../'+sURL; // dynamic site
	else toOpen=sURL; // stripped site
	//alert(toOpen);
	popupListDetailsXY(toOpen,iWidth,iHeight);
};
function ShowDynForm(UFID,iWidth,iHeight){
	sURL='../WebFormPopup.asp?PU=Y&FormDataOwnerID='+UFID;
	popupListDetailsXY(sURL,iWidth,iHeight);
};
function ShowDynFormSSP(sURL,UFID,iWidth,iHeight){
	popupListDetailsXY(sURL,iWidth,iHeight);
};
function ShowDynFormQueryString(UFID,iWidth,iHeight,QueryString){
	sURL='../WebFormPopup.asp?PU=Y&FormDataOwnerID='+UFID+'&'+QueryString;
	popupListDetailsXY(sURL,iWidth,iHeight);
};
