/* Browser sensing */
/* Set up boolian variables to record the browser type */
var isNS4 = 0;
var isNS3 = 0;
var isIE4 = 0;
var isIE3 = 0;
var isOld = 0;
var isIE5 = 0;
var isNS5 = 0;
var isIE6 = 0;
var isNS6 = 0;
/****************** its a mac 
var ITSAMAC = 0;
  if (navigator.platform.indexOf("Mac") != -1){

     ITSAMAC = 1}
  else
     ITSAMAC = 0
*/
// Set up other variables
var docObj;
var styleObj;
var topVal;
// 14 Determines the browser name and browser version 
var brow = ((navigator.appName) + (parseInt(navigator.appVersion)));
if (navigator.appName == "Netscape")
{
	if (parseInt(navigator.appVersion) < 4.0)
	alert ("Your browser version " + navigator.appVersion + " not capable of viewing this site! Please update.")
}
else if (navigator.appName == "Microsoft Internet Explorer")
{
	if (parseInt(navigator.appVersion) < 4.0)
	alert ("Your browser version " + navigator.appVersion + " not capable of viewing this site! Please update.")
}
else
	alert ("Your browser version " + navigator.appVersion + " not capable of viewing this site! Please update.")

/* reassign variable depending on the browser */
if (brow == "Netscape4") 
{isNS4 = 1;}
	else if (brow == "Netscape3") 
	{isNS3 = 1;}
else if (brow == "Netscape5") 
	{isNS5 = 1;}
else if (brow == "Netscape6") 
	{isNS6 = 1;}
		else if (brow == "Microsoft Internet Explorer4") 
		{isIE4 = 1;}
			else if (brow == "Microsoft Internet Explorer3") 
			{isIE3 = 1;}
			else if (brow == "Microsoft Internet Explorer5") 
			{isIE5 = 1;}
			else 
			{isOld = 1;}
// 31			
// initalizes our Generic DOM based on the browser
if (isNS4||isIE4||isIE5||isNS5||isNS6||isIE6){
	docObj = (isNS4||isNS5||isNS6) ? 'document' : 'document.all';
	styleObj = (isNS4||isNS5||isNS6) ? '' : '.style';
}

var sum = 0;
var total = 0;


/****************** showsum */
function showsum() {

 var d,dandc;
roomWindow.focus();
dandc = sum;

d = dandc / 100;  // is fractional dollar amount 
d=Math.floor(d) ;  // largest whole number of dollors smaller than d 
c = dandc % 100 ; // remaining cents equivalently c = dandc - d 
c = Math.round(c); // round cents up or down to whole number of cents 
str = d + "." +c;  // make into string 
stopWindow=window.open("", "stopwin", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=170,height=50,left=30,top=230");
stopWindow.focus();
stopWindow.document.write("<body bgcolor=blue>");
stopWindow.document.write("<center><font size=2 color=white>");
stopWindow.document.write("<br>You have $");
stopWindow.document.write(str);
stopWindow.document.write(".</font></center>");
stopWindow.document.close();
}