function openPicture (e, pname, pdim)
{
	if (pdim == "hor")
	   if (screen.width <= 1024) return 
	   else
		  window.open(pname,null,'height=699,width=930,scrollbars=yes,menubar=no,resizable=no,status=no,titlebar=no,toolbar=no');	  
	if (pdim == "ver")
	   if (screen.height < 768) return
	   else
		  window.open(pname,null,'height=984,width=740,scrollbars=yes,menubar=no,resizable=no,status=no,titlebar=no,toolbar=no');
	if (!e) var e = window.event;
	// handle event
	e.cancelBubble = true;
	e.returnValue = false;
	 if (e.stopPropagation)
	 {
	   e.stopPropagation();
	   e.preventDefault();
	 }	
}

function showDiv (id,caller,side)
{
	var viewportwidth;
 	var viewportheight;
	//var dsoctop = document.all ? document.body.scrollTop : pageYOffset

 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
	 if (typeof window.innerWidth != 'undefined')
	 {
		  viewportwidth = window.innerWidth,
		  viewportheight = window.innerHeight
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
		 && typeof document.documentElement.clientWidth !=
		 'undefined' && document.documentElement.clientWidth != 0)
	 {
		   viewportwidth = document.documentElement.clientWidth,
		   viewportheight = document.documentElement.clientHeight
	 }
	 
	 // older versions of IE
	 
	 else
	 {
		   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		   viewportheight = document.getElementsByTagName('body')[0].clientHeight
	 }
 	
	
	if (side==1)
	{
		var imgleft = Math.round(viewportwidth/2)-50;
		document.getElementById(id).style.left = imgleft.toString()+'px';
	}
	else
	{
		var imgleft = Math.round(viewportwidth/2) - 320;
		document.getElementById(id).style.left = imgleft.toString()+'px';
	}
	//var imgtop = Math.round(viewportheight/2);
	//document.getElementById(id).style.top = imgtop.toString()+'px';
	//alert(document.body.scrollTop);

	document.getElementById(id).style.display = 'block';
}

function hideDiv (id)
{
	document.getElementById(id).style.display = 'none';
}