function showPicture(strPictureName,intHeight,intWidth) {
	openWin("http://www.psydb.net/pop_showcover.html?strPicName="+strPictureName+"&strPicHeight="+intHeight+"&strPicWidth="+intWidth,intHeight,intWidth,"no","yes","no");
}

function showFile(strFileName) {
	openWin(strFileName,350,440,"no","yes","yes");
}

function showPicByID(intPicID) {
	openWin("http://www.psydb.net/pop_showart.html?pic_id="+intPicID,570,660,"no","yes","no");
}

function showPicByName(strPicName,strPicComment) {
	strPicName = escape(strPicName);
	strPicComment = escape(strPicComment);
	openWin("http://www.psydb.net/pop_showpic.html?strPicName="+strPicName+"&strPicComment="+strPicComment,570,660,"no","yes","no");
}

function openWin(strPage,intHeight,intWidth,strMenuBar,strStatus,strScroll) {
  var ua = window.navigator.userAgent;
  var msie = ua.indexOf("MSIE");
  var wleft,wtop,wname,wnamep,wprops,page,scrolli,status,menubar;
  wname='PMEWin'+strMenuBar+strStatus+strScroll;
  
  if (strStatus=="yes") intHeight += 21;
    
  intLeft = (screen.width - intWidth) / 2;
  intTop = (screen.height - intHeight) / 2;
  wprops = 'height='+intHeight+',width='+intWidth+',top='+intTop+',left='+intLeft+',scrollbars='+strScroll+',resizable=yes,toolbar=no,menubar='+strMenuBar+',status='+strStatus;
  wObject = window.open(strPage,wname,wprops);
  
  if (wObject.moveTo) setTimeout("wObject.moveTo("+intLeft+","+intTop+")",100);
  if (wObject.resizeTo) setTimeout("wObject.resizeTo("+(intWidth+12)+","+(intHeight+31)+")",120);

  if ((parseInt(ua.substring(msie+5,ua.indexOf( ".",msie)))>=4 && document.all) || document.layers || document.getElementById) {
    if (wObject.focus) {setTimeout("wObject.focus();",200);}
  }
}

function linkPic(objElement, strMode, strPicName, strPicText, strRelativePath) {

	var linkPicDiv = document.getElementById("linkPicDiv");
	
	if (strMode=='show') {

		var scrollTop;

		if (window.pageYOffset) {
			scrollTop = window.pageYOffset;
		}
		else if (document.documentElement && document.documentElement.scrollTop) {
			scrollTop = document.documentElement.scrollTop;
		}
		else if (document.body) {
			scrollTop = document.body.scrollTop;
		}

		linkPicDiv.style.left = "50%";
		linkPicDiv.style.marginLeft = "-50px";
		linkPicDiv.style.top = (scrollTop + 120) + "px";
		linkPicDiv.innerHTML = "<img src=\"" + strRelativePath + "pics/links/big/"+strPicName+"\" alt=\"\" class=piclink width=240 height=180><span class=txtb><br><br>"+strPicText+"</span>";
		linkPicDiv.style.visibility = "visible";
	} else {
		linkPicDiv.innerHTML = "";
		linkPicDiv.style.visibility = "hidden";
	}
}

function stat(s) { if(!s) s=""; window.status=s; setTimeout("window.status='"+s+"'",20);}
