	function showMap(){		
		if (GBrowserIsCompatible()) {
				var map = new GMap2(document.getElementById("map"));
				map.addControl(new GLargeMapControl3D());				
				map.addControl(new GMapTypeControl());
				map.setCenter(new GLatLng(43.720176,15.901642), 9);
				map.addOverlay(new GMarker(new GLatLng(43.720176,15.901642)));				
		}
	}
	
	//sll=43.488798,16.405334&amp;ll=43.720176,15.901642&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Obala+J.Sizgorica+1,+Sibenik&amp;sll=43.488798,16.405334&amp;sspn=0.179091,0.308647&amp;ie=UTF8&amp;hq=&amp;hnear=Obala+Jerka+%C5%A0i%C5%BEgori%C4%87a,+%C5%A0ibenik,+%C5%A0ibensko-kninska+%C5%BEupanija,+Croatia&amp;z=14&amp;ll=43.720176,15.901642" style="color:#0000FF;text-align:left">View Larger Map</a></small>
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}
	
	function printWindow(){
		window.open("print.php","_blank");
	}

	
	var autoPan=0;
	
	xlokacije = new Array();   //x lokacije na flash mapi
	ylokacije = new Array();		//y lokacije na flash mapi
	kutlokacije = new Array();		//kut koji se dodaje na kut od panoviewera da bi se dobio pravi kut u odnosu na sjever/mapu u flashu
	defkutlokacije = new Array();	  //defaultni kut lokacije koji se uzima pri promjeni lokacije iz flash mape
	//history
	histloc = new Array();
	histkut = new Array();
	histtilt = new Array();
	histfov = new Array();
	histpos = 0;
	histlen = 0;
	
	var showHS;
	
	xlokacije[0]=125;  //soba02
	ylokacije[0]=90;
	kutlokacije[0]=-100;
	defkutlokacije[0]=-75;
	
	xlokacije[1]=65; //kuhinja
	ylokacije[1]=50;
	kutlokacije[1]=-20;
	defkutlokacije[1]=-150;
	
	xlokacije[2]=210;		//soba03
	ylokacije[2]=178;
	kutlokacije[2]=110;
	defkutlokacije[2]=-125;
	
	xlokacije[3]=225; //kupaona01
	ylokacije[3]=70;
	kutlokacije[3]=-34
	defkutlokacije[3]=-150;
	
	xlokacije[4]=90;  //soba01
	ylokacije[4]=165;
	kutlokacije[4]=135;
	defkutlokacije[4]=-115;
	
	lok=0;
	
	var gvTimeoutID;
	
	function ptForward() {
	if (histpos<histlen) {
		histpos++;
		autoPan=0;
		lok = histloc[histpos];
		tlocrt.SetVariable("x", xlokacije[lok]);
		tlocrt.SetVariable("y", ylokacije[lok]);
		tlocrt.SetVariable("kut", histfov[histpos]);
		tlocrt.SetVariable("rotacija", histkut[histpos]+ kutlokacije[lok]);
		document.ptviewer.newPanoFromList(lok, histkut[histpos], 0, 75);
		setBackFowImages();
	}
	}
	
	function ptBack() {
	if (histpos>0) {
		clearTimeout(gvTimeoutID);
		histloc[histpos]=lok;
		histkut[histpos]=document.ptviewer.pan();
		histfov[histpos]=document.ptviewer.fov();
		histtilt[histpos]=document.ptviewer.tilt();
		histpos--;
		autoPan=0;
		lok = histloc[histpos];
		tlocrt.SetVariable("x", xlokacije[lok]);
		tlocrt.SetVariable("y", ylokacije[lok]);
		tlocrt.SetVariable("kut", histfov[histpos]);
		tlocrt.SetVariable("rotacija", histkut[histpos]+ kutlokacije[lok]);
		document.ptviewer.newPanoFromList(lok, histkut[histpos], histtilt[histpos], histfov[histpos]);
		setBackFowImages();
	}
	}
	
	function setBackFowImages() {
		if (histpos>0) { document.images["back"].src="/img/panorama/btn_back.gif"; }
		else { document.images["back"].src="/img/panorama/btn_back_dis.gif"; }
		if (histlen>histpos) { document.images["fow"].src="/img/panorama/btn_fwd.gif"; }
		else { document.images["fow"].src="/img/panorama/btn_fwd_dis.gif"; }
	}
	
	function ChangeLocation(lokacija, kut) {
		clearTimeout(gvTimeoutID);
		histloc[histpos]=lok;
		histkut[histpos]=document.ptviewer.pan();
		histfov[histpos]=document.ptviewer.fov();
		histtilt[histpos]=document.ptviewer.tilt();
		histpos++;
		histlen=histpos;
		autoPan=0;
		lok = lokacija;
		tlocrt.SetVariable("x", xlokacije[lok]);
		tlocrt.SetVariable("y", ylokacije[lok]);
		tlocrt.SetVariable("kut", 70);
		tlocrt.SetVariable("rotacija", defkutlokacije[lok]+ kutlokacije[lok]);
		document.ptviewer.newPanoFromList(lok, defkutlokacije[lok], 0, 70);
		setBackFowImages();
	
	}
	
	function ChangeLocationFromFlash(lokacija) {
		clearTimeout(gvTimeoutID);
		histloc[histpos]=lok;
		histkut[histpos]=document.ptviewer.pan();
		histfov[histpos]=document.ptviewer.fov();
		histtilt[histpos]=document.ptviewer.tilt();
		histpos++;
		histlen=histpos;
		autoPan=0;
		lok = lokacija;
		tlocrt.SetVariable("x", xlokacije[lok]);
		tlocrt.SetVariable("y", ylokacije[lok]);
		tlocrt.SetVariable("kut", 70);
		tlocrt.SetVariable("rotacija", defkutlokacije[lok] + kutlokacije[lok]);
		document.ptviewer.newPanoFromList(lok, defkutlokacije[lok], 0, 70);
		setBackFowImages();
	
	}
	
	
	
	function startZoomIn() {
		document.ptviewer.ZoomIn();
		if (mouseDown==1) setTimeout('startZoomIn()', 40);
	}
	
	function startZoomOut() {
		document.ptviewer.ZoomOut();
		if (mouseDown==1) setTimeout('startZoomOut()', 40);
	}
	
	
	
	function getview(){
		kut = parseInt(document.ptviewer.pan()) + kutlokacije[lok];
		fov = parseInt(document.ptviewer.fov());
		tlocrt.SetVariable("kut", fov);
		tlocrt.SetVariable("rotacija", kut);
	
		if (autoPan!=0) {
			if (document.ptviewer.getAutoPan()==false) {
				autoPan=0;
				document.images["btnleft"].src="../../img/panorama/btn_left.gif";
				document.images["btnright"].src="../../img/panorama/btn_right.gif";
				document.images["btnpause"].src="../../img/panorama/btn_pause_on.gif";
			}
		}
		gvTimeoutID = setTimeout('getview()', 40)
	}
	
	function fixbug1() {
		document.ptviewer.ZoomIn();
		document.ptviewer.ZoomOut();
	//	if (showHS) { document.images["hs"].src='/img/panorama/btn_hotspot_on.gif'; } else { document.images["hs"].src='/img/panorama/btn_hotspot.gif'; }	document.ptviewer.ZoomIn();
		if (showHS) { document.ptviewer.showHS(); } else { document.ptviewer.hideHS(); }
		tlocrt.SetVariable("x", xlokacije[lok]);
		tlocrt.SetVariable("y", ylokacije[lok]);
		getview();
	}
	
	
	function donothing() {
	 self.event.returnValue=false;
	}
	
	help = false;
//	window.resizeTo(560,255);
	function showHelp() {
		if (help==true) {
			window.resizeTo(560,255);
		} else {
			window.resizeTo(560,400);
		}
		help = !help;
	}
