function sbOver(text) {
	if (text == '') {
		text = '...';
	} else {
		text='&nbsp;<strong>'+text+'</strong>';
	}
	document.getElementById('sbText').innerHTML=text;
}






function sbDo(was) {
	sburl=encodeURIComponent(location.href);
	sbtitle=encodeURIComponent(document.title);
	switch(was) {		
		case 'delicious':
			window.open('http://del.icio.us/post?url='+sburl+'&title='+sbtitle);
			break;
		case 'wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+sburl+'&bm_description='+sbtitle);
			break;
		case 'blinkList':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url='+sburl+'&Title='+sbtitle);
			break;
		case 'yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+sburl+'&t='+sbtitle);
			break;
		case 'yigg':
			window.open('http://yigg.de/neu?exturl='+sburl+'&exttitle='+sbtitle);
			break;	
		case 'furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+sburl+'&t='+sbtitle);
			break;
		case 'oneview':
			window.open('http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL='+sburl+'&title='+sbtitle);			
			break;
		case 'folkd':
			window.open('http://www.folkd.com/submit/page/'+sburl);
			break;
		case 'linkarena':	
			window.open('http://linkarena.com/bookmarks/addlink/?url='+sburl+'&title='+sbtitle+'&desc=&tags=');
			break;
		case 'google': 		
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+sburl+'&title='+sbtitle);
			break;
		case 'webnews': 		
			window.open('http://www.webnews.de/einstellen?url='+sburl+'&title='+sbtitle);
			break;
	}
}






function popup(){
	window.open('datenschutz.php','_blank','width=450,height=500,scrollbars=yes,resizable=yes,status=no,toolbar=no,left=200,top=150');
}
function agbpopup(){
	window.open('agbs.php','_blank','width=450,height=400,scrollbars=yes,resizable=yes,status="o,toolbar=no,left=200,top=150');
}

function swap_blub( blubId ){
    var e = document.getElementById("blub_" + blubId);
    e.style.display = (e.style.display == 'block') ? 'none' : 'block';
}

function hide_unhide(elementId){
	var temp = document.getElementById(elementId);
	temp.style.display = (temp.style.display == 'block' || temp.style.display == 'inline') ? 'none' : 'block';
}





function clearField(field){
if(field.value == field.defaultValue){
    field.value = "";
    }
}

function checkField(field){
if(field.value == ""){
    field.value = field.defaultValue;
    }
}




Slimbox.scanPage = function() {
	$$(document.links).filter(function(el) {
		return el.rel && el.rel.test(/^lightbox/i);
	}).slimbox({
		/* Put custom options here */
		loop: false,
		changeLocation:false,				// Beim Schließen der Lightbox springt das Hauptfenster zur Detailansicht des zuletzt in der Lightbox geöffneten Bildes
		initialWidth: 800,					// Anfangs-Breite für die Lightbox
		initialHeight: 600,					// Anfangs-Höhe für die Lightbox
		overlayOpacity: 0.7,				// Transparenz des Hintergrund-Overlays (1 = 100%, 0=0%)
		overlayFadeDuration: 200,			// Dauer des Abdunklungs-Vorgangs (ms)
		imageFadeDuration: 0,				// Dauer des Bild-Fadein-Effekts (ms)
		resizeDuration: 0,					// Dauer des Resize-Vorgangs (ms)
		captionAnimationDuration: 0,		// Dauer bis der Subtitle eingeblendet wird (ms)
		counterText: "Bild <strong>{x}</strong> von <strong>{y}</strong> (Navigieren Sie mit den Pfeiltasten)",
		previousKeys: [37, 80, 33, 75],
		nextKeys: [39, 78, 76],
		closeKeys: [27, 8, 19, 69, 46, 35, 36]

		}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});
};
window.addEvent("domready", Slimbox.scanPage);