/**
 * Eximius Solutions
 * 
 * This function 
 * Add current URL to favourites / bookmarks
 * 
 * @return none
 */
function siteBookmark()
{ 
	var currentUrl 		= document.location.href;
	var currentTitle 	= document.title;
	
	var errorMsg		= 'Ova opcija nije podržana u web pretraživaču koji koristite!\n\nPritisnite CTR+D na Vašoj tastaturi kako biste dodali ovu stranu u omiljene linkove!';
	
	var confirmFav		= confirm('URL: ' + currentUrl + '\n\nDodaj adresu u omiljene linkove?');
	
	if(confirmFav == true)
	{
		if (document.all) 
		{
			window.external.AddFavorite(currentUrl, currentTitle); 
		}
		else if(window.sidebar) 
		{
			window.sidebar.addPanel(currentTitle, currentUrl, ''); 
		}
		else if (window.opera && window.print) 
		{			
			alert(errorMsg);
		}
		else 
		{
		    alert(errorMsg);
		}
	}
	
	return false;
}

/**
 * Eximius Solutions
 * 
 * This function 
 * Call print options
 * 
 * @return none
 */
function printPage()
{
	if (window.print) 
	{
		window.print();  
	} 
	else 
	{
		var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
		WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
	}
	
	return false;
}

/**
 * Eximius Solutions
 * 
 * Close message box
 * 
 * @return none
 */
function closeSysMsg()
{
	$('#sys-msg').fadeOut('slow');
}
