function goHoroscopes(form) {
	index = form.sign.selectedIndex
	if (index != "" && form.sign.options[index].value != "") {
	 	document.location.href = form.sign.options[index].value
	}
}

function openRAB(url)  {
	window.open(url, "LoveRateABuddy" , "width=550,height=360,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no,left=100,top=100");
}

function getURL(form, matchURL) {
	// sets the URL to pass
	var e1 = "Distance=" + form.Distance.value;
	var e2 = "&photosonly=" + form.photosonly.value;
	var e3 = "&BannerId=" + form.BannerId.value;
	var e9 = "&TrackingID=" + form.TrackingID.value;
	var e4 = "&GENDERCODE=" + form.GENDERCODE.options[form.GENDERCODE.selectedIndex].value
	var e5 = "&THEMRELATIONSHIP=" + form.THEMRELATIONSHIP.options[form.THEMRELATIONSHIP.selectedIndex].value
	var e6 = "&M_LAGE_A0=" + form.M_LAGE_A0.options[form.M_LAGE_A0.selectedIndex].value
	var e7 = "&M_UAGE_A1=" + form.M_UAGE_A1.options[form.M_UAGE_A1.selectedIndex].value
	var e8 = "&POSTALCODE=" + form.POSTALCODE.value;
	var setURL = matchURL + "?" + e1 + e2 + e3 + e9 +  e4 + e5 + e6 + e7 + e8;
	goURL( setURL );
	return false;
}

function goURL( url ) {
	// redirects to the url passed
	location.href = url;
}

function goSearch( url ) {
	// redirects to the url passed
	goURL(url);
                   return false;
}

function checkForm( form ) {
    if ( form.otherEmail.value == "" ) {
        alert ( "You must enter your friend's email address" );
        return false;
    }
    
    if ( form.memberEmail.value == "" ) {
        alert ( "You must enter your email address" );
        return false;
    }
    
    return true;
}