
//

//<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.bakersfieldnet.com/cutelivesupport/web/CuteSoft_Client/CuteChat/images/offline.jpg';
	var chatStatus = 'OFFLINE';
    if(chatStatus == "OFFLINE")
        chatStatus = 'Status: <strong><font color=\"Red\">OFFLINE</font></strong>';
    else
        chatStatus = 'Status: <strong><font color=\"Green\">ONLINE</font></strong>';
	ImageURL = "<img title=\"support chat\" src=\""+ImageURL+"\" border=0>";
    //ImageURL = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\"290\" height=\"155\">" +
					  //"<param name=\"movie\" value=\""+ImageURL+"\" />" +
                     //"<param name=\"quality\" value=\"high\" />" +
                      //"<embed src=\""+ImageURL+"\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"290\" height=\"155\" ></embed>" +
                    //"</object>";
	// write the live support button to the page
	//document.write(chatStatus);
	//document.write('<p align="left">' + chatStatus + '</p> <br />'+ImageURL+'');
	document.write('<p align="left">' + chatStatus + '</p> <br /><a href=\"###\" onclick=\"OpenLiveSupport()\">'+ImageURL+'</a>');
	//document.getElementById("ChatStatus").innerHTML = "Status : " + chatStatus;

}

WriteLiveSupportButton();

function OpenLiveSupport()
{
	var url="http://www.bakersfieldnet.com/cutelivesupport/web/CuteSoft_Client/CuteChat/"+"SupportRedirect.aspx?Referrer="+escape(document.referrer)+"&Url="+escape(location.href)+"&_time="+(new Date().getTime());
	var win;
	try
	{
		win=window.open(url,'',_liveHelpDialogFeature);
	}
	catch(x)
	{
	}
	
	if(win==null)
	{
		alert("Pop-up Blocker Detected.");
	}
}


