
var strRubr="";
function skapaRubrik (strRubr)
{
  strRubr= "<div style='text-align:left;font-size:12pt;'>" + strRubr + "</div> ";
  document.write ("<tr>");
  document.write ("<td nowrap='NOWRAP' height='42' class='greybottom' >");
  document.write ("<div align='left' class='bodycaption'>");
  document.write ("<a href='http://www.harplingekvarn.se/main/' target='_blank'>");
  document.write (" <img src='../images/foreningen410x42.jpg' width='410' height='42' border='0'></A>");
  document.write ("</div></td></tr>");
  document.write ("<TR vAlign='top'>");
  document.write ("<TD height='20' class='hdline' id='btitle' nowrap='NOWRAP'>");
  document.write (strRubr);
  document.write ("</TD></TR> ");
}

function doPrint() {
	var NN = (navigator.appName.substring(0,8) == "Netscape");
	var IE = (navigator.appName.substring(0,9) == "Microsoft");
	if(NN) VERSION = ((navigator.appVersion.indexOf("4.") != -1));
	if(IE) VERSION = ((navigator.appVersion.indexOf("5.") != -1));
	if ((NN || IE) && VERSION ) { window.print();return (true);}
	else {alert('För att skriva ut tryck CTRL+P.');
	return (false);}
}

function PrintInformation() {
        /* alert('Välj i meny Arkiv\r     Utskriftsformat...\r       Liggande\r och sedan Skriv ut.'); */
	return (false);
}

function PopUpWinPrint(pathname)
{
	var finalname = escape(pathname);
	hWnd = window.open(pathname, "Print", "width=800,height=630,location=yes,menubar=yes,scrollbars=yes,toolbar=no,resizable=yes");
	hWnd.focus()
	return;
}

function printPage() 
{
	var da = (document.all) ? 1 : 0;
	var pr = (window.print) ? 1 : 0;	
	if(!pr)
	{
		window.status = "No print";
		return;
	}	
	var printArea = document.getElementById("PrintArea");	
	if(printArea == null && da) 
		printArea = document.all.PrintArea;	
	if(printArea) 
	{
		var sStart = "<html><head><TITLE>Utskrift från www.harplingekvarn.se</TITLE><SCRIPT language=\"JavaScript1.2\" src=\"../java/js_lib.js\" type=\"text/javascript\"></SCRIPT><link rel=\"stylesheet\"  type=\"text/css\" href=\"../style/mall.css\"></head><body>";
		sStop = "</body></html>";
		var w = window.open('about:blank','printWin','width=800,height=600,scrollbars=yes,,menubar=yes');
		wdoc = w.document;
		wdoc.open();
		wdoc.write( sStart + printArea.innerHTML ) ;
		wdoc.writeln( sStop );
		wdoc.close();
		w.print();
	}
}

function newsSend(url) {
var setWidth = 500;
var setHeight = 240;
var setLeft = (screen.width / 2) - (setWidth / 2);
var setTop = (screen.height / 2) - (setHeight / 2);
var newsPopup = window.open( url, 'NewsPopup', 'height=' + setHeight + ',width=' + setWidth + ',left=' + setLeft + ',top=' + setTop + ',scrollbars=auto,resizable=yes,status=yes');
newsPopup.focus();
}
function newsPrint(url) {
var setWidth = 800;
var setHeight = 650;
var setLeft = (screen.width / 2) - (setWidth / 2);
var setTop = (screen.height / 2) - (setHeight / 2);
var newsPrint = window.open( url, 'NewsPrint', 'height=' + setHeight + ',width=' + setWidth + ',left=' + setLeft + ',top=' + setTop + ',scrollbars=yes,resizable=yes,status=yes,menubar=1');
newsPrint.focus();
}

function CalendarPrint(url) {
var setWidth = 950;
var setHeight = 650;
var setLeft = 0;
var setTop = 0;
var newsPrint = window.open( url, 'CalendarPrint', 'height=' + setHeight + ',width=' + setWidth + ',left=' + setLeft + ',top=' + setTop + ',scrollbars=yes,resizable=yes,status=yes,menubar=1');
newsPrint.focus();
}

var height = 600;
var width = 800;
browserName=navigator.appName;
browserVer=parseInt(navigator.appVersion);
if ((browserVer >= 4 & browserName == "Netscape") | (browserVer >= 4 & browserName == "Microsoft Internet Explorer"))
    version="4";
else
    version="3";
if (version=="4") {
    width = screen.width;
    height = screen.height;
}

function start()
{
     window.open("index.htm", "bigwindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizeable=yes,width="+(width-12)+",height="+(height-55)+",left=0,top=0");

}

function openWindowWithVariableSize(url, w, h)
{
    hWnd = window.open(url, "", "width="+(w+50)+", height="+(h+50)+",top=0,left=0,scrollbars=yes,resizeable=yes,status=yes");
       hWnd.focus()
	return;
}

function openWindow(url, w, h)
{
    hWnd = window.open(url, "", "width="+w+",height="+h+",scrollbars=yes");
	hWnd.focus()
	return;
}

/* start modala fönster */
function openModalWindow(theURL,mySize) {
	if (mySize=="") {mySize='dialogWidth:410px;dialogHeight:430px;center:1;scroll:0;help:0;status:0';}
	openModalWindow(theURL,mySize);
}

/* slut modala fönster */

/* start öppna fönster för Opera och Netscape */

function newWin(URL,winWidth,winHeight) {
		 var screenWidth, screenHeight;		 
		 //winWidth = 640;
		 //winHeight = 480;		 
		 //screenWidth = 800;
		 //screenHeight = 600;
		 screenWidth = 1024;
		 screenHeight = 768;
		 
    	 if (window.screen) {
         	screenWidth = window.screen.availWidth;
        	screenHeight = window.screen.availHeight;
		 }
	   else if (document.all) {
		 screenWidth = screen.width;
		 screenHeight = screen.height;
		 }
	   else if (document.layers) {
		 screenWidth = window.outerWidth;
		 screenHeight = window.outerHeight;
		 }
		 // set stats for viewer window
	  myWindowStats = 'copyhistory,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,titlebar=no,dependent=yes';
		 if (winWidth >= screenWidth || winHeight >= screenHeight) {
		   // too large, fullscreen or maximize
		 	if (document.layers) {
			// maximizing, if Netscape
         	        netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
			myWindowStats += 'scrollbars=yes,screenX=0,screenY=0,'
			// more commandos for fullscreen netscape
		 	}
		 	else {
			// for ie fullscreen
		 	myWindowStats += 'scrollbars=auto,fullscreen'
			}
		 }
		 		 else {
		 // not maximized, adjust size  var screenX = (screenWidth/2 - winWidth/2);		 var screenY = (screenHeight/2 - winHeight/2);	
		 winWidth = screenWidth
		 winHeight = screenHeight
		 myWindowStats += 'scrollbars=yes' + ',width=' + winWidth + ',height=' + winHeight + ',left=0,top=0';
		 }
		 myWindowTitle = 'Bildspel '
		 myWindowCode = window.open (URL,'',myWindowStats)
         //var str = 'winWidth=' + winWidth + ' winHeight=' + winHeight +'
		 //alert( str) 
} 


/* slut öppna fönster för Opera och Netscape */


/* start hantera pussel */
function jigsawRun() {
	var temp = new Image();
	var loc;
	var gotit;
	function checkit()
	{
        if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
          return;
        else
          alert("För att spela,krävs MS Internet Explorer 4 eller senare");
	}
	function exch()	{
          if ((event.button == 1) && (event.srcElement.className == "drag"))
             {
                 if (gotit == 1)
                {
                        gotit = 0;
                        document.images[loc].src = document.images[event.srcElement.name].src;
                        document.images[event.srcElement.name].src = temp.src;
                }
                else
                {
                        gotit = 1;
                        loc = event.srcElement.name;
                        temp.src = document.images[loc].src;
                }
           }
	}
  document.onmousedown=exch;
}
/* slut hantera pussel */

function reportError(msg,url,line) {
  var str = "Felmeddelande: \n" + msg + "\nRad nr: "  + line + "\nURL: " + url;
  alert(str);
  return true;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; 
  document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
  document.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  window.focus();
}


<!-- put a message at the bottom of the screen for 5 seconds -->
function setStatusMessage(txt){
   window.status = txt;
   setTimeout("remove_message()",5000);
}

function remove_message(){
   window.status="";
}

function sidfot(linjebredd,myFileName){
if (myFileName == "") {myFileName="noName"}
var txt='<TR><TD align=left valign=bottom ><IMG SRC="../bilder/bluedot.gif" width="'+linjebredd+'" HEIGHT="20" ALT=""></TD></TR>';
document.write(txt);
txt='<TR><TD><Table align=left width="'+linjebredd+'" border=1 cellspacing=0 cellpadding=0><TR><TD align=left valign=middle width=100>'
document.write(txt);
txt='<a href="javascript:history.back()";><IMG border=0 src="../bilder/go_back2.gif" width=53 height=10 alt="Tillbaka till förra sidan"></a>'; 
document.write(txt);
document.write("</TD><TD align=left width='100'>");        	 
document.write("<a href='../index.htm' target='_top'><IMG border=0 src='../bilder/go_start.gif' width=48 height=10 alt='Till start sidan'></A>");
document.write("</TD><TD align=left width='100'>");
document.write("<A HREF=#Toppen><IMG border=0 src='../bilder/go_top2.gif' width=41 height=10 alt='Till toppen'></a>");

/* tag bort presentation av filnamnet */
txt='</TD><TD align=right class=mini>'+myFileName+'</TD></TR></Table>'; 
/*txt='<TD align=right>&nbsp;</TD></TR></Table>' */

document.write(txt);        

}

function getDocumentDate(){
var modDate = new Date(document.lastModified);
var modMonth = modDate.getMonth()+1;
var modYear = modDate.getYear();
var modDay = modDate.getDate();
if(modDay<10) modDay = "0" + modDay;
if(modMonth<10) modMonth= "0" + modMonth; 
if(modYear<1000) modYear+=1900;
document.write(modYear + "-" + modMonth +  "-" + modDay + "");
}

function getTime(){
var txt='<TR><TD align=left valign=bottom ><IMG SRC="../bilder/bluedot.gif" width="'+linjebredd+'" HEIGHT="20" ALT=""></TD></TR>';
document.write(txt);
document.write(modYear + "-" + modMonth +  "-" + modDay + "");
}
