// External JS source file for romance.orcon.net.nz


/*
Auto Maximize Window Script- By Nick Lowe (nicklowe@ukonline.co.uk)
For full source code, 100's more free DHTML scripts, and Terms Of Use
Visit http://www.dynamicdrive.com
*/
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}


// Moving Objects Script
// By Virtual_Max
// 
// Permission to use, copy, modify, and distribute this software and its documentation 
// for NON-COMMERCIAL purposes and  without fee is hereby granted provided that this 
// notice appears in all copies. 
//
// VIRTUAL MAX MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE 
// SOFTWARE, EITHER EXPRESS OR IMPLIED
//
var brOK=false;
var mie=false;
var aver=parseInt(navigator.appVersion.substring(0,1));
var aname=navigator.appName;
function checkbrOK()
{if(aname.indexOf("Internet Explorer")!=-1)
   {if(aver>=4) brOK=navigator.javaEnabled();
    mie=true;
   }
 if(aname.indexOf("Netscape")!=-1)  
   {if(aver>=4) brOK=navigator.javaEnabled();}
}
var vmin=2;
var vmax=5;
var vr=2;
var timer1;
function Chip(chipname,width,height)
{this.named=chipname;
 this.vx=vmin+vmax*Math.random();
 this.vy=vmin+vmax*Math.random();
 this.w=width;
 this.h=height;
 this.xx=0;
 this.yy=0;
 this.timer1=null;
}
function movechip(chipname)
{
 if(brOK)
  {eval("chip="+chipname);
   if(!mie)
    {pageX=window.pageXOffset;
     pageW=window.innerWidth-20;
     pageY=window.pageYOffset;
     pageH=window.innerHeight-20;
    }
   else
    {pageX=window.document.body.scrollLeft;
     pageW=window.document.body.offsetWidth-20;
     pageY=window.document.body.scrollTop;
     pageH=window.document.body.offsetHeight-20;
    } 
   chip.xx=chip.xx+chip.vx;
   chip.yy=chip.yy+chip.vy;   
   chip.vx+=vr*(Math.random()-0.5);
   chip.vy+=vr*(Math.random()-0.5);
   if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;
   if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
   if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;
   if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;
   if(chip.xx<=pageX)
     {chip.xx=pageX;
      chip.vx=vmin+vmax*Math.random();
     }
   if(chip.xx>=pageX+pageW-chip.w)
     {chip.xx=pageX+pageW-chip.w;
      chip.vx=-vmin-vmax*Math.random();
     }
   if(chip.yy<=pageY)
     {chip.yy=pageY;
      chip.vy=vmin+vmax*Math.random();
     }
   if(chip.yy>=pageY+pageH-chip.h)
     {chip.yy=pageY+pageH-chip.h;
      chip.vy=-vmin-vmax*Math.random();
     }
   if(document.layers)
      {eval('document.'+chip.named+'.top ='+chip.yy);
       eval('document.'+chip.named+'.left='+chip.xx);
      } 
   else if (document.all)
      {eval('document.all.'+chip.named+'.style.pixelLeft='+chip.xx);
       eval('document.all.'+chip.named+'.style.pixelTop ='+chip.yy); 
      }
   else if (document.getElementById)
      {document.getElementById(chip.named).style.left=chip.xx;
       document.getElementById(chip.named).style.top =chip.yy; 
      }
   chip.timer1=setTimeout("movechip('"+chip.named+"')",100);
  }
}
function stopme(chipname)
{if(brOK)
  {//alert(chipname)
   eval("chip="+chipname);
   if(chip.timer1!=null)
    {clearTimeout(chip.timer1)}
  }
}


var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("http://romance.orcon.net.nz/favicon.ico")


/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}


<!-- Original JavaScript code by Eric Stremming [ estremming@hotmail.com ]  -->
<!-- http://www.geocities.com/SunsetStrip/Club/5970/  -->
<!--
function test(form) {
if (form.text.value == "")
alert("Type in your dream colour before clicking button.")
else {
document.bgColor=(""+form.text.value+"");
   }
}


/*
Highlight Table Cells Script-
Last updated: 99/01/21
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
 

/*  This script and many others can be found at
    JavaScript City [ http://www.javascriptcity.com ] */
var pic_width=250;
var pic_height=607;
button_text="Click to enhance the fantasy";
if (document.images) {
     pic1= new Image(pic_width,pic_height);
     pic1.src="fantasy1a.jpg";
     pic2= new Image(pic_width,pic_height);
     pic2.src="fantasy1b.jpg";
      }
var pics= new Array(5)
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic2.src;
   pics[3]=pic2.src;
   pics[4]=pic2.src;
var numpics=5;
var thenum=0;
imgName="img1";
function change_it()
 {
   if (document.images)
    {
      document.write("<img SRC='"+pics[thenum]+"' border='0' alt='soul mates are forever mates' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");
      document.write("<br><form><input TYPE='button' value='"+button_text+"' onClick='change_it2()'></form>");
   }
}
function change_it2()
 {
         var x=0;
         thenum+=1;
         if (thenum>numpics-1)
         {
           document[imgName].src=pics[0];
           thenum=0;
           }
         else
         {
           document[imgName].src=pics[thenum];
           x+=1;
          }
 }


lk0=new Image(122,74)
lk0.src="help1.gif"
lk0a=new Image(122,74)
lk0a.src="help2.gif"
lk7=new Image(580,332)
lk7.src="kpd-gfx1.jpg"
lk7a=new Image(580,332)
lk7a.src="kpd-gfx2.jpg"
//-->
function filter(imagename,objectsrc){
	if (document.images)
	document.images[imagename].src=eval(objectsrc+".src")
}


//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}


function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.mouseover | Event.mouseout)
document.onmouseover=hidestatus
document.onmouseout=hidestatus