// ######################## ###################### ##########################
//							   COLLECTION MESSAGE COMMON FUNCTIONS 
// ######################## ###################### ##########################

//declare global variables

var url = "/command?action=ev_user_action&siab_microsite=auto_ecare&cd_dir_path=segment_offers&user_action_name=Click To Talk";


function openToAcctSummary()
		{ 
		    document.location.href="/acct_summary"; 
		}
		
		
function openBillPayWindow()
		{
			paymentwindow = window.open('/single_sign_on_collflow','','screenX=0,screenY=0,left=0,top=0,width=800,height=550,resizable=yes,scrollbars=yes,toolbar=no,locationbar=no,personalbar=no,menubar=no');
			paymentwindow.focus();
			document.location.href="/account_summary";
		}


		// get the type of XMLhttp object based on the browser verion
function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
      	{		
      	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      	}
      //if AJAX is not supported
      catch(e){
		  alert ("Your browser does not support AJAX!");      
		}  
      }
    }
  return xmlHttp;
}

// Make the call to AJAX 
function openClickToTalk(){
   	xmlHttp = GetXmlHttpObject();
	if (xmlHttp==null){
		return;
	} 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}