
////////////////////////////////////////////////////////////////////////////////////
// CONFIGURATION
////////////////////////////////////////////////////////////////////////////////////

// Main background color (the large area)
// Usually a bright color (white, yellow etc) CCCCFF
	if (typeof fcolor == 'undefined') { var fcolor = "#000000";}
	
// Border color and color of caption
// Usually a dark color (black, brown etc) 333399
	if (typeof backcolor == 'undefined') { var backcolor = "#00FF00";}
	
	
// Text color
// Usually a dark color
	if (typeof textcolor == 'undefined') { var textcolor = "#00ff00";}
	
// Color of the caption text
// Usually a bright color
	if (typeof capcolor == 'undefined') { var capcolor = "#00FF00";}
	
// Color of "Close" when using Sticky
// Usually a semi-bright color
	if (typeof closecolor == 'undefined') { var closecolor = "#9999FF";}
	
	
// Width of the popups in pixels
// 100-300 pixels is typical
	if (typeof width == 'undefined') { var width = "200";}
	
// How thick the border should be in pixels
// 1-3 pixels is typical
	if (typeof border == 'undefined') { var border = "1";}
	
	
// How many pixels to the right/left of the cursor to show the popup
// Values between 3 and 12 are best
	if (typeof offsetx == 'undefined') { var offsetx = 40;}
	
// How many pixels to the below the cursor to show the popup
// Values between 3 and 12 are best
	if (typeof offsety == 'undefined') { var offsety = 12;}

	


////////////////////////////////////////////////////////////////////////////////////
// END CONFIGURATION
////////////////////////////////////////////////////////////////////////////////////

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

// Microsoft Stupidity Check.
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	} else {
		ie5 = false; }
} else {
	ie5 = false;
}

var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr = 1;
if ( (ns4) || (ie4) ) {
	if (ns4) over = document.overDiv
	if (ie4) over = overDiv.style
	document.onmousemove = mouseMove
	if (ns4) document.captureEvents(Event.MOUSEMOVE)
}

// Public functions to be used on pages.

// Simple popup right
function drs(text) {
	dts(1,text);
}

// Caption popup right
function drc(text, title) {
	dtc(1,text,title);
}

// Sticky caption right
function src(text,title) {
	stc(1,text,title);
}

// Simple popup left
function dls(text) {
	dts(0,text);
}

// Caption popup left
function dlc(text, title) {
	dtc(0,text,title);
}

// Sticky caption left
function slc(text,title) {
	stc(0,text,title);
}

// Simple popup center
function dcs(text) {
	dts(2,text);
}

// Caption popup center
function dcc(text, title) {
	dtc(2,text,title);
}

// Sticky caption center
function scc(text,title) {
	stc(2,text,title);
}

// Clears popups if appropriate
function nd() {
	if ( cnt >= 1 ) { sw = 0 };
	if ( (ns4) || (ie4) ) {
		if ( sw == 0 ) {
			snow = 0;
			hideObject(over);
		} else {
			cnt++;
		}
	}
}


//------------------------------------------------------------------------------------------------

function contac(imgpath){

// For ä fylle ut Contact Section + Update pä mange sider

document.write('<a NAME="mail"><p><p><p><br><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >');
document.write('<TR><TD WIDTH="15"></TD><TD BGCOLOR="#00FF00"><FONT FACE="Arial,Helvetica"><FONT COLOR="#000000"><B><CENTER>');
document.write('Contacting Me');
document.write('</CENTER></B></FONT></FONT></TD><TD WIDTH="15"></TD></TR>');
document.write('<TR><TD></TD><TD WIDTH="545"><FONT FACE="Arial,Helvetica"><FONT SIZE=-1><FONT COLOR="#00CC00">');
document.write('Please don`t hesitate mailing me if you have any comment`s, idea`s, bug reports, questions, broken links, WHATEVER!<p>');
document.write('You can contact me at <font color="cyan" size=+1>MAIL:</font>');

document.write('<A HREF="mailto:Ken-Roger<kenny@telnett.no>?subject=Tool Collection"');
document.write('onMouseOver=" drs(');
document.write("'E-mail me!'); return true ");
document.write('"onMouseOut=" nd(');
document.write("); return true; ");
document.write('"<a><BR><img SRC="' +imgpath+ '/mail.jpg" BORDER=0 height=33 width=200></a>');

document.write('<A HREF="mailto:Ken-Roger<kenny@telnett.no>?subject=Tool Collection"');
document.write('onMouseOver=" drs(');
document.write("'E-mail me!'); return true ");
document.write('"onMouseOut=" nd(');
document.write("); return true; ");
document.write('"<a><BR>Kenny@telnett.no</a><P>');


document.write('<form name=form>or <font color="cyan" size=+1>ICQ:</font>');

document.write('&nbsp;&nbsp;&nbsp;&nbsp;<input type=text name=txt value="46787688" onChange="this.value=');
document.write("'46787688';");
document.write('" onmousedown="javascript:nots()"; onmouseup="javascript:stealing()"; size=12>');

document.write('&nbsp;&nbsp;&nbsp;&nbsp;<input type=button value="Highlight Text" TITLE="Click to highlight number" onClick="javascript:this.form.txt.focus();this.form.txt.select();" size=5></form>');

document.write("(you can easily copy from this box: click the button to mark the text, right-click text and select copy)");

document.write('<P>I`m currently <img SRC="http://online.mirabilis.com/scripts/online.dll?icq=46787688 &amp;img=4" BORDER="0" ><br><p></FONT></FONT></FONT></TD></TR></TABLE></A>');
document.write('<HR WIDTH="100%" COLOR="00CC00"><p><center><font color="#00CC00">');
	
	//lastmodi();

document.write('</font><P></center></FONT>');

}

//------------------------------------------------------------------------------------------------

function download(progdesc,path){

var license = "License Agreement for " +progdesc+ "\n\nYou must agree to the following terms and conditions\nbefore using this software. Use of this software you indicates\n\your acceptance of this license agreement and warranty.\n\nWarranty\n\n\THIS APPLICATION AND INFORMATION IS PROVIDED 'AS IS' WITHOUT \n\WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED.\n\n\Distribution\n\n\This application is freeware, which means you can make as many copies as you want, give it to friends or do whatever you like to do with it. However, You are specifically prohibited from charging, or requesting donations, for any such copies, however made; and from distributing the software and/or documentation with other products (commercial or otherwise) without prior written permission, and from modifying the program-files and documentation in any way, includes decompiling, disassembling, hex-editing and unpacking.\n\n\If you agree to these terms, click OK to proceed download.\n\Otherwise, click Cancel to abort download.";

if(confirm(license))
{
location=path;
}
else{
//alert('');
}
}



//------------------------------------------------------------------------------------------------

function autograph(){

// For ä fylle ut navnet/mail-link under alle nyheter

document.write('<TD><DIV ALIGN=right><FONT FACE="Arial,Helvetica"><FONT SIZE=-2>');
document.write('<A HREF="main.html#mail"');
document.write('onMouseOver=" dls(');
document.write("'Contacting me'); return true ");
document.write('"onMouseOut=" nd(');
document.write("); return true ");
document.write('"<a>- Kenny </a></FONT></FONT></DIV></TD>');

}

//------------------------------------------------------------------------------------------------


function statbrows() {


// Copyright (c) Ken-Roger Andersen 1999 - Kenny@telnett.no

if ((navigator.appName == "Microsoft Internet Explorer") )
 {
window.status="Thanks for using Microsoft Internet Explorer !";
}
else 
{
if(navigator.appName == "Netscape")
{
window.status="Use MSIE 5+ instead of Netscape!";
}
}  

}

function stealing() {
statbrows()
document.onmousedown=click;
}

function nots() {
document.onmousedown=window.status="Copy ICQ UIN# to clicpboard";
}


//---------------------------------------------------


function goExtLink(url) {
//window.status=status
	window.open(url);
}

//---------------------------------------------------
// Number of visites
//----------------------
function numvis(){

var expdate = new Date();
var num_visits;
expdate.setTime(expdate.getTime() + (5*24*60*60*1000));
if (!(num_visits = GetCookie("num_visits")))
  num_visits = 0;
num_visits++;
SetCookie("num_visits",num_visits,expdate);

//document.write(num_visits);
return num_visits;
}

//---------------------------------------------------

function haschanged() {

var cookie_date=new Date(document.lastModified);
var expdate = new Date();
expdate.setTime(expdate.getTime()+(5*24*60*60*1000));

if (!(cookie_date == GetCookie("cookie_date"))){
  SetCookie("cookie_date",cookie_date,expdate);
  document.write(" The page has changed since your last visit!");
}
else
{
document.write(" Sorry, but page has not changed since your last visit.");
}

}

//---------------------------------------------------

function breakIt2() 
    {  
   	window.open("http://home.netpower.no/kenra/frames.html","_top","toolbar=yes,menubar=yes,scrollbars=yes,status=yes");
   }
//---------------------------------------------------



function killframes()
{
<!--
/* 
Copyright (c) Ken-Roger Andersen 1999
All Rights Reserved.
*/
document.write('Click ');
document.write('<A HREF="javascript:breakIt()"');
document.write('onMouseOver=" window.status=');
document.write("'Click to break out of any other frames!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('"<a>here </a>');
document.write(' to break out of any others frames!');


} // end killframes
// -->

//--------------------------------------------------

function lastmodi() {

/* Please keep this credit info if copying the code!

LastModified Java script by Ken-Roger Andersen 1999 - kenny@telnett.no 

*/


var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var MOYArray = new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var LastModDate = new Date(document.lastModified);

  var modtime = new Date(document.lastModified);
  var hours = modtime.getHours();
  var minutes = modtime.getMinutes();
  var seconds = modtime.getSeconds()

  var timeValue = "" + ((hours < 10) ? "0" : "") + hours
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds
  timeValue += (hours >= 12) ? " P.M." : " A.M."

document.write("This page was last updated on ");
document.write(DOWArray[(LastModDate.getDay()+1)],", ");
document.write(MOYArray[(LastModDate.getMonth()+1)]," ");

// takler ikke år 2000
//document.write(LastModDate.getDate(),", ",(LastModDate.getYear()+1900));


document.write(LastModDate.getDate(),", ",(FormatYear(LastModDate.getYear())));


document.write(" at " + timeValue);

}
function initArray() 
{
  this.length = initArray.arguments.length
  for (var i = 0; i < this.length; i++)
  this[i+1] = initArray.arguments[i]
}
//------------------------------------------------------


function schkbr() {

// infomsg = "WARNING: This page is best viewed with Microsoft Internet Explorer (v5.0)! " 
// infomsg += "It can in emergency be viewed with Netscape... "
// infomsg += "Download MSIE now from www.microsoft.com! " 
// infomsg += "Abandon your poor, overbloated and buggy "
//infomsg += navigator.appName
//infomsg += " crap you're using!!! You will never regret it!"

infomsg = "WARNING: This page is best viewed with Microsoft Internet Explorer (v5.0) " 
 
if(navigator.appName == "Microsoft Internet Explorer")
  {
  	//alert(infomsg) 
  	//setTimeout("ChkBrowser()",30000);
  }
else
	{
	alert(infomsg) 
	}

 		      } 





// Non public functions. These are called by other functions etc.


//-------------------------------------------------------------------

function FormatYear(oldy){
var newy = "";

 if(oldy == 0){
newy = 2000;
}
 if(oldy >= 1900){
	newy = oldy;
}
else if(oldy > 90){
	if(oldy < 1900)
  newy = oldy+1900;
}
else if(oldy < 90){
	if(oldy > 00)
 newy = oldy+2000
}

else{
  newy = oldy;
}
return newy;

}

//-------------------------------------------------------------------
function breakIt() 
    {  
if (self != top) 
	{
    	window.open("index.html","_top","toolbar=yes,menubar=yes,scrollbars=yes,status=yes");
	}
else
	{
	alert('Hey man, I could`nt find any frames!');
	}
   }
//-------------------------------------------------------------------

function click(e) {



var message="Sorry, Function disabled.";

if (document.all) {
if (event.button == 2) {
alert(message);
//setTimeout("aler()",2500);
return false;
}
}

if (document.layers) {
if (e.which == 3) {
alert(message);
//setTimeout("aler()",2500);
alert(message);
return false;
}
}
//}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}

/*
function aler(){
var dateValue = new Date();
var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var MOYArray = new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var LastModDate = new Date(document.lastModified);
  
  var hours = dateValue.getHours();
  var minutes = dateValue.getMinutes();
  var seconds = dateValue.getSeconds()

  var timeValue = "" + ((hours < 10) ? "0" : "") + hours
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds
  timeValue += (hours >= 12) ? " P.M." : " A.M."

var msgDate = "" + DOWArray[(dateValue.getDay()+1)] + ", " + dateValue.getDate() + " " +
//MOYArray[(dateValue.getMonth()+1)] + " " + (dateValue.getYear()+1900) + ", at " + timeValue;
MOYArray[(dateValue.getMonth()+1)] + " " + (dateValue.getYear()) + ", at " + timeValue;
var msgAdr = " '/cgi-bin/send1?ip=%ip&what=web&enc=iso88591' ";
var msg2
msg2 = "IP address sent " + msgDate + " with robot1 " + msgAdr + ". ";
var message="Warning 2.6-a: Attempt to steal property of this site. This attempt has been recorded by our robot. Your IP address will be sent to the Webmaster. ";


alert(''+msg2+'');
return false;
*/
}

















// Simple popup
function dts(d,text) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><FONT FACE=\"Arial,Helvetica\" COLOR=\""+textcolor+"\" SIZE=\"-2\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	dir = d;
	disp();
}

// Caption popup
function dtc(d,text, title) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><B><FONT COLOR=\""+capcolor+"\">"+title+"</FONT></B></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	dir = d;
	disp();
}

// Sticky
function stc(d,text, title) {
	sw = 1;
	cnt = 0;
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"PTT\"><B><FONT COLOR=\""+capcolor+"\">"+title+"</FONT></B></SPAN></TD><TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"cClick();\" ID=\"PCL\"><FONT COLOR=\""+closecolor+"\">Close</FONT></A></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	dir = d;
	disp();
	snow = 0;
}

// Common calls
function disp() {
	if ( (ns4) || (ie4) ) {
		if (snow == 0) 	{
			if (dir == 2) { // Center
				moveTo(over,x+offsetx-(width/2),y+offsety);
			}
			if (dir == 1) { // Right
				moveTo(over,x+offsetx,y+offsety);
			}
			if (dir == 0) { // Left
				moveTo(over,x-offsetx-width,y+offsety);
			}
			showObject(over);
			snow = 1;
		}
	}
// Here you can make the text goto the statusbar.
}

// Moves the layer
function mouseMove(e) {
	if (ns4) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (snow) {
		if (dir == 2) { // Center
			moveTo(over,x+offsetx-(width/2),y+offsety);
		}
		if (dir == 1) { // Right
			moveTo(over,x+offsetx,y+offsety);
		}
		if (dir == 0) { // Left
			moveTo(over,x-offsetx-width,y+offsety);
		}
	}
}

// The Close onMouseOver function for Sticky
function cClick() {
	hideObject(over);
	sw=0;
}

// Writes to a layer
function layerWrite(txt) {
        if (ns4) {
                var lyr = document.overDiv.document
                lyr.write(txt)
                lyr.close()
        }
        else if (ie4) document.all["overDiv"].innerHTML = txt
		if (tr) { trk(); }
}

// Make an object visible
function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}

// Hides an object
function hideObject(obj) {
        if (ns4) obj.visibility = "hide"
        else if (ie4) obj.visibility = "hidden"
}

// Move a layer
function moveTo(obj,xL,yL) {
        obj.left = xL
        obj.top = yL
}



//***********************************************************************

// for number of visits




function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) 
      break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie(name) {
  var exp = new Date();
  FixCookieDate (exp); // Correct for Mac bug
  exp.setTime (exp.getTime() - 1);  // This cookie is history
  var cval = GetCookie (name);
  if (cval != null)
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}


function trk() {
	if ( (ns4) || (ie4) ) {
			nt=new Image(32,32); nt.src="http://www.nedstat.nl/cgi-bin/nedstat.gif?name=ol2t";
			bt=new Image(1,1); bt.src="http://www.bosrup.com/web/overlib/o2/tr.gif";
			refnd=new Image(1,1); refnd.src="http://www.nedstat.nl/cgi-bin/referstat.gif?name=ol2t&refer="+escape(top.document.referrer);
			
	}
	tr = 0;
}



