// Javascript written by Charlie @ Elgholm Group AB
// (c) 2009 islandshest.se

// Not made by "GC Stockholm" (neither is the website even if stated so)

function newWindow(u,n,o)
{
  var w=window.open(u,n,o);
  if(!w){
    alert("Kan inte öppna nytt fönster! Om du har en fönsterblockerare installerad behöver du inaktiva den, alternativt hålla inne CTRL-tangenten när du klickar på länken.");
    return false;
  }
  w.focus();
  return w;
}

function showMovie2(movie, width, height)
{
  newWindow("/special/film.csp?movie="+movie+"&width="+width+"&height="+height, "FlashVideoWindow", "toolbar=no,location=no,scrollbars=no,resizable=no,menubar=no,status=no,height="+(height+40+0)+",width="+(width+0));
}

function printMe(title)
{
	var t=0;
	var pd=document.getElementById("printCanvas");
	if(!pd){
		alert("Inget område att skriva ut!");
		return;
	}
         var pw=newWindow("", "winPrint", "toolbar=no,location=no,menubar=yes,height=800,width=720");
         if(!pw) return;

	var doc=pw.document;
	doc.open("text/html", "replace");
	doc.writeln('<html>');
	doc.writeln('<head>');
	doc.writeln('<title>'+title+'</title>');
	doc.writeln('<link href="/special/style.css" rel="stylesheet" type="text/css">');
	doc.writeln('</head>');
	doc.writeln('<body style="background:white;" onload="window.print();">');
	
	doc.writeln(pd.innerHTML);
	
	doc.writeln('</body>');
	doc.writeln('</html>');
	doc.close();
};
