var spinplayer = "applet";

function stopPanning () {
       if (spinplayer == "applet" && document.ptviewer) {
		if (!is.macie) {
			document.ptviewer.stopAutoPan();
		}
	}
}

function Is() {
	agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.mac = (agent.indexOf("mac")!=-1);
	this.ie = ((agent.indexOf("msie") != -1)&& (agent.indexOf('opera')==-1));
	this.macie = (this.mac && this.ie);
}

var is = new Is();



/*
function stopPanning () {
       if (document.ptviewer) {
		if (navigator.appVersion.indexOf("Win") == -1 && document.all) {
		} else {
			document.ptviewer.stopAutoPan();
		}
	}
}
*/

function anleitung() {
	stopPanning ();
	var popup = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=300,height=300,');
	var d = popup.document;
	d.write('<!doctype html public -//W3C//DTD HTML 4.0 Transitional//EN" http://www.w3.org/TR/REC-html40/loose.dtd><HTML><HEAD>');
	d.write('<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <TITLE>spin-Anleitung</TITLE> </HEAD> <BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">');
	d.write('<MAP name="control">');
	d.write('<AREA shape=rect coords="52,267,244,292"  alt="schliessen/close" href="javascript:window.close()">');
	d.write('</MAP>');
	d.write('<img src="images/anleitung.gif" width="300" height="300" border="0" usemap="#control">');
	d.write('</BODY></HTML>');
	d.close();
}


function extLink(link) {
	 stopPanning();
        var extWindow = window.open(link, 'newWindow');
}


var popup_img;

function do_popup(img,x,y) {
	popup_img=img;
	popupwindow = window.open('popup.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + (x) + ',height=' + (y+18) + ',');
}


function do_popup_ani(page) {
	window.open('popup_ani' + page + '.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=300,height=468');
}

function init (spot) {
	mhs1 = new Layer('hs1',true);
	mhs1.moveTo(hs[spot][0],hs[spot][1]);
	mhs1.setVis(true);

	for (h=0; h< anzahl_spins; h++) {
		eval("mshs" + h +" = new Layer('shs" + h +"',true)");
		eval("mshs" + h + ".moveTo(hs[" + h + "][0],hs[" + h + "][1])");
		eval("mshs" + h + ".setVis(true)");
	}
}
var anzahl_spins = 10; // Anzahl der spins
var anzahl_hs = 1; // Anzahl der gleichen HotSpots auf dem Plan
var hs = new Array(anzahl_spins); 
for (var a=0; a<anzahl_spins; a++) {
	hs[a] = new Array(anzahl_hs);
}

var link = new Array();

hs[0][0] = "180";
hs[0][1] = "495";
link[0] = "messestand.html";

hs[1][0] = "535";
hs[1][1] = "500";
link[1] = "messestand2.html";

hs[2][0] = "148";
hs[2][1] = "559";
link[2] = "magnum_B.html";

hs[3][0] = "534";
hs[3][1] = "564";
link[3] = "piccolo_A.html";

hs[4][0] = "494";
hs[4][1] = "438";
link[4] = "magnum_A.html";

hs[5][0] = "137";
hs[5][1] = "426";
link[5] = "piccolo_E.html";

hs[6][0] = "660";
hs[6][1] = "530";
link[6] = "exclusive_08/exclusive.html";

hs[7][0] = "35";
hs[7][1] = "512";
link[7] = "magnum_B_grau.html";

hs[8][0] = "317";
hs[8][1] = "429";
link[8] = "piccolo_E_grau.html";

hs[9][0] = "554";
hs[9][1] = "438";
link[9] = "magnum_a_07/magnum_A.html";

link[10] = "2006/magnum_B.html";

link[11] = "crafter_07/crafter.html";


function getPage(s) {
	stopPanning();
	location.href = link[s];
}