
//

//<script>

// Default window ornaments for the live help dialog
var _liveHelpDialogFeature = "status=1,width=500,height=400,resizable=1";


function WriteLiveSupportButton()
{
	var onlineImageURL = 'notonline';
	var ImageURL       = 'http://www.bolderimage.com/chat/CuteSoft_Client/CuteChat/images/BlackPixel.png';
	var ImageURLOver= 'http://www.bolderimage.com/chat/CuteSoft_Client/CuteChat/images/BlackPixel.png';

	document.write('<div id=\"phone_number\">');
	document.write('<img src=\"/imgs/phone_number.gif\" alt=\"Chicago Website Design | Call 630.279.4000 for Chicago Web Design\"  />');

	//	this was the easiest way to test the return from CuteChat.ChatWebUtility.HasReadyAgents()
	if (ImageURL == onlineImageURL)
	{
		document.write('<span id=\"chat\">');
		var anchor1 = "<a href=\"#\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image7','','" 
			+ ImageURL
			+ "',1)\"  onclick=\"OpenLiveSupport()\">";
		var anchor2 = "<img src=\"" 
			+ ImageURLOver
			+ "\" name=\"Image7\" width=\"104\" height=\"37\" border=\"0\" id=\"Image7\" />";	
	
		// write the live support button to the page
		document.write(anchor1);
		document.write(anchor2);
	
		document.write('</a>');
	}
	else
	{
	document.write('<span id=\"nochat\">');
	}
	
	document.write('</span>');
	document.write('</div>');

}
WriteLiveSupportButton();

function OpenLiveSupport()
{
	var encode=escape
	if(typeof(encodeURIComponent)!="undefined")
		encode=encodeURIComponent;
		
	var url="http://www.bolderimage.com/chat/CuteSoft_Client/CuteChat/"+"SupportRedirect.aspx?Referrer="+encode(document.referrer)+"&Url="+encode(location.href)+"&_time="+(new Date().getTime());
	var win;
	try
	{
		win=window.open(url,'',_liveHelpDialogFeature);
	}
	catch(x)
	{
	}
	
	if(win==null)
	{
		alert("Pop-up Blocker Detected.");
	}
}


