// JavaScript Document
//
//
//___________ function to reaload the doc if it is resized
//
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//
//___________
//
//
//___________ function to preload images
//
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//
//___________
//

//___________ function to open an image window from a thumbnail 
//
var screenX=0;
var screenY=0;

function showImage(file,imageWidth,imageHeight){
	
	screenX=(screen.availWidth-imageWidth)/2;
	screenY=(screen.availHeight-imageHeight)/2;	
		
	parameteres=",screenX=" + screenX;
	parameteres+=",screenY=" + screenY;
		
	var windowFeatures="toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + imageWidth + ",height=" + imageHeight + parameteres;
		imageViewer=window.open('imageViewer.php?file='+file,'imageViewer',windowFeatures);
}

function showSlideshow(idslideshow,imageWidth,imageHeight){
	
	screenX=(screen.availWidth-imageWidth)/2;
	screenY=(screen.availHeight-imageHeight)/2;	
		
	parameteres=",screenX=" + screenX;
	parameteres+=",screenY=" + screenY;
		
	var windowFeatures="toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + imageWidth + ",height=" + imageHeight + parameteres;
		imageViewer=window.open('slideshowViewer.php?idslideshow='+idslideshow,'imageViewer',windowFeatures);
}
//___________


//___________function to open userVisibilityManager window
//
function userVisibilityManager(ididentifier,identifier){
	var windowWidth=616;
	var windowHeight=600;
	
	var screenX=0;
	var screenY=0;
	
	var screenX=(screen.availWidth-windowWidth)/2 + 20;
	var screenY=(screen.availHeight-windowHeight)/2;

	///////////////////////////
	
	address='userVisibilityManager.php?';
	
	variables='ididentifier='+ididentifier+'&identifier='+identifier;
	
	parameteres='toolbar=no';
	parameteres+=',location=no';
	parameteres+=',status=no';
	parameteres+=',menubar=no';
	parameteres+=',scrollbars=yes';
	parameteres+=',resizable=no';
	parameteres+=',width='+windowWidth;
	parameteres+=',height='+windowHeight;
	parameteres+=',screenX=' + screenX;
	parameteres+=',screenY=' + screenY;
	
	windowUserVisibilityManager=window.open(address+variables,'windowUserVisibilityManager',parameteres);
	windowUserVisibilityManager.focus();	
}
//___________
