function viewImage(URL,Name,Width,Height) {
 var ViewWindow;
 var dw = 20
 var dh = 20
 var sw = screen.availWidth
 var sh = screen.availHeight
 var x = 'left=0,'
 var y = 'top=0,'
 var fs = 'fullscreen=yes,'
 var fs = ''
 var sb = 'scrollbars=auto,'
 var w = ''
 var h = 'height=100,'
 var rs = 'resizable=yes,border=0'

 if (Width<sw-dw) {

	fs = ''
	w =  Width+dw
	w = 'width='+w+','
	x = (screen.width-dw-Width)/2
	x = 'left='+x+','

 } else {

	w = 'width='+(sw-dw)+','
	sb = 'scrollbars=yes,'

 }

 if (Height<sh-dh) {

	fs = ''
	h = Height+dh
	h = 'height='+h+','
	y = (screen.height-dh-Height)/2
	y = 'top='+y+','

 } else {

	h = 'height='+(sh-dh)+','
	sb = 'scrollbars=yes,'

 }
 features = x+y+fs+sb+w+h+rs
// alert(features+"\n"+sw+"  "+sh+"\n"+Width+"  "+Height)
 ViewWindow = window.open(URL,Name,features);
 ViewWindow.border = 0
  if (window.focus) {
    ViewWindow.focus();
  }
//  return false;
}

function addConnectionClick (n) {

 i = new Image()
 i.src = "./log/addconnectionclick.php?type=1&id=" + n
 
}