<!--

//BROWSER SNIFF
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isDHTML = (isIE5 || isIE6 || isNS6);
var isPc = navigator.userAgent.indexOf("Windows") != -1;
var isMac = !isPc;

var obj = null;

if(!isDHTML) {
	document.location.replace('oldbrowser.htm');
}

//FUNCTIONS

function swap(name,state) {
    if(document.images) {
        document.images[name].src = eval(name + state + ".src");
    }
}

function popup(location) {
	var dx=500;
	var dy=380;

	var w = window.open(location, 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=no,toolbar=no');
	w.focus();
}

function slideShow(numPics,thisPic,room) {
	while (thisPic <= 0) { thisPic = thisPic + numPics; }
	while (thisPic > numPics) { thisPic = thisPic - numPics; }

	var newVis;
	var obj = null;

    if (isNS6 || isIE4 || isIE5){
        var hidden = 'hidden';
        var visible = 'visible';
    } else if (document.layers){
        var hidden = 'hide';
        var visible = 'show';
    }

    newVis = visible;
	if (isIE4){
		obj = eval('document.all.pic' + thisPic + '.style');
        obj.visibility = newVis;
	} else if (isIE5){
        obj = eval('document.all.pic' + thisPic);
		obj.style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=1)";
		obj.filters[0].Apply();
        obj.style.visibility = newVis;
		obj.filters[0].Play();
    } else if (isNS6){
        obj = document.getElementById('pic' + thisPic);
        obj.style.visibility = newVis;
    }

    newVis = hidden;
	for (i = 1; i <= numPics; i++) {
		if (i != thisPic) {
			var obj = null;
			if (isIE4){
				obj = eval('document.all.pic' + i + '.style');
				obj.visibility = newVis;
			} else if (isIE5){
				obj = eval('document.all.pic' + i);
				obj.style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=1)";
				obj.filters[0].Apply();
        		obj.style.visibility = newVis;
				obj.filters[0].Play();
			} else if (isNS6){
				obj = document.getElementById('pic' + i);
				obj.style.visibility = newVis;
			}
		}
	}
	
	document['pic'+thisPic+'img'].src = '../images/pop/pic_pop_'+room+thisPic+'.jpg';
}


//-->

