var chat_width = 494;
var chat_height= 418; //400;
var ptTimeOut= 30000;
var xmlHttp = null;

var cookieGuid = "25appg2lu435mz55izv4ki55" ;
var mode = '1' ;
var strX ='20'
var strY ='30'
var DeptID = "";
var Agent = "";

str = "https://livechat04.volusion.com/?ID=186550";
str = str.toLowerCase();
idx = str.indexOf("/?id=");
 
var domain = str.substring(0,idx);
var statsURL = domain+"/statsupdater.aspx?Command=";
var cOrderID = str.substring(idx+5);
var strSRC = domain + "/images/livechat_online.gif"; //+"?"+new Date(); 
var divImage;
 
var tType = ""; 
var documentURL =escape("");
var VolusionScriptError= "If you are getting this message, it is  because\r\na) The Volusion Live Chat javascript has been modified from its original code.\r\n(You must re-copy the script from the SETTINGS screen of your live chat software, and re-paste it to your website.\r\nor\r\nb) The Volusion Live Chat javascript is pasted more than once in this page.\r\n(Remove extra copy of this script on this page)";
var divImage;
var IS_IE = false;
var is_ff = false;
var postCount=0;    
var startPost = new Date();   
    

if(document.all) IS_IE = true;
else is_ff = true;

if(is_ff)
    chat_height += 4;


function LaunchVolusionChat(auto)
{
    var today = new Date();
    var request_url = domain+"/livechat.aspx?ID="+cOrderID+"&location="+documentURL.toLowerCase()+"&auto="+auto+"&cookieGuid="+cookieGuid+"&DeptID="+DeptID+"&Agent="+Agent+"&tType="+tType;
    /*if(cOrderID=="24342" && auto==0)
    {
      request_url = domain+"/livechat_volusion.aspx?&location="+documentURL.toLowerCase()+"&auto="+auto+"&cookieGuid="+cookieGuid+"&DeptID="+DeptID+"&Agent="+Agent+"&tType="+tType;
      if(IS_IE) chat_height+=10;
    }*/
    window.open( request_url, today.getTime(), 'scroll=yes,scrollbars=yes,menubar=no,resizable=0,location=no,screenX=50,screenY=100,width=' + chat_width + ',height='+chat_height ) ;
}

 
function AutoPrompt()
{
   DeptID = '0';
   url = statsURL + "ISPROMPTOK&OrderID="+cOrderID+"&DeptID="+DeptID+"&Do=Approve&dt="+new Date()+"&cookieGuid="+cookieGuid;
   // hln 
   //alert(url);
   document.getElementById("imgChat").src = url;
   
}

 

