function detect()
{
framesetpage="index.html";
thispage=window.location.href;
if (thispage.indexOf('://')<0) {thispage="://"+thispage;};
prefix=thispage.substring(0,thispage.lastIndexOf('://'));
suffix=thispage.substring(thispage.lastIndexOf('://')+3,thispage.length);
// alert('the subpage is:['+prefix+']['+suffix+']');
if (parent.location.href==window.location.href) {parent.location.href=framesetpage+"?"+prefix+"&&&"+suffix};
}


function mouseDown(e) {
  var copyRight = "Copyright (c) 2002\n" + 
                  " - marskunet.com -\n\n"
 if (parseInt(navigator.appVersion) > 3) {
  var clickType = 1;
  if (navigator.appName == "Netscape") clickType = e.which;
  else clickType = event.button;
  if (clickType != 1) {
    alert(copyRight);
    }
  }
  return true;
}
if (parseInt(navigator.appVersion) > 3) {
 document.onmousedown = mouseDown;
 if (navigator.appName == "Netscape") 
  document.captureEvents(Event.MOUSEDOWN);
}

function checkp()
{

var defaultsubpage="etusivu.html";
if (location.search) {subpage=location.search.substring(1)}
else {subpage=defaultsubpage}
if (subpage.indexOf('&&&')>=0) {
prefix=subpage.substring(0,subpage.indexOf('&&&'))+"://";
suffix=subpage.substring(subpage.indexOf('&&&')+3,subpage.length);
subpage=prefix+suffix;
}
}

function createf()

{
document.write('<FRAMESET FRAMESPACING="0" BORDER="0" ROWS="110,*,20" FRAMEBORDER="0">');
document.write('<FRAMESET FRAMESPACING="0" BORDER="0" cols="*,620,*" FRAMEBORDER="0">');
document.write('<FRAME NAME="top_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('<FRAME NAME="top" SCROLLING="no" NORESIZE TARGET="middle" SRC="index_top.html">');
document.write('<FRAME NAME="top_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('</FRAMESET>');
document.write('<FRAMESET FRAMESPACING="0" BORDER="0" cols="*,620,*" FRAMEBORDER="0">');
document.write('<FRAME NAME="top_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('<FRAME NAME="middle"  SCROLLING="auto" NORESIZE TARGET="_self" FRAME SRC="'+subpage+'">');
document.write('<FRAME NAME="mid_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('</FRAMESET>');
document.write('<FRAMESET FRAMESPACING="0" BORDER="0" cols="*,620,*" FRAMEBORDER="0">');
document.write('<FRAME NAME="top_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('<FRAME NAME="bottom" SRC="empty-bt.html" SCROLLING="no" NORESIZE TARGET="_self">');
document.write('<FRAME NAME="bot_rt" SCROLLING="no" NORESIZE TARGET="self" SRC="empty.html">');
document.write('</FRAMESET>');
document.write('<NOFRAMES>');
document.write('<P>Page uses frames, but your browser does not support them.</P>');
document.write('</NOFRAMES>');
document.write('</FRAMESET>');
}

function big(lr)
{
var layer = document.getElementById(lr);
layer.style.height='102px';
}

function small(lr)
{
var layer = document.getElementById(lr);
layer.style.height='22px';
}

function LmOver(elem)
{elem.children.tags('A')[0].style.color = "#ffff00";
elem.style.cursor = 'hand'}

function HandOver(elem)
{elem.style.cursor = 'hand'}

function HandOut(elem)
{}

function LmOut(elem)
{elem.children.tags('A')[0].style.color = "#ffffff";}

function LmDown(elem)
{elem.children.tags('A')[0].style.color = "#000000";}

function LmUp(frame, path) {
eval("parent.middle.location='"+path+"'");

}

var aryImages = new Array(0);
  aryImages[0] = "kuvat/menu0a.gif";
  aryImages[1] = "kuvat/menu0b.gif";
for (i=0; i < aryImages.length; i++) {
var preload = new Image();
preload.src = aryImages[i];}

function movepic(img_name,img_src) {document[img_name].src=img_src;}

function restpic(img_name,img_src) {document[img_name].src=img_src;}

function writelinks()
{
document.write('<A HREF="etusivu.html" CLASS="linkbar">etusivu</A>&nbsp;&nbsp;');
document.write('<A HREF="marsku.html" CLASS="linkbar">marsku</A>&nbsp;&nbsp;');
document.write('<A HREF="reseptit.html" CLASS="linkbar">reseptit</A>&nbsp;&nbsp;');
document.write('<A HREF="horoskooppi.html" CLASS="linkbar">horoskooppi</A>&nbsp;&nbsp;');
document.write('<A HREF="paivakirja.html" CLASS="linkbar">päiväkirja</A>&nbsp;&nbsp;');
document.write('<A HREF="aikataulu.html" CLASS="linkbar">ajat</A>&nbsp;&nbsp;');
document.write('<A HREF="tulossa.html" CLASS="linkbar">tulossa</A>&nbsp;&nbsp;');
document.write('<A HREF="sanat.html" CLASS="linkbar">sanat</A>&nbsp;&nbsp;');
document.write('<A HREF="linkit.html" CLASS="linkbar">linkit</A>&nbsp;&nbsp;');
document.write('<A HREF="sekalaista.html" CLASS="linkbar">muut</A>&nbsp;&nbsp;');
document.write('<A HREF="karaokelistat.html" CLASS="linkbar">karaokelistat</A><BR>');
}


function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + ".html"
fetch(location)

}
function fetch(location) {
top.middle.location.href = location;
}




