function em(object) {
	var eml = '';
	if (object.st)
		eml = eml + object.st;
	
	if (object.nd)
		eml = eml + '@' + object.nd;
	else
		eml = eml + '@'+'lee'+'-'+'vez.hr';
	
	eml = 'm'+'ail'+'t'+'o:' + eml;	
	return '<a href="'+eml+'">'+eml.substr(7,eml.length-7)+'</a>';
}

var browser = Object;
browser.userAgent = navigator.userAgent.toLowerCase();
browser.is_opera  = (browser.userAgent.indexOf('opera') != -1);
browser.is_ff     = (browser.userAgent.indexOf('firefox') != -1);
browser.is_saf    = ((browser.userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == "Apple Computer, Inc."));
browser.is_webtv  = (browser.userAgent.indexOf('webtv') != -1);
browser.is_ie     = ((browser.userAgent.indexOf('msie') != -1) && (!browser.is_opera) && (!browser.is_saf) && (!browser.is_webtv));
browser.is_ie4    = ((browser.is_ie) && (browser.userAgent.indexOf("msie 4.") != -1));
browser.is_moz    = ((navigator.product == 'Gecko') && (!browser.is_saf));
browser.is_kon    = (browser.userAgent.indexOf('konqueror') != -1);
browser.is_ns     = ((browser.userAgent.indexOf('compatible') == -1) && (browser.userAgent.indexOf('mozilla') != -1) && (!browser.is_opera) && (!browser.is_webtv) && (!browser.is_saf));
browser.is_ns4    = ((browser.is_ns) && (parseInt(navigator.appVersion) == 4));

function otvori(id) {
	var scrwidth=667;
	var scrheight=730;
	var top=Math.round(screen.height/2-scrheight/2-100);
	var left=Math.round(screen.width/2-scrwidth/2-100);
	var win = window.open('proizvod.php?id='+id,'Detaljnije','toolbar=0,status=0,scrollbars=1,resizable=0,menubar=0,width='+scrwidth+',height='+scrheight+',top='+top+',left='+left);
}

function slideItIn() {
	var box = Ext.get('box-content');
	var slider = box.child('div.content-slider');
	slider.slideIn('l',{duration: .5, callback: function() {
		setTimeout("fadeItOut();", 3500);		
	}});
}

function fadeItOut() {
	var box = Ext.get('box-content');
	var slider = box.child('div.content-slider');
	slider.fadeOut({duration: .8, callback: function() {
		slideItIn();
	}});
}

/*window.onload = function() {
	slideItIn();
}*/
