// W3Gallery - Core JavaScript functions

function showimage(img,resizable) {
   resizable = resizable == undefined ? "no" : resizable;
   image = new Image();
   image.src = img;
   w = image.width;
   h = image.height;
   attr = "width="+w+",height="+h+",resizable="+resizable;
   window.open(img, "", attr);
}

function makevisible(cur, which) {
  	if (which==0) cur.filters.alpha.opacity=100
   else cur.filters.alpha.opacity=40
}

function popup(url, width, height, option, winName)
{
	var options = "width=" + width + ",height=" + height + ",top=10,left=10";
	var moreOptions = "";
	var windowName = winName;
	if (windowName == "") windowName = "defaultPopup";
	switch (option)	{
		case 1  : 
		   options += ",toolbar=no,status=no,resizable=no,scrollbars=yes"; 
		   break;
		case 2  : 
		   options += ",menubar=yes,toolbar=yes,status=yes,resizable=yes,location=yes,scrollbars=yes"; 
		   break;
		default : 
		   break;
	}			
	popupWindow = window.open(url, windowName, options);
	popupWindow.focus();
}

// EOF