function browser_name() {
		var browser_name = navigator.appName;
		return browser_name;
	}

	function browser_version() {
		var browser_version = parseFloat(navigator.appVersion);
		return browser_version;
	}

	function browser_os() {
		if(navigator.appVersion.indexOf("Win95") > 0) return "WIN95";
		else if(navigator.appVersion.indexOf("Win16") > 0) return "WIN31";
		else if(navigator.appVersion.indexOf("WinNT") > 0) return "NT";
		else if(navigator.appVersion.indexOf("Mac") > 0) return "MAC";
		else if(navigator.appVersion.indexOf("UNIX") > 0) return "UNIX";
		else return "UNKNOWN";
	}

var browserOk = false;

if (browser_name() == "Netscape" && browser_version() >= 3.0) browserOk = true;
else if (browser_name() == "Microsoft Internet Explorer" && browser_version() >= 3.0) browserOk = true;

function chg_button(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document[titlename].src = "images/button_" + titlename + "_on.gif";
		}
		else
		{
			document[titlename].src = "images/button_" + titlename + "_off.gif";
		}
	}
}


function chg_quickbutton(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document["quickbutton_"+titlename].src = "images/quickbutton_" + titlename + "_on.gif";
		}
		else
		{
			document["quickbutton_"+titlename].src = "images/quickbutton_" + titlename + "_off.gif";
		}
	}
}


function chg_img(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document[titlename].src = "images/button_" + titlename + "_on.gif";
		}
		else
		{
			document[titlename].src = "images/button_" + titlename + "_off.gif";
		}
	}
}


function chg_button_jpg(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document[titlename].src = "/images/button_" + titlename + "_on.jpg"
		}
		else
		{
			document[titlename].src = "/images/button_" + titlename + "_off.jpg";
		}
	}
}

function small_chg(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document[titlename].src = "/images/block_small_on.gif"
		}
		else
		{
			document[titlename].src = "/images/block_small_off.gif";
		}
	}
}

function chg_home(onoff) {

 if (browserOk == true) {
			document.home.src = "/images/button_home_" + onoff + ".jpg";
	}
}


function chg_tab(titlename, onoff) 
{

 if (browserOk == true) {
		if (onoff == "on") {
			document[titlename].src = "/images/tab_" + titlename + "_on.gif"
		}
		else
		{
			document[titlename].src = "/images/tab_" + titlename + "_off.gif";
		}
	}
}

function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}

function displayDate() {
  var this_month = new makeArray(12);
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "July";
    this_month[7]  = "August";
    this_month[8]  = "September";
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "December";
  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getFullYear();
  document.write(this_month[month]+" "+day+", "+year);
}

function open_image (imagefile) {

date = new Date();
counter = Math.floor((date.getSeconds()/60)*100);


	new_window = window.open (imagefile,"a" + counter + "a","width=640,height=450,toolbar=no,location=no,scrollbars=yes,directories=no,menubar=no,resizable=yes");
}


function open_photo (imagefile,orient) {

date = new Date();
counter = Math.floor((date.getSeconds()/60)*100);

if (orient=="h") {
	new_window = window.open ("/images/photo_large/photo_"+imagefile+".jpg","a" + counter + "a","width=520,height=390,toolbar=no,location=no,scrollbars=yes,directories=no,menubar=no,resizable=yes");
}
else {
	new_window = window.open ("/images/photo_large/photo_"+imagefile+".jpg","a" + counter + "a","width=520,height=420,toolbar=no,location=no,scrollbars=yes,directories=no,menubar=no,resizable=yes");
}
}


function open_menu (menuname) {

	new_window = window.open ("menu_"+menuname+".htm",menuname,"width=640,height=450,toolbar=no,location=no,scrollbars=yes,directories=no,menubar=yes,resizable=yes");
}



function open_video (videoname) {

	new_window = window.open (videoname,"video","width=640,height=500,toolbar=no,location=no,scrollbars=no,directories=no,menubar=no,resizable=yes");
}

function rnd() {
	rnd.today=new Date();
	rnd.seed=rnd.today.getTime();
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
}

function rand(number) {
        return Math.ceil(rnd()*number);
}


function insert_photos(number) {

var photo = new Array(); 
var orient = new Array(); 
		
counter = 0;
counter2 = 0;

photo[counter] = "19";
orient[counter] = "h";
counter++;

photo[counter] = "28";
orient[counter] = "h";
counter++;

photo[counter] = "3";
orient[counter] = "h";
counter++;

photo[counter] = "12";
orient[counter] = "h";
counter++;

photo[counter] = "1";
orient[counter] = "h";
counter++;

photo[counter] = "6";
orient[counter] = "h";
counter++;

photo[counter] = "22";
orient[counter] = "h";
counter++;

photo[counter] = "18";
orient[counter] = "h";
counter++;

photo[counter] = "9";
orient[counter] = "h";
counter++;

photo[counter] = "15";
orient[counter] = "h";
counter++;

photo[counter] = "4";
orient[counter] = "h";
counter++;

photo[counter] = "25";
orient[counter] = "h";
counter++;

photo[counter] = "10";
orient[counter] = "h";
counter++;

photo[counter] = "2";
orient[counter] = "h";
counter++;

photo[counter] = "27";
orient[counter] = "h";
counter++;

photo[counter] = "7";
orient[counter] = "h";
counter++;

photo[counter] = "14";
orient[counter] = "h";
counter++;

photo[counter] = "21";
orient[counter] = "h";
counter++;

photo[counter] = "5";
orient[counter] = "h";
counter++;

photo[counter] = "23";
orient[counter] = "h";
counter++;

photo[counter] = "11";
orient[counter] = "h";
counter++;

photo[counter] = "20";
orient[counter] = "h";
counter++;

photo[counter] = "13";
orient[counter] = "h";
counter++;

photo[counter] = "26";
orient[counter] = "h";
counter++;

photo[counter] = "8";
orient[counter] = "h";
counter++;

photo[counter] = "16";
orient[counter] = "h";
counter++;

photo[counter] = "24";
orient[counter] = "h";
counter++;

photo[counter] = "17";
orient[counter] = "h";
counter++;


//date = new Date();
//counter = Math.floor((date.getSeconds()/60)*photo.length);

counter = rand(counter);

while (counter2 < number) {
	if (counter > photo.length-1) { counter = 0; }
	document.write('<a href="#" onclick="open_photo('+photo[counter]+',\''+orient[counter]+'\');"><img border=0 src="images/photo_' + photo[counter] + '.jpg"></a><br>&nbsp;<br>');
	counter++;
	counter2++;
}

}
