// usage: <a href="html-or.jpg" onclick="return popup(this, 123 ,456, 'titel', true|false)" title="..." 

var pop = null; 
function popdown() 
{ 
	if (pop && !pop.closed) 
		pop.close(); 
} 

function popup(obj, width, height, full) { 
	var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href; 
	if (!url) 
	return true; width = (width) ? width : 150; 
	// 150px*150px is the default size 
	height = (height) ? height : 150; 
	if (full) {
		var args = 'width='+width+',height='+height+',resizable,toolbar=yes,location=yes, scrollbars=yes'; 
	} else {
		var args = 'width='+width+',height='+height+',resizable'; 
	}
	popdown(); 
	pop = window.open(url,'',args);
	return (pop) ? false : false; 
} 
window.onunload = popdown; window.onfocus = popdown; 

function goTo(hrefLink)
{
	location.href= hrefLink;
}

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable=yes,copyhistory=no,width=670,height=540,screenX=180,screenY=120,top=120,left=180')
}
function popupImage(url, width, height) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable=no,copyhistory=no,width='+width+',height='+height+',screenX=180,screenY=120,top=120,left=180')
}
