
  var isMute=false;
  var whichSound = 0;

  function crossfade (soundid,sitename,siteid) {
    whichSound = soundid;
	var movie = window.document.Demo;
    if (movie && isMute==false) {
	  movie.GotoFrame(soundid);
    }

	var so = new SWFObject("http://www.hotellinde.at/flash/slideshow.swf?cid="+sitename, "mxmask", "541", "364", "8", "#000000");
	so.addParam("wmode", "opaque");
	so.write("navigationbox");
	
	bottomBox = document.getElementById('bottombox');
	bottomBox.style.backgroundImage = 'url(http://www.hotellinde.at/images/bg_bottom_'+sitename+'.gif)';

	changeContent(siteid);
	
	return false;
  }
  
    function stopsound () {
	var movie = window.document.Demo;
    if (movie) {
	  movie.GotoFrame(6);
    }
	
	isMute=true;
	return false;
  }
    
	function startsound () {
	var movie = window.document.Demo;
    if (movie) {
	  movie.GotoFrame(whichSound);
    }
	
	isMute=false;
	return false;
  }
  
  
// ---------------------------- dynamic content ------------------------

	function changeContent(cid)
	{
		http.open('get', './getcontent.php?cid='+cid);
		http.onreadystatechange = handleSearchResultResponse;
		http.send(null);
	}

  function createRequestObject() {
		var ro;
		var browser = navigator.appName;
		if(browser == "Microsoft Internet Explorer"){
			ro = new ActiveXObject("Microsoft.XMLHTTP");
		}else{
			ro = new XMLHttpRequest();
		}
		return ro;
	}
	
	var http = createRequestObject();
	
	function handleSearchResultResponse() {
		if(http.readyState == 4){
			var response = http.responseText;
			// write page
			if(response.indexOf('|' != -1)) {
				update = response.split('|');	
				document.getElementById('dyntitle').innerHTML = update[0];
				document.getElementById('dyncontent').innerHTML = update[1];
			}
		}
	}
	

