function handleError() {
	return true;
}
window.onerror = handleError;




if(document.referrer!="" && document.referrer.indexOf("aupair-agency.com")==-1 && document.referrer.indexOf("aupair.ws")==-1){
var expDays = 90;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
var refdate = new Date();
document.cookie = "referrer=" + escape(document.referrer + "&&&" + refdate.toGMTString()) + "; expires=" + exp.toGMTString() + "; path=/" 
}


function noenter() {
return !(window.event && window.event.keyCode == 13); }



var menuname =""; var ThisObject=""

function menuChangeOver(menuname){
ThisObject=document.getElementById(menuname)
ThisObject.style.borderColor='#ff3300';
ThisObject.style.borderWidth='2px';
ThisObject.style.color='#ffffcc';
ThisObject.style.backgroundColor='#006699';
ThisObject.style.paddingTop='9px';
}

function menuChangeOut(menuname){
if (menuname=='menu6' || menuname=='menu7'){
ThisObject=document.getElementById(menuname)
ThisObject.style.borderWidth='1px';
ThisObject.style.borderTopColor='#cccc99';
ThisObject.style.borderTopWidth='3px';
ThisObject.style.borderBottomColor='#cccc99';
ThisObject.style.borderRightColor='#cccc99';
ThisObject.style.borderLeftColor='#cccc99';
ThisObject.style.color='#006699';
ThisObject.style.backgroundColor='#ffffcc';
ThisObject.style.paddingTop='10px';
}
else {
ThisObject=document.getElementById(menuname)
ThisObject.style.borderWidth='1px';
ThisObject.style.borderTopColor='#cccc99';
ThisObject.style.borderTopWidth='3px';
ThisObject.style.borderBottomColor='#cccc99';
ThisObject.style.borderRightColor='#cccc99';
ThisObject.style.borderLeftColor='#ffffcc';
ThisObject.style.color='#006699';
ThisObject.style.backgroundColor='#ffffcc';
ThisObject.style.paddingTop='10px';
}
}

var n = 0
function CloseHelpMenu(tip){
document.getElementById(tip).style.visibility="hidden";
n=0;	
}

var topposition=0
var leftposition=0
var x,y
var xdistance, ydistance
var xD,yD
var message


function Tip(tip){
	leftposition=x+xdistance ; topposition=y+ydistance; 
	setTimeout ("CloseHelpMenu('"+tip+"')", 10000);
	

	
	
	if (document.all) {	
		document.getElementById(tip).style.posLeft=leftposition
		document.getElementById(tip).style.posTop=topposition
		document.getElementById(tip).style.visibility="visible"
     	}

	if (document.getElementById&&!document.all){
		document.getElementById(tip).style.left=leftposition
		document.getElementById(tip).style.top=topposition
		document.getElementById(tip).style.visibility="visible"
     }
}


function handlerMM(e){

	if (document.getElementById&&!document.all) {
	
	x = e.pageX
	y = e.pageY
	xD = e.screenX
	xY = e.screenY
	}
	else {
	
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
	xD = (document.layers) ? e.screenX : event.screenX
	yD = (document.layers) ? e.screenY : event.screenY
	}
	
		
	if ( xD <= window.screen.availWidth/2) { xdistance = 80;}
	else { xdistance = -240;}
    if ( yD <= window.screen.availHeight/2) { ydistance = 10;}
    else { ydistance = -100;}	
	
}

if (document.layers || (document.getElementById&&!document.all)){
	document.captureEvents(Event.MOUSEMOVE);
	}
document.onmousemove = handlerMM;

function menu(MenuNo){
document.getElementById(MenuNo).style.visibility="visible"
}

function menuOut(element,e){
if (!e) var e = window.event
if (document.all&&!element.contains(e.toElement))
element.style.visibility='hidden';
else if (e.relatedTarget&&!contains(element, e.relatedTarget))
element.style.visibility='hidden';
}

function contains (parent, child) {
while (child.parentNode)
if ((child=child.parentNode)==parent)
return true;
return false;
}


function showlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../Aupair-List.htm'
aupairlist.focus();
}
function ukshowlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../UK-Aupair-List.htm'
aupairlist.focus();
}
function usshowlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../USA-Aupair-List.htm'
aupairlist.focus();
}
function usshowSlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../USA-Summer-Aupair-List.htm'
aupairlist.focus();
}
function ukshowSlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../UK-Summer-Aupair-List.htm'
aupairlist.focus();
}
function showSlist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= '../Summer-Aupair-List.htm'
aupairlist.focus();
}
function nannyshowlist(){
var nannylist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
nannylist=document.location.href= '../Nanny-List.htm'
nannylist.focus();
}





function showjoblist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= 'Aupair-Jobs.htm'
aupairlist.focus();
}
function ukshowjoblist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= 'Aupair-Jobs-UK.htm'
aupairlist.focus();
}
function usshowjoblist(){
var aupairlist
var windowdetails = "scrollbars=yes,resizable=yes,toolbar=no,menubar=no,titlebar=no,location=no,status=no,width="+eval(screen.width-20)+",height="+eval(screen.height-100)+",top=0,left=0,";
aupairlist=document.location.href= 'Aupair-Jobs-USA.htm'
aupairlist.focus();
}


var allCookies = document.cookie;
var cPos = allCookies.indexOf("referrer=");
if(cPos != -1){
var cdstart = cPos + 9;
var cdend = allCookies.indexOf(";", cdstart);
if(cdend == -1) cdend = allCookies.length;
var cookieContent = allCookies.substring(cdstart,cdend);
cookieContent = unescape(cookieContent);
var cdatestart = cookieContent.indexOf("&&&", 0);
var cdateend = cookieContent.length;
var cRefer = cookieContent.substring(0,cdatestart);
var cDateRef = cookieContent.substring(cdatestart +2,cdateend)
}
else{
var cRefer = "NoReferrer";
var cDateRef = "No cookie";
}



function ValidateEmail(){
				window.document.Form1.ReferredFrom.value=cRefer;
				if (window.document.Form1.Comments.value==''){
				window.alert("If you are serious about finding a job please enter as much as possible!");
				window.document.Form1.Comments.focus();
				document.getElementById('tip6').style.left=0;
				return false;
				}

				if (window.document.Form1.Email.value!= window.document.Form1.EmailConfirm.value){
				window.alert("The email address' you entered are not the same!");
				window.document.Form1.EmailConfirm.focus();
				window.scrollBy(0,-100);
				window.document.Form1.EmailConfirm.style.backgroundColor='red';
				return false;
				}
				
				if (window.document.Form1.From.value==''){
				window.alert("We need to know when you are available?");
				window.document.Form1.From.focus();
				window.document.Form1.From.style.backgroundColor='red';
				return false;
				}
				
				if (window.document.Form1.Term.value==''){
				window.alert("We need to know how long you want to be an aupair for?");
				window.document.Form1.Term.focus();
				window.document.Form1.Term.style.backgroundColor='red';
				return false;
				}
				
				
window.document.Form1.submit();		
}

function SiteMap(WhichPage){
var WhichHref
if (WhichPage=='AupairPage'){WhichHref = 'aupair-page.htm'}
if (WhichPage=='AupairLists'){WhichHref = 'Aupair-Lists.htm'}
if (WhichPage=='AupairJobs'){WhichHref = 'job-vacancies.htm'}
if (WhichPage=='NannyPage'){WhichHref = 'nanny-page.htm'}
if (WhichPage=='FamilyPage'){WhichHref = 'Aupair-Wanted.htm'}
if (WhichPage=='UKFamily'){WhichHref = 'Aupair-Wanted-UK.htm'}
if (WhichPage=='USAFamily'){WhichHref = 'Aupair-Wanted-USA.htm'}
if (WhichPage=='Terms'){WhichHref = 'terms-conditions.htm'}
if (WhichPage=='UKTerms'){WhichHref = 'UK-terms.htm'}
if (WhichPage=='USATerms'){WhichHref = 'US-terms.htm'}
if (WhichPage=='AupairFAQ'){WhichHref = 'Aupair-Help.htm'}
if (WhichPage=='FamilyFAQ'){WhichHref = 'Family-Help.htm'}
if (WhichPage=='AupairINFO'){WhichHref = 'aupair-information.htm'}
if (WhichPage=='FamilyINFO'){WhichHref = 'family-information.htm'}
if (WhichPage=='FamilyINFOUSA'){WhichHref = 'US-families.htm'}
if (WhichPage=='VisaInfo'){WhichHref = 'aupair-visas.htm'}
if (WhichPage=='AupairApp'){WhichHref = 'aupair-application.htm'}
if (WhichPage=='FamReg'){WhichHref = 'family-registration.htm'}
if (WhichPage=='AboutUs'){WhichHref = 'about-us.htm'}
if (WhichPage=='Testi'){WhichHref = 'index.html'}
if (WhichPage=='Links'){WhichHref = 'links.html'}


document.location.href=(WhichHref)

}

var months=new Array(13);
months[1]="Jan";
months[2]="Feb";
months[3]="Mar";
months[4]="Apr";
months[5]="May";
months[6]="Jun";
months[7]="Jul";
months[8]="Aug";
months[9]="Sep";
months[10]="Oct";
months[11]="Nov";
months[12]="Dec";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (navigator.appName == "Netscape"){year=1900 + year;}
year=year.toString()
year=year.substr(2);
var DisplayDate ="<font style='font-face:Courier New,Courier,monospace;font-size:9px'>"+date+"-"+lmonth+"-"+year+"</font>"
