function SocialBookmarks() {
	var bml1 = ' <a rel="nofollow" target="_blank" href="http://';
	var bml2 = encodeURIComponent(document.title)+'"><img alt="Lesezeichen bei ';
	var bml3 = ' setzen" border=0 align=absmiddle src="/pics/bookmarks/';
	var bmlu = encodeURIComponent(location.href);
	
	document.write(bml1+'www.mister-wong.de/index.php?action=addurl&bm_url='+bmlu+'&bm_description='+bml2+'Mr.Wong'+bml3+'wong.gif"></a>');
	document.write(bml1+'del.icio.us/post?url='+bmlu+'&title='+bml2+'del.icio.us'+bml3+'delicious.gif"></a>');
	document.write(bml1+'yigg.de/neu?exturl='+bmlu+'&exttitle='+bml2+'Yigg'+bml3+'yigg.gif"></a>');
	document.write(bml1+'linkarena.com/bookmarks/addlink/?url='+bmlu+'&title='+bml2+'Linkarena'+bml3+'linkarena.gif"></a>');
	document.write(bml1+'www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+bmlu+'&title='+bml2+'Google'+bml3+'google.gif"></a>');
	document.write(bml1+'www.webnews.de/einstellen?url='+bmlu+'&title='+bml2+'Webnews'+bml3+'webnews.gif"></a>');
	document.write(bml1+'www.folkd.com/submit/'+bmlu+'&title='+bml2+'Folkd'+bml3+'folkd.gif"></a>');
	document.write(bml1+'www.wikio.de/vote?domain=www.smsmich.de&title='+bml2+'Wikio'+bml3+'wikio.gif"></a>');
	document.write(bml1+'myweb2.search.yahoo.com/myresults/bookmarklet?u='+bmlu+'&t='+bml2+'Yahoo'+bml3+'yahoo.gif"></a>');
	document.write(bml1+'www.icio.de/add.php?url='+bmlu+'&title='+bml2+'icio'+bml3+'icio.gif"></a>');
}

var OldHighlightID = 0;
function PreisHighlight(HighlightID) {
	var TdObj = document.getElementById('t'+OldHighlightID);
	if (TdObj != null) {
		TdObj.style.backgroundColor = '#ffffff';
	}

	var TdObj = document.getElementById('t'+HighlightID);
	if (TdObj != null) {
		TdObj.style.backgroundColor = '#FFE3BF';
	}
	OldHighlightID = HighlightID;
}

function popup (url) {
	fenster = window.open(url, "Popupfenster", "width=440,height=630,resizable=yes");
	fenster.focus();
	return false;
}

function printwin (url) {
	fenster = window.open(url, "Popupfenster", "width=540,height=500,resizable=yes,scrollbars=yes");
	fenster.focus();
	return false;
}

function abgwin() {
	fenster = window.open("/win-agb.php", "Popupfenster", "width=500,height=500,scrollbars=yes");
	fenster.focus();
	return false;
}

function allCities() {
	document.getElementById('citymenuelink').style.display = 'none';
	$('#citymenue').slideDown('slow');
}

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

function strtotime(Datum) {
	if (Datum.match(/^\d+\.\d+\.\d+$/gi)) {
		Datum 	= Datum.split(".");
		Tag 	= parseInt(Datum[0],10);
		Monat 	= parseInt(Datum[1],10)-1;
		Jahr 	= parseInt(Datum[2],10);
	}
	else if (Datum.match(/^\d+-\d+-\d+$/gi)) {
		Datum 	= Datum.split("-");
		Tag 	= parseInt(Datum[2],10);
		Monat 	= parseInt(Datum[1],10)-1;
		Jahr 	= parseInt(Datum[0],10);
	}
	else {
		return 0;
	}

	return Math.round(new Date(Jahr,Monat,Tag).getTime()/1000);
}

function NiceEuro(Zahl) {
	var Zahl = Math.round(Zahl*100);
	var Zahl = ''+Zahl/100;

	Zahl = Zahl.replace(/\./, ",");

	if      (Zahl.match(/^,\d/gi)) 		{ Zahl = '0'+Zahl; }

	if      (Zahl.match(/,\d\d$/gi)) 	{ return Zahl; }
	else if (Zahl.match(/,\d$/gi)) 		{ return Zahl+'0'; }
	else								{ return Zahl+',00'; }
}

