/////verify user action
function verify() {
   var msg;
   if (confirm("Confirm: delete this image ? "))
   	return true;
   else
   	return false;
}


function delPict(path)
{
//alert(path);
	if (verify() == true ){
	//alert("after deletion, refresh this window to see changes") ;
	var vpath = "post_deletePicture.asp?path="+path ;
	var w =300;
	var h = 200;

	var objWin;

	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings;
	settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='resizable=yes.';

	settings +='bar=no,';
	settings +='toolbar=no,';
	settings +='location=no,';
	settings +='directories=no,';
	settings +='status=no,';

	settings +='menubar=no,';
	settings +='scrollbars=yes,';
	settings +='status=no';
	objWin = window.open(vpath , "top", settings )
	window.location.href=window.location.href;
 	}
}

function showPict(imgDimension, imgWidth, imgHeight, path)
{

   //alert(imgDimension + " "+ imgWidth +" "+ imgHeight +" "+ path );
   var vpath = path
   var t = "";
   var theWindow;
   var windowWidth;
   var windowHeight;
   var newImgWidth;

   newImgWidth = imgWidth;
   windowHeight = imgHeight + 50;
   windowWidth = imgWidth + 50

   if (imgWidth > 400){
   	windowWidth = 450;
   	newImgWidth = 400;
    windowHeight = (imgHeight / (imgWidth / newImgWidth )) + 50;
	}

   var winl = (screen.width-windowWidth)/2;
   var wint = (screen.height-windowHeight)/2;
   var settings;

   settings ='height='+windowHeight+',';
   settings +='width='+windowWidth+',';
   settings +='top='+wint+',';
   settings +='left='+winl+',';
   settings +='resizable=yes,';
   settings +='bar=no,';
   settings +='toolbar=no,';
   settings +='location=no,';
   settings +='directories=no,';
   settings +='status=no,';
   settings +='menubar=no,';
   settings +='scrollbars=yes,';
   settings +='status=no';

   theWindow = window.open("","top", settings);


	t += "<HTML>\n";
	t += "<HEAD>\n";
	t += "<TITLE>ZOOM</TITLE>\n";
	t += "</HEAD>\n";
	t += " <BODY BGCOLOR=\"black\">\n";
	t += "  <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\" HEIGHT=\"100%\"BGCOLOR=\"white\">\n";
	t += "   <TR>\n";
	t += "    <TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\">";
	t += "      <TABLE BORDER=\"0\" CELLPADDING=\"5\" CELLSPACING=\"0\" BGCOLOR=\"white\">\n";
	t += "        <TR>\n";
	t += "          <TD>\n";
	t += "          <P ALIGN=\"center\"><A HREF=\"javascript:self.close()\" onmouseover=\"window.status=close\; return true\">\n";
	t += "         <IMG src=\"./inc/newthumb.aspx?src=" + vpath + "&width=" + newImgWidth + "\" BORDER=0 TITLE=\"Click on the picture to close the window.\"></A></TD>\n";
	t += "        </TR>\n";
	t += "      </TABLE>\n";
	t += "    </TD>\n";
	t += "   </TR>\n";
	t += "  </TABLE>\n";
	t += " </BODY>\n";
	t += "</HTML>\n";

	theWindow.document.clear();
	theWindow.document.write(t);
 }



