<!--
// Modified 05.25.2003
// Kevin Klawon
// icontact Request NetRep
// WIT v2.3
var appCodeName = navigator.appCodeName;

// 4.5.4 server
var binPath ="http://palace.intersighttechnologies.com/bin/icx.dll";
var bin_sslPath ="http://palace.intersighttechnologies.com/bin/icx.dll";
var c_dllPath;


if (location.protocol == "http:") c_dllPath = binPath;
else if (location.protocol == "https:") c_dllPath = bin_sslPath;

var thisPage = escape(document.location);
// This will show up as the "Name" column in the Reactive column
// You can either hard code for each site and use this
var icName = escape("Palace");
var thisZone = escape("Palace");

//var thisPage = escape(document.location);
//var istTitle = escape(document.title);
var istTitle = escape(document.location);


if (self.name == "content")
{ 
	//alert(thisZone);
	// We are engaged in chat, so make the remaining calls to the server
    var ic_uppage    = new Image(1,1);
    var ic_pnotify   = new Image(1,1);
    var ic_zoneinfo  = new Image(1,1);
    
    ic_uppage.src = c_dllPath + "?uppage?" + thisPage + "&" + getRandom();
    ic_pnotify.src = c_dllPath + "?pnotify?" + thisTitle + "&" + getRandom();
    ic_zoneinfo.src = c_dllPath + "?zoneinfo?" + thisZone + "&" + getRandom();
   
}

function getRandom()
{
        var max_random = 32000;
        return Math.floor(max_random * Math.random());
}

function requestNetRep()
{
 
	// Validate that cookies are on               
	document.cookie="verifyCookie=test; path=/;"; 
	
	if (document.cookie.length > 0) 
	{
		var ic_initCookie = new Image(1,1);
		ic_initCookie.src = c_dllPath + "?initcookie?0";
		
	    if(self.name != "content") 
		{
		    // validate the chatsever is up - KTK
		    var ic_uppage = new Image(1,1);
		    ic_uppage.onload = callTimer;
		    ic_uppage.onerror = callNetworkError;  
		    ic_uppage.src = c_dllPath + "?uppage?" + thisPage + "&" + getRandom();  
		 }
	        
	} else {
	    alert("You have cookies disable.\n\nIn order to use live chat, cookies must be enabled"); 
	}              
}

function callNetworkError()
{
    alert("Please accept our apologies, we can not manage your chat request at this time.\n\nPlease try again later.");
}

function callTimer()
{   
    var ic_uppage    = new Image(1,1);
    var ic_pnotify   = new Image(1,1);
    ic_uppage.src = c_dllPath + "?uppage?" + thisPage + "&" + getRandom();
    ic_pnotify.src = c_dllPath + "?pnotify?" + thisTitle + "&" + getRandom();
    var ic_zoneinfo     = new Image(1,1); 
    ic_zoneinfo.src = c_dllPath + "?zoneinfo?" + icName;
    
    //  call sinfo so chat server gets the user name
    var ic_sinfo     = new Image(1,1); 
    ic_sinfo.src = c_dllPath + "?sinfo?" + icName;
    
    
    // Netscape ver 7 is async, so make sure the chat system gets the name field - KTK
    setTimeout("callNetRep()", 1500);
}

function callNetRep()
{
    if (navigator.appVersion.indexOf("Safari") < 0)
	{
	    // this opens the frameset
	    self.moveTo(0,0);
	    window.resizeTo(screen.width,screen.height);
	    top.location = c_dllPath + "?request_netrep?" + thisPage;
	    //top.location = c_dllPath + "?request_netrep?https://" + document.location.host + document.location.pathname + document.location.search;
	} else {
		alert("Please accept our apologies, but there is currently a problem with the Safari browser and our chat program.\n\nYour chat request can be handled if you use another brower(Like IE for the MAC).\n\nWe are working on resolving the problem.");
	}
}
//alert("loaded wit-palace-rqnr.js");

//-->