function openPrognose(ID, PRFL, REPORT, NAME, BDAY, BMON, BYEAR, BHOUR, BMIN, BCOUNTRY, BPLACE, PFROM, PTO, PASP) {
   frmPRG = open("AstroOnline.aspx?AO_Startup=N&AO_ID=" + ID + "&AO_PRFL=" + PRFL + "&AO_Report=" + REPORT + "&AO_Name=" + NAME + "&AO_Birthdate_day=" + BDAY + "&AO_Birthdate_month=" + BMON + "&AO_Birthdate_year=" + BYEAR + "&AO_Birthtime_hour=" + BHOUR + "&AO_Birthtime_min=" + BMIN + "&AO_BirthCountry=" + BCOUNTRY + "&AO_BirthPlace=" + BPLACE + "&AO_PlanetFrom=" + PFROM + "&AO_PlanetTo=" + PTO + "&AO_Aspect=" + PASP
                ,"winPRG"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function openPrognoseAff(AFF, REPORT, NAME, BDAY, BMON, BYEAR, BHOUR, BMIN, BCOUNTRY, BPLACE, PFROM, PTO, PASP) {
   frmPRG = open("AstroOnline.aspx?AO_Startup=N&AO_Affiliate=" + AFF + "&AO_Report=" + REPORT + "&AO_Name=" + NAME + "&AO_Birthdate_day=" + BDAY + "&AO_Birthdate_month=" + BMON + "&AO_Birthdate_year=" + BYEAR + "&AO_Birthtime_hour=" + BHOUR + "&AO_Birthtime_min=" + BMIN + "&AO_BirthCountry=" + BCOUNTRY + "&AO_BirthPlace=" + BPLACE + "&AO_PlanetFrom=" + PFROM + "&AO_PlanetTo=" + PTO + "&AO_Aspect=" + PASP
                ,"winPRG"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function setFirstItem() {
  if (document.forms[0])
      document.forms[0].elements[0].focus();
}

function autoTab(input, len) {
  if (isNaN(input.value) || input.value==" ") {
      input.value = input.value.slice(0, input.length-1);
      return false;
  }
//  if (input.value.length >= len) {
//      input.form[(getIndex(input)+1) % input.form.length].focus();
//  };
  return true;
};

function getIndex(input) {
  var index = -1, i = 0, found = false;
  while (i < input.form.length && index == -1) {
         if (input.form[i] == input)
             index = i;
         else
             i++;
  };
  return index;
};

function controle(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "") {
		alert("S.v.p. alle gegevens invoeren!");
		return false;
	}
	return true;
}

function controle_o(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin, xName, xAddress, xZIPCode, xCity, xCountry) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "" || pMin == "" || xName == "" || xAddress == "" || xZIPCode == "" || xCity == "" || xCountry == "") {
		alert("S.v.p. alle gegevens invoeren!");
		return false;
	}
	return true;
}

function controle_e(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin, pEmail) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "" || pEmail == "") {
		alert("S.v.p. alle gegevens invoeren!");
		return false;
	}
	return true;
}

function controle_o_e(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin, pEmail, xName, xAddress, xZIPCode, xCity, xCountry) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "" || pMin == "" || pEmail == "" || xName == "" || xAddress == "" || xZIPCode == "" || xCity == "" || xCountry == "") {
		alert("S.v.p. alle gegevens invoeren!");
		return false;
	}
	return true;
}

function controle2p(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin, pPlaats2, pLand2, pJaar2, pMaand2, pDag2, pUur2, pMin2) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "" || pPlaats2 == "" || pLand2 == "" || pJaar2 == "" || pMaand2 == "" || pDag2 == "" || pUur2 == "" || pMin2 == "") {
		alert("S.v.p. alle geboortegegevens invoeren!");
		return false;
	}
	return true;
}

function controle2p_e(pPlaats, pLand, pJaar, pMaand, pDag, pUur, pMin, pPlaats2, pLand2, pJaar2, pMaand2, pDag2, pUur2, pMin2, pEmail) {
	if (pPlaats == "" || pLand == "" || pJaar == "" || pMaand == "" || pDag == "" || pUur == "" || pMin == "" || pPlaats2 == "" || pLand2 == "" || pJaar2 == "" || pMaand2 == "" || pDag2 == "" || pUur2 == "" || pMin2 == "" || pEmail == "") {
		alert("S.v.p. alle geboortegegevens invoeren!");
		return false;
	}
	return true;
}

function countrylov(ID, PRFL, TYPE) {
   frmLOV = open("AstroLovCountry.ASP?ID=" + ID + "&PRFL=" + PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovctry.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function countrylovKlein(ID, PRFL, TYPE) {
   frmLOV = open("AstroLovCountry.aspx?ID=" + ID + "&PRFL=" + PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovctry.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=400,height=500");
}

function countrylovAff(TYPE, AFF) {
   frmLOV = open("AstroLovCountry.ASP?AO_LovType=" + TYPE + "&AO_Affiliate=" + AFF + "&AO_Source=lovctry.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function countrylov_net(AO_ID, AO_PRFL, TYPE) {
   frmLOV = open("AstroLovCountry.aspx?AO_ID=" + AO_ID + "&AO_PRFL=" + AO_PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovctry.net.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function countrylovAff_net(TYPE, AFF) {
   frmLOV = open("AstroLovCountry.aspx?AO_LovType=" + TYPE + "&AO_Affiliate=" + AFF + "&AO_Source=lovctry.net.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function passbackcountry(TYPE, P_RETURNVALUE) {
   if (TYPE=="1") {
      opener.document.forms[0].AO_BirthCountry.value = P_RETURNVALUE;
      opener.document.forms[0].AO_BirthPlace.value = "";
      opener.document.forms[0].AO_BirthCountry.focus();
      close();
   }
   else if (TYPE=="2") {
      opener.document.forms[0].AO_2BirthCountry.value = P_RETURNVALUE;
      opener.document.forms[0].AO_2BirthPlace.value = "";
      opener.document.forms[0].AO_2BirthCountry.focus();
      close();
   }
   else if (TYPE=="X") {
      opener.document.forms[0].AO_XCountry.value = P_RETURNVALUE;
      opener.document.forms[0].AO_XPlace.value = "";
      opener.document.forms[0].AO_XCountry.focus();
      close();
   }
}

function citylov(ID, PRFL, TYPE) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.ASP?ID=" + ID + "&PRFL=" + PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovcity.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function citylovKlein(ID, PRFL, TYPE) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.aspx?ID=" + ID + "&PRFL=" + PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovcity.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=400,height=500");
}

function citylovAff(TYPE, AFF) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.ASP?AO_LovType=" + TYPE + "&AO_Affiliate=" + AFF + "&AO_Source=lovcity.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function citylov_net(AO_ID, AO_PRFL, TYPE) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.aspx?AO_ID=" + AO_ID + "&AO_PRFL=" + AO_PRFL + "&AO_LovType=" + TYPE + "&AO_Source=lovcity.net.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function citylovAff_net(TYPE, AFF) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.aspx?AO_LovType=" + TYPE + "&AO_Affiliate=" + AFF + "&AO_Source=lovcity.net.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=600,height=600");
}

function submitCtry() {
   if (document.forms[0].AO_LovCountry.value == "")
      {
        alert("Om lange wachttijden te voorkomen s.v.p. eerst een (deel van een) landnaam invoeren.");
        return false;
      }
   else
      return true;
}

function submitcity() {
   if (document.forms[0].AO_LovCity.value == "")
      {
        alert("Om lange wachttijden te voorkomen s.v.p. eerst een (deel van een) plaatsnaam invoeren.");
        return false;
      }
   else
      return true;
}

function passbackcity(TYPE, P_CITY, P_LAT, P_LON) {
   if (TYPE=="1") {
      opener.document.forms[0].AO_BirthPlace.value = P_CITY;
      opener.document.forms[0].AO_BirthLatitude.value = P_LAT;
      opener.document.forms[0].AO_BirthLongitude.value = P_LON;
      opener.document.forms[0].AO_BirthPlace.focus();
      close();
   }
   else if (TYPE=="2") {
      opener.document.forms[0].AO_2BirthPlace.value = P_CITY;
      opener.document.forms[0].AO_2BirthLatitude.value = P_LAT;
      opener.document.forms[0].AO_2BirthLongitude.value = P_LON;
      opener.document.forms[0].AO_2BirthPlace.focus();
      close();
   }
   else if (TYPE=="X") {
      opener.document.forms[0].AO_XPlace.value = P_CITY;
      opener.document.forms[0].AO_XLatitude.value = P_LAT;
      opener.document.forms[0].AO_XLongitude.value = P_LON;
      opener.document.forms[0].AO_XPlace.focus();
      close();
   }
}

function help(hFile) {
   frmLOV = open(hFile
                ,"winHELP"
                ,"scrollbars=yes,resizable=yes,width=817,height=600");
}

function testFrame(url) {
  if (top == self) {
      top.location.href = url + escape(location.href);
  }
}

function countrylovSP(TYPE) {
   frmLOV = open("AstroLovCountry.ASP?ID=SP&PRFL=HO&AO_LovType=" + TYPE + "&AO_Source=lovctry.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=400,height=500,left=500,top=50");
}

function citylovSP(TYPE) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.ASP?ID=SP&PRFL=HO&AO_LovType=" + TYPE + "&AO_Source=lovcity.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=400,height=500,left=500,top=50");
}

function countrylovSP_net(TYPE) {
   frmLOV = open("AstroLovCountry.aspx?AO_ID=SP&AO_PRFL=HO&AO_LovType=" + TYPE + "&AO_Source=lovctry.net.htm"
                ,"winLOV"
                ,"scrollbars=yes,resizable=yes,width=400,height=500,left=500,top=50");
}

function citylovSP_net(TYPE) {
   var land;
   if (TYPE=="1")
   	land = escape(document.forms[0].AO_BirthCountry.value);
   else if (TYPE=="2")
   	land = escape(document.forms[0].AO_2BirthCountry.value);
   else if (TYPE=="X")
   	land = escape(document.forms[0].AO_XCountry.value);
   else
   	land = "";
   if (land == "")
      alert("S.v.p. eerst een land selekteren.");
   else
      frmLOV = open("AstroLovCity.aspx?AO_ID=SP&AO_PRFL=HO&AO_LovType=" + TYPE + "&AO_Source=lovcity.net.htm&AO_LovStartup=Y&AO_LovCountry=" + land
                   ,"winLOV"
                   ,"scrollbars=yes,resizable=yes,width=400,height=500,left=500,top=50");
}

function helpSP() {
   frmLOV = open("http://www.horoscooponline.nl/fr3-geboorte/02-geboortehoroscoop-help.html"
                ,"winHELP"
                ,"scrollbars=yes,resizable=yes,width=600,height=510,left=400,top=10");
}

function vbSP(hFile) {
   frmVB = open(hFile
                ,"winVB"
                ,"scrollbars=yes,resizable=yes,width=650,height=550");
}

function helpTIS(hfile) {
   frmLOV = open("http://astro.tiscali.nl/uitleg/horoscoop_help.asp"
                ,"winHELP"
                ,"scrollbars=yes,resizable=yes,width=520,height=660,left=10,top=10");
}

function uitlegTIS(hFile) {
   frmVB = open(hFile
                ,"winUITLEG"
                ,"scrollbars=yes,resizable=yes,width=520,height=660,left=10,top=10");
}

function vbTIS(hFile) {
   frmVB = open(hFile
                ,"winVB"
                ,"scrollbars=yes,resizable=yes,width=520,height=660,left=10,top=10");
}
function vbTISbreed(hFile) {
   frmVB = open(hFile
                ,"winVB"
                ,"scrollbars=yes,resizable=yes,width=600,height=660,left=10,top=10");
}
