
//

//<script>

// Default window ornaments for the live help dialog
var _liveHelpDialogFeature = "status=1,width=500,height=400,resizable=1";



function WriteLiveSupportButton()
{


	var ImageURL='http://www.ximenes.com.br/atendimento/CuteSoft_Client/CuteChat/images/atendimento_offline.png';

	ImageURL= "<img title=\"support chat\" src=\""+ImageURL+"\" border=0>";

	// write the live support button to the page
	document.write('<a href=\"javascript:void(0);\" onclick=\"OpenLiveSupport();return false;\">'+ImageURL+'</a>');

}

WriteLiveSupportButton();

function OpenLiveSupport()
{
	var hasAgents = false
	var encode=escape
	if(typeof(encodeURIComponent)!="undefined")
		encode=encodeURIComponent;
		
	var url="http://www.ximenes.com.br/atendimento/CuteSoft_Client/CuteChat/"+"SupportRedirect.aspx?Referrer="+encode(document.referrer)+"&Url="+encode(location.href)+"&_time="+(new Date().getTime());
	var win;
	try
	{	if(hasAgents)
		{
			win=window.open(url,'',_liveHelpDialogFeature);
			if(win==null)
			{
				alert("Por favor, desabilite seu bloqueador de pop ups para abrir o atendimento on line.");
			}			
			
		}
		else
			document.location.href = 'contato.aspx';
	}
	catch(x)
	{
	}
	

}


