/* funktionen används bl.a. till nyheterna. Vid länkar i nyheterna ska det eventuellt länkas tillbaka till opener-fönstret*/
function linkBack(inURL)
{
	var strBaseURL;
	var strPath;
	var strHost;
	var strNewURL
	strBaseURL = 'http://www.uppsala.se/'
	strPath = inURL.pathname
	strHost = inURL.hostname
	
	if (strHost =='')
	{
		strNewURL = strBaseURL + strPath
		window.opener.location = strNewURL
	}
	else 
	{
		strNewURL = inURL
		window.open(strNewURL)
	}
	return false;
}


function go2url(item)
{
  var url;
  url = item.options[item.selectedIndex].value;

  if (url != '0') location.href = url;
}

<!--

function changeImage(imgName,imgObj) 
{
		eval('document.images[\"' + imgName + '\"].src = \"' + imgObj + '\"')
}

function printPop(URL, nrOfColumns)
{
	var width;
	
	if (nrOfColumns == 1) {
		width = 510;
	}
	else {
		width = 620;
	}
	
	window.open(URL, 'Print', 'resizable=1,menubar=yes,scrollbars=1,location=no,toolbar=0,directories=no,width=' + width + ',height=500');
}

function tipFriendPop(URL)
{
	window.open(URL, 'TipFriend', 'resizable=1,menubar=no,scrollbars=0,location=no,toolbar=0,directories=no,width=290,height=290');
}


// Skapar ett nytt "strippat" fönster placerat i punkten x,y med bredden 'bredd',
// höjden 'hojd' och som ska startas upp med sidan 'sidlank'.
function newsPop(x,y,bredd,hojd,sidlank,winName)
{

	var link;
	
	link = sidlank + ''; //&news=YES'
/*	fonster = window.open(link,'' + winName + '', 'width=' + bredd + ",height=" + hojd + ",menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	fonster.focus();*/
	
	fonster = window.open(link,winName,"width=" + bredd + ",height=" + hojd + ",menubar=yes,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	fonster.focus();
}


function calendarPop(x,y,bredd,hojd,sidlank,winName)
{

	var link;
	
	link = sidlank + '&altView=calendar'
/*	fonster = window.open(link,'' + winName + '', 'width=' + bredd + ",height=" + hojd + ",menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	fonster.focus();*/
	
	fonster = window.open(link,winName,"width=" + bredd + ",height=" + hojd + ",menubar=yes,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	fonster.focus();
}

function driftInfoPop(x,y,bredd,hojd,sidlank,winName)
{

	var link;
	
	link = sidlank + '&driftInfo=YES'
	
	fonster = window.open(link,winName,"width=" + bredd + ",height=" + hojd + ",menubar=yes,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	fonster.focus();
}



// Skapar ett nytt "strippat" fönster placerat i punkten x,y med bredden 'bredd',
// höjden 'hojd' och som ska startas upp med sidan 'sidlank'.
function PopWindow(x,y,bredd,hojd,sidlank)
{
	win = window.open(sidlank,"","width=" + bredd + ",height=" + hojd + ",menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=no,dependent=yes,screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x);
	win.focus();
}


// Funktionen öppnar ett fönster och skickar parametrar till kartdatabasen
// där adressen är URL-kodad.
function visa_karta(adress)
{
	if (adress)
	{
		window.open("http://kartor.uppsala.se/SCRIPTS/hsrun.exe/extwebb/int/MapXtreme.htx;start=PrintFrameset?cmd=searchAndZoom&search=" + escape(adress) + "&theme=TURIST");
	}    
}

// Funktionen öppnar ett nytt fönster för kartprogrammet
function openMap()
{
	// Beroende på om IE eller netscape skall kartan startas olika
		// Internet Explorerversionen
	if(navigator.appName.indexOf("Microsoft") != -1){
		setup='toolbar=no,location=no,directories=no,status=no,menubar=no,width=286,height=128';
		setup += 'scrollbars=no,resizable=no,titlebar=no';
		//intWidth = 296
		//intHeight = 158
		url = 'http://kartor.sbk.uppsala.se/jmapapplet/maprunner.htm';
	}
	// Netscapeversionen
	else{
		setup='height=550,width=600,toolbar=no,status=yes,location=no,resizable=yes,scrollbars=yes';
		//intWidth = 296
		//intHeight = 158
		url = 'http://kartor.sbk.uppsala.se/SCRIPTS/hsrun.exe/Distributed/' +
			 'JMapApplet/MapXtreme.htx;start=CreateAppletPage?slump=' + Math.random();
		
	}
	//window.resizeTo(intWidth, intHeight)
	//document.location = url
	window.open(url, 'InternKarta', setup)
}  
 
function openMapExt()
{
	// Beroende på om IE eller netscape skall kartan startas olika

	// Internet Explorerversionen
	if(navigator.appName.indexOf("Microsoft") != -1){
		setup='toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,width=800,height=550';
		setup += ',scrollbars=yes,resizable=yes,titlebar=yes';
	}
	// Netscapeversionen
	else{
		setup='height=550,width=800,toolbar=yes,status=yes,location=yes,resizable=yes,scrollbars=yes';
	}
	
	url = 'http://kartor.uppsala.se/int/index.htm';
		window.open(url, 'ExternKarta', setup)
	//window.close()
}  

//-->