<!-- Begin

//document.write("ysaaayyy");

searchthisword="";
DenneSide=document.URL;
var position=document.URL.indexOf("#");
if (position>-1){	searchthisword=DenneSide.slice(position+1,DenneSide.length);	}
else{	searchthisword="";	}


Resultatversjon=1;

var position=document.URL.indexOf("simfinder1");
if (position>-1){	
	Resultatversjon=2
	}
var position=document.URL.indexOf("simfinder2");
if (position>-1){	
	Resultatversjon=1
	}
//document.write(Resultatversjon);

// --- søk
document.write('<br>');
document.write('<input type="text" name="passwd" id="passwd"/>');
document.write('<input type="submit" value="Find Sim" onclick="locate()"/>');
//document.write("-"+passwd+"-");
function locate() {
	var pwd = document.getElementById("passwd").value;
	if(Resultatversjon==2){
		(pwd!='')?window.location.href="simfinder2.html#"+escape(pwd)+'':alert("You forgot to write something.");
		}
	if(Resultatversjon==1){
		(pwd!='')?window.location.href="simfinder1.html#"+escape(pwd)+'':alert("You forgot to write something.");
		}
	}

// --- slutt søk




document.write('<p><font face=arial,helvetica size=2><font size=3 color=green><b>'+"Results for: "+searchthisword+'</b></font>');

document.write('<p>'+"This is a first version of the Sim Finder tool. A later version will also search adresses and previous Simmerville articles.<p>");
document.write("Broken link means that such a page does not exist for that Sim (TS1 sims and older in particular).<p>");
document.write('</font>');

document.write('<table BORDER=0>');
for(finnid=0;finnid<Personnr.length;finnid+=1){
supertreff=0;
		var position=Name1[finnid].toUpperCase().indexOf(searchthisword.toUpperCase());
		if (position>-1){	supertreff=1;	}
		var position=Name2[finnid].toUpperCase().indexOf(searchthisword.toUpperCase());
		if (position>-1){	supertreff=1;	}
		var position=Name3[finnid].toUpperCase().indexOf(searchthisword.toUpperCase());
		if (position>-1){	supertreff=1;	}
		var position=Personnr[finnid].slice(0,1).indexOf("d");
		if (position>-1){	supertreff=0;	}
		var position=Personnr[finnid].slice(0,1).indexOf("D");
		if (position>-1){	supertreff=0;	}
		var position=Personnr[finnid].slice(0,1).indexOf("C");
		if (position>-1){	supertreff=0;	}
		var position=Personnr[finnid].slice(4,5).indexOf("x");
		if (position>-1){	supertreff=0;	}
//document.write(supertreff);
		if((supertreff!=0)&&(searchthisword!="")){
			document.write('<tr>');
			document.write('<td>');
			document.write('<img src=\"../001-famtree/portraits/'+Personnr[finnid]+'.jpg\">');
			document.write('</td><td valign=top><font face=arial,helvetica size=2>');
			document.write('<b>'+Name1[finnid]+" ");
			if(Name2[finnid].length>0){
				document.write("("+Name2[finnid]+") ");
				}
			document.write(Name3[finnid]+'</b>');
			document.write('<br><a href=\"'+Personnr[finnid]+'.html\">Profile page</a>');
			document.write('<br><a href=\"../001-famtree/'+Personnr[finnid]+'.html\">Family tree</a>');
			document.write('</font></td>');
			document.write('</tr>');
			}
	}
document.write('</table>');

/*

document.write('<font face=arial size=+1 color=\"#FFFFCC\">'+SUNName[bingo]+'</font><br>');

document.write('<font face=arial size=-1 color=\"#FFFFCC\">'+"Page updated: ");
document.write(Month[SUNDatoUp[bingo].slice(4,6)/1]+" "+SUNDatoUp[bingo].slice(6,8)/1+", "+SUNDatoUp[bingo].slice(0,4)+'</font>');

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"SUN member since: ");
document.write(Month[SUNDatoIn[bingo].slice(4,6)/1]+" "+SUNDatoIn[bingo].slice(6,8)/1+", "+SUNDatoIn[bingo].slice(0,4)+'</font>');

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"Facilities: ");
var position=SUNfacility[bingo].indexOf("TS1");
if (position>-1){
	document.write("Old World ");
	Existen="TS1";
	}
var position=SUNfacility[bingo].indexOf("MM");
if (position>-1){
	document.write("MagicTown");
	}

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"Households: ");
document.write(RLots[bingo]/1+'</font>');

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"Community Lots: ");
document.write(CLots[bingo]/1+'</font>');

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"Web page: ");
if (SUNURL[bingo].length>3){
document.write('<a href=\"http://'+SUNURL[bingo]+'\">'+"Click here"+'</a></font>');
}
else {	document.write("n/a"+'</font>');	}

document.write('<br><font face=arial size=-1 color=\"#FFFFCC\">'+"Contact: ");
document.write('<a href=\"mailto:'+SUNMail[bingo]+'?subject=SUN member '+SUNName[bingo]+'\">'+SUNContact[bingo]+'</a></font>');
}

OurHood=HouseHoldInfo[0];

*/


// End -->

