<!--
// Modified 05.25.2003
// Kevin Klawon
// icontact Request NetRep
// WIT v2.3
var appCodeName = navigator.appCodeName;

// 4.5.4 server
//var binPath ="http://support.rockymountaineer.com/bin/icx.dll";
//var bin_sslPath ="https://support.rockymountaineer.com/binssl/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("Help");

if (document.location.href.indexOf("reservation") >= 0) (icName = "reservation");
//else if (document.location.href.indexOf("wamu") >= 0) (thisZone = "WAMU")

// If you are only reactive, uncomment these - they are defined in wit-prnf.js
//var thisPage = escape(document.location);
//var thisTitle = escape(document.location);

//var ic_initCookie = new Image(1,1);
//ic_initCookie.src = c_dllPath + "?initcookie?0";

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) 
	{
	    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?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.");
	}
    
}

//-->