
HBVWidget={
	
	domainUrl:"http://www.wunderweib.de",
	
	dailyRecipe:{}
};

function shortenTextUntilHeight(textElem, refElem, height) {
	if (textElem.innerHTML.length < 10) {
		return;
	}
	if (refElem.offsetHeight > height) {
		textElem.innerHTML = textElem.innerHTML.replace(/\s\S+[ .]*$/, ' ...');
		window.setTimeout(function () {
			shortenTextUntilHeight(textElem, refElem, height);
		}, 0);
	}
}

horoskope = new Object();
horoskope["fische"] = new Object();
horoskope["fische"]["displayName"] = "Fisch";
horoskope["fische"]["img"]         = "/media/img/astro/widget/fische.gif";
horoskope["jungfrau"] = new Object();
horoskope["jungfrau"]["displayName"] = "Jungfrau";
horoskope["jungfrau"]["img"]         = "/media/img/astro/widget/jungfrau.gif";
horoskope["krebs"] = new Object();
horoskope["krebs"]["displayName"] = "Krebs";
horoskope["krebs"]["img"]         = "/media/img/astro/widget/krebs.gif";
horoskope["loewe"] = new Object();
horoskope["loewe"]["displayName"] = "Löwe";
horoskope["loewe"]["img"]         = "/media/img/astro/widget/loewe.gif";
horoskope["schuetze"] = new Object();
horoskope["schuetze"]["displayName"] = "Schütze";
horoskope["schuetze"]["img"]         = "/media/img/astro/widget/schuetze.gif";
horoskope["skorpion"] = new Object();
horoskope["skorpion"]["displayName"] = "Skorpion";
horoskope["skorpion"]["img"]         = "/media/img/astro/widget/skorpion.gif";
horoskope["steinbock"] = new Object();
horoskope["steinbock"]["displayName"] = "Steinbock";
horoskope["steinbock"]["img"]         = "/media/img/astro/widget/steinbock.gif";
horoskope["stier"] = new Object();
horoskope["stier"]["displayName"] = "Stier";
horoskope["stier"]["img"]         = "/media/img/astro/widget/stier.gif";
horoskope["waage"] = new Object();
horoskope["waage"]["displayName"] = "Waage";
horoskope["waage"]["img"]         = "/media/img/astro/widget/waage.gif";
horoskope["wassermann"] = new Object();
horoskope["wassermann"]["displayName"] = "Wassermann";
horoskope["wassermann"]["img"]         = "/media/img/astro/widget/wassermann.gif";
horoskope["widder"] = new Object();
horoskope["widder"]["displayName"] = "Widder";
horoskope["widder"]["img"]         = "/media/img/astro/widget/widder.gif";
horoskope["zwilling"] = new Object();
horoskope["zwilling"]["displayName"] = "Zwilling";
horoskope["zwilling"]["img"]         = "/media/img/astro/widget/zwilling.gif";
horoskope["fische"]["intro"]       = "﻿Ihr bester Tag!";
horoskope["fische"]["text"]        = "﻿Der Mond in Ihrem Zeichen Fische macht Sie weich. Sie sind offen und freundlich. Das macht Sie so liebenswert.";
horoskope["jungfrau"]["intro"]       = "﻿Ihr bester Tag!";
horoskope["jungfrau"]["text"]        = "﻿Fünf Planeten wirken und gehen untereinander Verbindungen ein. Alle fünfe wollen glückliche Jungfrauen sehen. Heute macht einfach alles Spaß.";
horoskope["krebs"]["intro"]       = "﻿Einfach nur schön";
horoskope["krebs"]["text"]        = "﻿Nur wer sich heute schont und kräftemäßig zurückhält, macht alles richtig. Gönnen Sie sich vor allem: Zeit! Machen Sie alles in Ruhe!";
horoskope["loewe"]["intro"]       = "﻿In aller Ruhe";
horoskope["loewe"]["text"]        = "﻿Immer kann es ja nicht rundgehen. Der Mond in den Fischen plädiert für Ruhe. Gönnen Sie sich einen „Morgenmantel-Vormittag“.";
horoskope["schuetze"]["intro"]       = "﻿Brillante Ideen";
horoskope["schuetze"]["text"]        = "﻿Sonne und Merkur verbinden sich im Zeichen Fische. Auch der Mond hält sich nach wie vor in diesem Abschnitt auf. Das verdreifacht Ihre Fantasie!";
horoskope["skorpion"]["intro"]       = "﻿In Gesellschaft";
horoskope["skorpion"]["text"]        = "﻿Der Mond in den Fischen meint es gut mit Ihnen. Wählen Sie ein gemischtes Programm: Zeit fürs Aufstehen, Frühstücken, Herrichten und Zeit, die Sie draußen verbringen.";
horoskope["steinbock"]["intro"]       = "﻿Aussprachen";
horoskope["steinbock"]["text"]        = "﻿Die Sonne trifft auf Merkur und es wird jede Menge geredet. Auch Ihnen tut es gut, sich mit Freunden in Ruhe zu unterhalten.";
horoskope["stier"]["intro"]       = "﻿Sehr sanft";
horoskope["stier"]["text"]        = "﻿Der Mond macht Sie heute sanft, weich, einfühlsam und lieb. Ganz automatisch entspannen sich die Beziehungen zu allen Menschen.";
horoskope["waage"]["intro"]       = "﻿In ruhigen Gewässern";
horoskope["waage"]["text"]        = "﻿Große Pläne haben Sie nicht für heute. Sie genießen es, ein wenig herumzuwursteln und dabei im Radio einem interessanten Vortrag oder einem klassischen Konzert zu lauschen.";
horoskope["wassermann"]["intro"]       = "﻿Mond und Jupiter";
horoskope["wassermann"]["text"]        = "﻿Anstrengendes sollten Sie nicht einplanen. Der Fische-Mond sieht Sie lieber in einer Ausstellung als in den Bergen.";
horoskope["widder"]["intro"]       = "﻿Ihr bester Tag!";
horoskope["widder"]["text"]        = "﻿Der Mond steht im Fische-Zeichen. Da sind alle Menschen, Sie eingeschlossen, sinnlicher, sensibler als sonst.";
horoskope["zwilling"]["intro"]       = "﻿Geistreich";
horoskope["zwilling"]["text"]        = "﻿Wenn sich Sonne und Merkur verbinden, ist das ein Zeichen für einen geistreichen Tag. Sie sollten etwas unternehmen, was Ihrem Köpfchen gut tut.";
function renderDailyHoroscope(type) {
	var igoogle = false;
	if (type == 'ig') {
		igoogle = true;
	}
	var html = "";
	html += "<div style=\"width:" + (igoogle ? "385" : "308") + "px; " + (igoogle ? "" : "border:1px solid #ACC3DF") + "\">";
	html += "	<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.wunderweib.de/media/css/widgets.css\" />";
	html += "	<div id=\"th-widget\" class=\"widget\">";
	html += "		<div id=\"th-head\"" + (igoogle ? " style=\"background: none\"" : "") + ">";
	html += "			<h1" + (igoogle ? " style=\"background: none\"" : "") + ">";
	html += "				<a href=\"http://www.wunderweib.de/\" target=\"_blank\">";
	html += "					<img src=\"http://www.wunderweib.de/media/img/astro/widget/ww-logo.gif\" alt=\"WUNDERWEIB\" />";
	html += "				</a>";
	html += "				<img src=\"http://www.wunderweib.de/media/img/astro/widget/hl-th.gif\" />";
	html += "			</h1>";
	html += "		</div>";
	html += "		<div id=\"th-content\">";
	html += "			<div id=\"th-part1\"></div>";
	html += "			<div id=\"th-part2\">";
	html += "				<a style=\"padding-left: 8px\" href=\"http://www.wunderweib.de/liebeundastro/horoskope/rubrik-horoskope/\" title=\"Alle Horoskope bei Astrowoche\" target=\"_blank\">Alle Horoskope &raquo;</a>";
	html += "			</div>";
	html += "			<div id=\"th-awlink\">";
	html += "				<a href=\"http://astrowoche.wunderweib.de/\" target=\"_blank\">";
	html += "					<img src=\"http://www.wunderweib.de/media/img/trans.gif\" alt=\"\" />";
	html += "				</a>";
	html += "			</div>";
	html += "		</div>";
	html += "	</div>";
	html += "</div>";
	document.writeln(html);
	var zodiac = getZodiacCookie();
	if (zodiac != null) {
		renderHoroscope(zodiac);
	} else {
		renderHoroscopeSettings();
	}
}
function setZodiacCookie(zodiac) {
	var now = new Date();
	var expires = new Date(now.getTime()+1000*60*60*24*730);  // 2 years
	document.cookie="zodiac=" + zodiac + ";expires=" + expires.toGMTString() + ";";
}
function getZodiacCookie() {
	if (document.cookie) {
		var results = document.cookie.match('(^|;)?zodiac=([^;]*)(;|$)');
  		if (results && results.length > 2 && typeof(horoskope[results[2]]) != "undefined") {
    			return (results[2]);
  		} else {
    			return null;
		}
	} else {
		return null;
	}
}
function renderHoroscopeSettings(igoogle) {
	// Check if we are on the facebook canvas page, if yes hide the addSectionButton
	if (document.getElementById("fbAddSectionButton")) {
		document.getElementById("fbAddSectionButton").style.display = "none";
	}
	var html = "";
	html += "<table cellspacing=\"0\" id=\"settings\">";
	html += "	<tr>";
	html += "		<th>";
	html += "			<img src=\"http://www.wunderweib.de/media/img/astro/widget/tierkreis.gif\" width=\"125\" height=\"125\" border=\"0\" usemap=\"#astromini\" />";
	html += "			<map name=\"astromini\">";
	html += "				<area id=\"skorpion\" shape=\"poly\" coords=\"76,36,94,17,100,24,105,30,110,38,90,53\" alt=\"Skorpion\" title=\"Skorpion\" href=\"javascript:renderHoroscope('skorpion');\" />";
	html += "				<area id=\"waage\" shape=\"poly\" coords=\"90,54,112,38,115,54,116,69,91,63\" alt=\"Waage\" title=\"Waage\" href=\"javascript:renderHoroscope('waage');\" />";
	html += "				<area id=\"jungfrau\" shape=\"poly\" coords=\"91,63,116,70,113,82,107,93,85,80\" alt=\"Jungfrau\" title=\"Jungfrau\" href=\"javascript:renderHoroscope('jungfrau');\" />";
	html += "				<area id=\"loewe\" shape=\"poly\" coords=\"78,94,91,109,100,102,106,92,86,80,76,89\" alt=\"Löwe\" title=\"Löwe\" href=\"javascript:renderHoroscope('loewe');\" />";
	html += "				<area id=\"krebs\" shape=\"poly\" coords=\"63,91,64,116,80,114,91,109,75,89\" alt=\"Krebs\" title=\"Krebs\" href=\"javascript:renderHoroscope('krebs');\" />";
	html += "				<area id=\"zwilling\" shape=\"poly\" coords=\"49,88,37,110,48,115,62,117,62,92\" alt=\"Zwillinge\" title=\"Zwillinge\" href=\"javascript:renderHoroscope('zwilling');\" />";
	html += "				<area id=\"stier\" shape=\"poly\" coords=\"37,79,18,94,26,104,36,108,48,87\" alt=\"Stier\" title=\"Stier\" href=\"javascript:renderHoroscope('stier');\" />";
	html += "				<area id=\"widder\" shape=\"poly\" coords=\"33,66,8,68,11,81,18,92,37,77\" alt=\"Widder\" title=\"Widder\" href=\"javascript:renderHoroscope('widder');\" />";
	html += "				<area id=\"fische\" shape=\"poly\" coords=\"35,48,11,40,8,56,8,68,34,66\" alt=\"Fische\" title=\"Fische\" href=\"javascript:renderHoroscope('fische');\" />";
	html += "				<area id=\"wassermann\" shape=\"poly\" coords=\"37,48,12,40,20,27,34,17,46,37\" alt=\"Wassermann\" title=\"Wassermann\" href=\"javascript:renderHoroscope('wassermann');\" />";
	html += "				<area id=\"steinbock\" shape=\"poly\" coords=\"61,34,63,8,48,9,36,16,47,37\" alt=\"Steinbock\" title=\"Steinbock\" href=\"javascript:renderHoroscope('steinbock');\" />";
	html += "				<area id=\"schuetze\" shape=\"poly\" coords=\"62,34,65,8,79,11,92,17,75,36\" alt=\"Schütze\" title=\"Schütze\" href=\"javascript:renderHoroscope('schuetze');\" />";
	html += "			</map>";
	html += "		</th>";
	html += "		<td>";
	html += "			<h5>Ihr Geburtsdatum</h5>";
	html += "                    <select class=\"txt\" id=\"selday\">";
	html += "                    <option value=\"1\">1</option>";
	html += "                    <option value=\"2\">2</option>";
	html += "                    <option value=\"3\">3</option>";
	html += "                    <option value=\"4\">4</option>";
	html += "                    <option value=\"5\">5</option>";
	html += "                    <option value=\"6\">6</option>";
	html += "                    <option value=\"7\">7</option>";
	html += "                    <option value=\"8\">8</option>";
	html += "                    <option value=\"9\">9</option>";
	html += "                    <option value=\"10\">10</option>";
	html += "                    <option value=\"11\">11</option>";
	html += "                    <option value=\"12\">12</option>";
	html += "                    <option value=\"13\">13</option>";
	html += "                    <option value=\"14\">14</option>";
	html += "                    <option value=\"15\">15</option>";
	html += "                    <option value=\"16\">16</option>";
	html += "                    <option value=\"17\">17</option>";
	html += "                    <option value=\"18\">18</option>";
	html += "                    <option value=\"19\">19</option>";
	html += "                    <option value=\"20\">20</option>";
	html += "                    <option value=\"21\">21</option>";
	html += "                    <option value=\"22\">22</option>";
	html += "                    <option value=\"23\">23</option>";
	html += "                    <option value=\"24\">24</option>";
	html += "                    <option value=\"25\">25</option>";
	html += "                    <option value=\"26\">26</option>";
	html += "                    <option value=\"27\">27</option>";
	html += "                    <option value=\"28\">28</option>";
	html += "                    <option value=\"29\">29</option>";
	html += "                    <option value=\"30\">30</option>";
	html += "                    <option value=\"31\">31</option>";
	html += "                    </select>";
	html += "                    <select class=\"txt\" id=\"selmonth\">";
	html += "                    <option value=\"1\">1</option>";
	html += "                    <option value=\"2\">2</option>";
	html += "                    <option value=\"3\">3</option>";
	html += "                    <option value=\"4\">4</option>";
	html += "                    <option value=\"5\">5</option>";
	html += "                    <option value=\"6\">6</option>";
	html += "                    <option value=\"7\">7</option>";
	html += "                    <option value=\"8\">8</option>";
	html += "                    <option value=\"9\">9</option>";
	html += "                    <option value=\"10\">10</option>";
	html += "                    <option value=\"11\">11</option>";
	html += "                    <option value=\"12\">12</option>";
	html += "                    </select>";
	html += "                    <select style=\"margin-bottom:10px;\" class=\"txt\" id=\"selyear\">";
	html += "                    <option value=\"1900\">1900</option>";
	html += "                    <option value=\"1901\">1901</option>";
	html += "                    <option value=\"1902\">1902</option>";
	html += "                    <option value=\"1903\">1903</option>";
	html += "                    <option value=\"1904\">1904</option>";
	html += "                    <option value=\"1905\">1905</option>";
	html += "                    <option value=\"1906\">1906</option>";
	html += "                    <option value=\"1907\">1907</option>";
	html += "                    <option value=\"1908\">1908</option>";
	html += "                    <option value=\"1909\">1909</option>";
	html += "                    <option value=\"1910\">1910</option>";
	html += "                    <option value=\"1911\">1911</option>";
	html += "                    <option value=\"1912\">1912</option>";
	html += "                    <option value=\"1913\">1913</option>";
	html += "                    <option value=\"1914\">1914</option>";
	html += "                    <option value=\"1915\">1915</option>";
	html += "                    <option value=\"1916\">1916</option>";
	html += "                    <option value=\"1917\">1917</option>";
	html += "                    <option value=\"1918\">1918</option>";
	html += "                    <option value=\"1919\">1919</option>";
	html += "                    <option value=\"1920\">1920</option>";
	html += "                    <option value=\"1921\">1921</option>";
	html += "                    <option value=\"1922\">1922</option>";
	html += "                    <option value=\"1923\">1923</option>";
	html += "                    <option value=\"1924\">1924</option>";
	html += "                    <option value=\"1925\">1925</option>";
	html += "                    <option value=\"1926\">1926</option>";
	html += "                    <option value=\"1927\">1927</option>";
	html += "                    <option value=\"1928\">1928</option>";
	html += "                    <option value=\"1929\">1929</option>";
	html += "                    <option value=\"1930\">1930</option>";
	html += "                    <option value=\"1931\">1931</option>";
	html += "                    <option value=\"1932\">1932</option>";
	html += "                    <option value=\"1933\">1933</option>";
	html += "                    <option value=\"1934\">1934</option>";
	html += "                    <option value=\"1935\">1935</option>";
	html += "                    <option value=\"1936\">1936</option>";
	html += "                    <option value=\"1937\">1937</option>";
	html += "                    <option value=\"1938\">1938</option>";
	html += "                    <option value=\"1939\">1939</option>";
	html += "                    <option value=\"1940\">1940</option>";
	html += "                    <option value=\"1941\">1941</option>";
	html += "                    <option value=\"1942\">1942</option>";
	html += "                    <option value=\"1943\">1943</option>";
	html += "                    <option value=\"1944\">1944</option>";
	html += "                    <option value=\"1945\">1945</option>";
	html += "                    <option value=\"1946\">1946</option>";
	html += "                    <option value=\"1947\">1947</option>";
	html += "                    <option value=\"1948\">1948</option>";
	html += "                    <option value=\"1949\">1949</option>";
	html += "                    <option value=\"1950\">1950</option>";
	html += "                    <option value=\"1951\">1951</option>";
	html += "                    <option value=\"1952\">1952</option>";
	html += "                    <option value=\"1953\">1953</option>";
	html += "                    <option value=\"1954\">1954</option>";
	html += "                    <option value=\"1955\">1955</option>";
	html += "                    <option value=\"1956\">1956</option>";
	html += "                    <option value=\"1957\">1957</option>";
	html += "                    <option value=\"1958\">1958</option>";
	html += "                    <option value=\"1959\">1959</option>";
	html += "                    <option value=\"1960\">1960</option>";
	html += "                    <option value=\"1961\">1961</option>";
	html += "                    <option value=\"1962\">1962</option>";
	html += "                    <option value=\"1963\">1963</option>";
	html += "                    <option value=\"1964\">1964</option>";
	html += "                    <option value=\"1965\">1965</option>";
	html += "                    <option value=\"1966\">1966</option>";
	html += "                    <option value=\"1967\">1967</option>";
	html += "                    <option value=\"1968\">1968</option>";
	html += "                    <option value=\"1969\">1969</option>";
	html += "                    <option value=\"1970\">1970</option>";
	html += "                    <option value=\"1971\">1971</option>";
	html += "                    <option value=\"1972\">1972</option>";
	html += "                    <option value=\"1973\">1973</option>";
	html += "                    <option value=\"1974\">1974</option>";
	html += "                    <option value=\"1975\">1975</option>";
	html += "                    <option value=\"1976\">1976</option>";
	html += "                    <option value=\"1977\">1977</option>";
	html += "                    <option value=\"1978\">1978</option>";
	html += "                    <option value=\"1979\">1979</option>";
	html += "                    <option value=\"1980\">1980</option>";
	html += "                    <option value=\"1981\">1981</option>";
	html += "                    <option value=\"1982\">1982</option>";
	html += "                    <option value=\"1983\">1983</option>";
	html += "                    <option value=\"1984\">1984</option>";
	html += "                    <option value=\"1985\">1985</option>";
	html += "                    <option value=\"1986\">1986</option>";
	html += "                    <option value=\"1987\">1987</option>";
	html += "                    <option value=\"1988\">1988</option>";
	html += "                    <option value=\"1989\">1989</option>";
	html += "                    <option value=\"1990\">1990</option>";
	html += "                    <option value=\"1991\">1991</option>";
	html += "                    <option value=\"1992\">1992</option>";
	html += "                    <option value=\"1993\">1993</option>";
	html += "                    <option value=\"1994\">1994</option>";
	html += "                    <option value=\"1995\">1995</option>";
	html += "                    <option value=\"1996\">1996</option>";
	html += "                    <option value=\"1997\">1997</option>";
	html += "                    <option value=\"1998\">1998</option>";
	html += "                    <option value=\"1999\">1999</option>";
	html += "                    <option value=\"2000\">2000</option>";
	html += "                    <option value=\"2001\">2001</option>";
	html += "                    <option value=\"2002\">2002</option>";
	html += "                    <option value=\"2003\">2003</option>";
	html += "                    <option value=\"2004\">2004</option>";
	html += "                    <option value=\"2005\">2005</option>";
	html += "                    <option value=\"2006\">2006</option>";
	html += "                    <option value=\"2007\">2007</option>";
	html += "                    <option value=\"2008\">2008</option>";
	html += "                    <option value=\"2009\">2009</option>";
	html += "                    <option value=\"2010\">2010</option>";
	html += "                    </select>";
	html += "			<div id=\"buttons\">";
	html += "				<input type=\"image\" onclick=\"calculateZodiac();\" name=\"OK\" value=\"ok\" src=\"http://www.wunderweib.de/media/img/astro/widget/but_ok.gif\" alt=\"OK\" />";
	html += "			</div>";
	html += "		</td>";
	html += "	</tr>";
	html += "</table>";
	container = document.getElementById("th-part1");
	container.innerHTML = html;
}
function renderHoroscope(zodiac) {
	// Check if we are on the facebook canvas page, if yes show the addSectionButton
	if (document.getElementById("fbAddSectionButton")) {
		document.getElementById("fbAddSectionButton").style.display = "block";
	}
	setZodiacCookie(zodiac);
	var hintro = "Ihr Horoskop steht leider noch nicht zur Verf&uuml;gung.";
	var htext = "";
	if (horoskope[zodiac] && horoskope[zodiac]["text"] && horoskope[zodiac]["intro"]) {
		htext = horoskope[zodiac]["text"];
		hintro = horoskope[zodiac]["intro"];
	}
	var html = "";
	html += "<div class=\"date\">";
	html += "	<h5>" + "Sonntag, 14. März 2010".toUpperCase() + "</h5>";
	html += "</div>";
	html += "<div class=\"settings\">";
	html += "	<a href=\"javascript:renderHoroscopeSettings();\">Einstellungen &raquo;</a>";
	html += "</div>";
	html += "<table cellspacing=\"0\">";
	html += "	<tr>";
	html += "		<th>";
	html += "			<h3>" + horoskope[zodiac]["displayName"] + "</h3>";
	html += "			<img src=\"http://www.wunderweib.de" + horoskope[zodiac]["img"] + "\" alt=\"" + horoskope[zodiac]["displayName"] + "\" title=\"" + horoskope[zodiac]["displayName"] + "\" />";
	html += "		</th>";
	html += "		<td>";
	html += "			<h3><i>" + hintro + "</i></h3>";
	html += "			<h5>VORMITTAG</h5>";
	html += "			<p>";
	html += "				" + htext;
	html += "			</p>";
	html += "			<div id=\"weiter\">";
	html += "				<a href=\"http://www.wunderweib.de/liebeundastro/horoskope/tageshoroskop/rubrik-tageshoroskop/heute/" + zodiac + "/\" target=\"_blank\">Weiter im Tageshoroskop&nbsp;&raquo;</a>";
	html += "			</div>";
	html += "		</td>";
	html += "	</tr>";
	html += "</table>";
	container = document.getElementById("th-part1");
	container.innerHTML = html;
	// Check if we are on the facebook canvas page, if yes reload
	if (document.getElementById("fbAddSectionButton")) {
		fbReload(zodiac);
	}
}
function calculateZodiac() {
	var zodiacData = new Array();
	zodiacData[0] = new Object();
	zodiacData[0]["zodiac"] = "steinbock";
	zodiacData[0]["min"] = new Date(1970, 0, 1, 0, 0, 0);
	zodiacData[0]["max"] = new Date(1970, 0, 20, 23, 59, 59);
	zodiacData[1] = new Object();
	zodiacData[1]["zodiac"] = "wassermann";
	zodiacData[1]["min"] = new Date(1970, 0, 21, 0, 0, 0);
	zodiacData[1]["max"] = new Date(1970, 1, 19, 23, 59, 59);
	zodiacData[2] = new Object();
	zodiacData[2]["zodiac"] = "fische";
	zodiacData[2]["min"] = new Date(1970, 1, 20, 0, 0, 0);
	zodiacData[2]["max"] = new Date(1970, 2, 20, 23, 59, 59);
	zodiacData[3] = new Object();
	zodiacData[3]["zodiac"] = "widder";
	zodiacData[3]["min"] = new Date(1970, 2, 21, 0, 0, 0);
	zodiacData[3]["max"] = new Date(1970, 3, 20, 23, 59, 59);
	zodiacData[4] = new Object();
	zodiacData[4]["zodiac"] = "stier";
	zodiacData[4]["min"] = new Date(1970, 3, 21, 0, 0, 0);
	zodiacData[4]["max"] = new Date(1970, 4, 20, 23, 59, 59);
	zodiacData[5] = new Object();
	zodiacData[5]["zodiac"] = "zwilling";
	zodiacData[5]["min"] = new Date(1970, 4, 21, 0, 0, 0);
	zodiacData[5]["max"] = new Date(1970, 5, 21, 23, 59, 59);
	zodiacData[6] = new Object();
	zodiacData[6]["zodiac"] = "krebs";
	zodiacData[6]["min"] = new Date(1970, 5, 22, 0, 0, 0);
	zodiacData[6]["max"] = new Date(1970, 6, 22, 23, 59, 59);
	zodiacData[7] = new Object();
	zodiacData[7]["zodiac"] = "loewe";
	zodiacData[7]["min"] = new Date(1970, 6, 23, 0, 0, 0);
	zodiacData[7]["max"] = new Date(1970, 7, 23, 23, 59, 59);
	zodiacData[8] = new Object();
	zodiacData[8]["zodiac"] = "jungfrau";
	zodiacData[8]["min"] = new Date(1970, 7, 24, 0, 0, 0);
	zodiacData[8]["max"] = new Date(1970, 8, 23, 23, 59, 59);
	zodiacData[9] = new Object();
	zodiacData[9]["zodiac"] = "waage";
	zodiacData[9]["min"] = new Date(1970, 8, 24, 0, 0, 0);
	zodiacData[9]["max"] = new Date(1970, 9, 23, 23, 59, 59);
	zodiacData[10] = new Object();
	zodiacData[10]["zodiac"] = "skorpion";
	zodiacData[10]["min"] = new Date(1970, 9, 24, 0, 0, 0);
	zodiacData[10]["max"] = new Date(1970, 10, 22, 23, 59, 59);
	zodiacData[11] = new Object();
	zodiacData[11]["zodiac"] = "schuetze";
	zodiacData[11]["min"] = new Date(1970, 10, 23, 0, 0, 0);
	zodiacData[11]["max"] = new Date(1970, 11, 21, 23, 59, 59);
	zodiacData[12] = new Object();
	zodiacData[12]["zodiac"] = "steinbock";
	zodiacData[12]["min"] = new Date(1970, 11, 22, 0, 0, 0);
	zodiacData[12]["max"] = new Date(1970, 11, 31, 23, 59, 59);
		var selday = document.getElementById("selday");
		var day = selday.options[selday.selectedIndex].value;
		var selmonth = document.getElementById("selmonth");
		var mon = selmonth.options[selmonth.selectedIndex].value;
		var selyear = document.getElementById("selyear");
		var year = selyear.options[selyear.selectedIndex].value;
		var date = new Date(year, mon - 1, day);
		if (date.getDate() == day && date.getMonth() == mon - 1 && date.getFullYear() == year) {
		    	 date.setYear(1970);
		    	 var zodiac = "";
		    	 for (var i = 0; i < zodiacData.length; i++) {
		    	 	if (date.getTime() > zodiacData[i]["min"].getTime() && date.getTime() < zodiacData[i]["max"].getTime()) {
		    	 		zodiac = zodiacData[i]["zodiac"];
		    			break;
		    	 	}
		    	 }
		    	 if (zodiac != "") {
		    	 	renderHoroscope(zodiac);
		    	 } else {
		   	 	alert("Zum eingegebenen Datum konnte kein Sternzeichen ermittelt werden!");
		    	 }
		} else {
			alert("Das eingegebene Datum existiert nicht!");
		}
}
function fbReload(zodiac) {
	FB_RequireFeatures(["Api"], function() {
		FB.Facebook.init("303ff630108c2afb4b3d6b4086365d4e", "/widgets_1/xd_receiver.html");
		var api = FB.Facebook.apiClient;
		api.requireLogin(function(exception) {
			api.fbml_refreshRefUrl("http://www.wunderweib.de/widgets_1/" + zodiac + "_profile.html", function(){});
			api.fbml_refreshRefUrl("http://www.wunderweib.de/widgets_1/" + zodiac + "_boxes.html", function(){});
			var fbml_profile_tab = '<fb:ref url="http://www.wunderweib.de/widgets_1/' + zodiac + '_profile.html" />';
			var fbml_boxes_tab = '<fb:ref url="http://www.wunderweib.de/widgets_1/' + zodiac + '_boxes.html" />';
			api.profile_setFBML(api.get_session().uid, fbml_boxes_tab, null, 'profile_action', fbml_profile_tab, function(){});
		});
        });
}
