isfixed = false

window.onload = function() {
	rewrite('flash')
}

function rewrite(id) {
	var div = document.getElementById(id)
	if(div) div.innerHTML = div.innerHTML
}



function getFlashMovieObject(movieName) {
 	if (window.document[movieName]) {
	//alert(window.document[movieName].id)
		return window.document[movieName];
	}
		
	if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName]; 
	} else  {
		return document.getElementById(movieName);
	}
}



function loadMovie(name) {
	var flashMovie = getFlashMovieObject("demoxml")
	flashMovie.SetVariable("_root.pano.source","images/" + name)
}

function load360(num) {
	document.PanoramaViewer.newPanoFromList(num);	
}


var disp = new Array();
var vt_num;
var vt_height;
var vt_width;

function loadPic(num) {
	var page
	if (disp[num]==4) {
		page = '360.php?v=' + vt_num + '&p=' + num + '&w=' + vt_width + '&h=' + vt_height
	} else if (disp[num]==3) {
		page = '360a.php?v=' + vt_num + '&p=' + num + '&w=' + vt_width + '&h=' + vt_height
	} else if (disp[num]==1) {
		page = '360c.php?v=' + vt_num + '&p=' + num + '&w=' + vt_width + '&h=' + vt_height	
	} else {
		page = '360b.php?v=' + vt_num + '&p=' + num + '&w=' + vt_width + '&h=' + vt_height
	}
	parent.photo.location = page
}

function goNext() {
	if (nextpic>0) 
		loadPic(nextpic)	
}

function goPrev() {
	if (prevpic>0)
		loadPic(prevpic)
}

