function f1(that)
{
	if(that.value == that.title) that.value = ''
}

function f0(that)
{
	if(that.value == '') that.value = that.title
}

function sure()
{
	return confirm('Jeste li sigurni?')
}

function openwin(f, w, h)
{
	var o = navigator.userAgent.search('Opera') == -1 ? false : true
	if(w > 400) w = 400
	if(h > 300) h = 300
	if(w < 80) w = 80
	if(w < 80) h = 80
	var x = w + 50
	var y = h + 60
	var l = Math.round(((o ? parent.window.innerWidth  : screen.width)  - w ) / 2)
	var t  = Math.round(((o ? parent.window.innerHeight : screen.height) - h ) / 2)
	var p = ',directories=no,location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes'
	win = window.open('pop.php?x=' + w + '&y=' + h + '&f=' + f, 'new', 'width=' + x +',height=' + y + ',top=' + t + ',left=' + l + p)
	if (win.window.focus) win.window.focus
	return false
}

function contact(a, f, w, h)
{
	var o = navigator.userAgent.search('Opera') == -1 ? false : true
	var l = Math.round(((o ? parent.window.innerWidth  : screen.width)  - w ) / 2)
	var t  = Math.round(((o ? parent.window.innerHeight : screen.height) - h ) / 2)
	var p = ',directories=no,location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes'
	win = window.open('contact.php?t=' + a + '&f=' + f, 'new', 'width=' + w +',height=' + h + ',top=' + t + ',left=' + l + p)
	if (win.window.focus) win.window.focus
	return false
}

function checkkey()
{
	if(event && event.keyCode)
		switch(event.keyCode)
		{
			case 27 :
				if(window.close) window.close()
		}
}

function analyze(obj)
{
	if(obj && obj.form && obj.form.submit) obj.form.submit()
}

