function openwin(a,b,c,d)
	{
		var questionMark = '?';	

		if(document.all)
		{
			if(tmp)
			{
				tmp.close();
			}
		}	
			widthscr = eval(screen.availWidth/2) - eval(b/2);
			heightscr = eval(screen.availHeight/2) - eval(c/2);
			
			// check if there is a ? in url already - lap
			if (a.indexOf('?') != -1)
                        {
				questionMark = '&';						
			}

			if (b == '' && c == '')
			{
				var tmp = window.open(a+ questionMark + 'nocache=' + (Math.random() * 99999),'tmp', 'width='+Math.round(eval(d * screen.availWidth))+',height='+Math.round(eval(d * screen.availHeight))+',left='+eval(eval(screen.availWidth/2) - Math.round(eval(d * screen.availWidth/2)))+',top='+eval(eval(screen.availHeight/2) - Math.round(eval(d * screen.availHeight/2)))+',scrollbars,resizable');
			}
			else
			{
				var tmp = window.open(a+ questionMark + 'nocache=' + (Math.random() * 99999),'tmp','width='+b+',height='+c+',left='+widthscr+',top='+heightscr+',scrollbars,resizable');
			}
			if(document.layers)
			{
				opener.reload();
			}
			tmp.focus();
	}
	