// Common javascripts for each page

function topload()
{
	if (this == top) top.location.href="http://www.bolinder-munktell.se/index.htm";
}

function startpage()
{
	top.location.href="http://www.bolinder-munktell.se/index.htm"
}

function pagetop()
{
	this.location.href="#";
}

function docstart()
{
	setEnterPage();
	topload();
}

function docend()
{
	document.write('<a href="#" onClick="history.go(-1)">Tillbaka</a>');
	document.write(' ');
	document.write('<a href="#" onClick="pagetop()">Sidans topp</a>');
	document.write(' ');
}

function picdocstart()
{
	setEnterPage();
	topload();
}
function picstartpage()
{
	this.location.href="./../start.htm"
}

function picdocend()
{
	document.write('<a href="#" onClick="picstartpage()">Startpage</a>');
}

function piccopyright()
{
	document.write('<h5>&copy; http://www.bolinder-munktell.se/</h5>');
}

function mail(who,where,topp)
{
	document.write('<a href="mailto:');
	document.write(who);
	document.write('@');
	document.write(where);
	document.write('.');
	document.write(topp);
	document.write('">');
	document.write(who);
	document.write('@');
	document.write(where);
	document.write('.');
	document.write(topp);
	document.write('</a>')
}

function loadimg(filename)
{

}

function imgpopup(imagetitle,imagename,stylesheet)
{
	var imgpage="<html><head><title>"+imagetitle+"</title>";
	imgpage+="<link rel='stylesheet' type='text/css' href='"
	imgpage+=stylesheet
	imgpage+="'></head>";
	imgpage+="<script>";
	imgpage+="var imagefile = new Image();";
	imgpage+="imagefile.src='"+imagename+"'";
	imgpage+="</script>";
	imgpage+="<body onload='window.resizeTo(imagefile.width+50,imagefile.height+115);self.focus()'>";
	imgpage+="<br><center>";
	imgpage+="<img src='"+imagename+"' border='0'>";
	imgpage+="<br><br><a href='javascript:window.close()'>";
	imgpage+="Stäng fönstret</a>";
	imgpage+="</body></html>";
	imgwin=window.open("","imgwin","dependent,width=80,height=50,scrollbars=no,resizable");
	imgwin.document.write(imgpage);
	imgwin.document.close();
	imgwin.focus();	
}

