// JavaScript Document
function checkForm() {
	if(document.form.comment_name.value=='') {
		alert("Bitte Namen eingeben.");
		return false;
	}

		
	if(document.form.comment_email.value=='') {
		alert("Bitte eine Emailadresse eingeben.");
		return false;
	}	
	
	if(document.form.comment_comment.value=='') {
		alert("Bitte Kommentar eingeben.");
		return false;
	}	
	
	alert("Vielen Dank für ihren Kommentar!");
	
	return true;
}


function pop(url,breite,hoehe)    {
      var pop = null;
      pop =  window.open(url,'popwin','width='+breite+',height='+hoehe+',resizable=no,status=no,scrollbars=yes,menubar=no,toolbar=no,directories=no')
      if (pop) {
         pop.moveTo(screen.width/2-breite/2,screen.height/2-hoehe/2);
         pop.window.focus();
      }
}
/*SocialBookmarking Script*/
function sobo_info(txt,type) {
    if (txt == '') {
        txt='...';
    } else  {
  		txt = '<b style=\"color: red;\">'+txt+'</b>';
	}
    
	
	var elm_sobo = document.getElementById('infosobo');
    var elm_news = document.getElementById('infonews');

	if(type=='sobo') {
		elm_news.innerHTML = 'Diesen Artikel einstellen bei ...';
    	elm_sobo.innerHTML='Diesen Artikel bookmarken bei '+txt+'.';
	}
	else if(type=='news') {    
    	elm_news.innerHTML='Diesen Artikel einstellen bei '+txt+'.';
	    elm_sobo.innerHTML = 'Diesen Artikel bookmarken bei ...';
	}

}

function sobo_url(who) {
    var sobourl=encodeURIComponent(window.location.protocol+'//'+
        (window.location.hostname+window.location.pathname).replace(/\/:.*?\//g,'/'));
    var sobotitle=encodeURIComponent(document.title);
    var sobolnk='';
    switch(who) {
    case 'delicious':
	sobolnk='del.icio.us/post?url='+sobourl+'&title='+sobotitle;
	break;
    case 'folkd':
	sobolnk='www.folkd.com/submit/page/'+sobourl;
	break;
    case 'google':
	sobolnk='www.google.com/bookmarks/mark?op=add&hl=de&amp;bkmk='
	    +sobourl+'&title='+sobotitle;
	break;
    case 'larena':
	sobolnk='linkarena.com/bookmarks/addlink/?url='
	    +sobourl+'&title='+sobotitle+'&desc=&amp;tags=';
	break;
    case 'wong':
	sobolnk='www.mister-wong.de/index.php?action=addurl&bm_url='
	    +sobourl+'&bm_description='+sobotitle;
	break;
    case 'yahoo':
	sobolnk='myweb2.search.yahoo.com/myresults/bookmarklet?u='
	    +sobourl+'&t='+sobotitle;
	break;
    case 'digg':
	sobolnk='digg.com/submit?phase=2&url='
	    +sobourl+'&bodytext=&tags=&title='+sobotitle;
	break;
    case 'lufee':
	sobolnk='www.lufee.de/submit.php?link='+sobourl+'&ititle='+sobotitle;
	break;
    case 'tausend':
	sobolnk='tausendreporter.stern.de/submit.php?url='+sobourl;
	break;
    case 'webnews':
	sobolnk='www.webnews.de/einstellen?url='+sobourl+'&title='+sobotitle;
	break;
    case 'wikio':
	sobolnk='www.wikio.de/vote?url='+sobourl;
	break;
    case 'yigg':
	sobolnk='yigg.de/neu?exturl='+sobourl+'&exttitle='+sobotitle;
	break;
	
	case 'furl':
	sobolnk='furl.net/storeIt.jsp?t='+sobotitle+'&u='+sobourl;
	break;
	case 'blinklist':
	sobolnk='blinklist.com/index.php?Action=Blink/addblink.php&Name='+sobotitle+'&Description='+sobotitle+'&Url='+sobourl;
	break;	
	case 'reddit':
	sobolnk='reddit.com/submit?url='+sobourl+'&title='+sobotitle;
	break;	
	case 'feedmelinks':
	sobolnk='feedmelinks.com/categorize?from=toolbar&op=submit&name='+sobotitle+'&url='+sobourl+'&version=0.7';
	break;	
	case 'technorati':
	sobolnk='www.technorati.com/faves?add='+sobourl;
	break;
	case 'newsvine':
	sobolnk='www.newsvine.com/_wine/save?u='+sobourl+'&h='+sobotitle;
	break;	
	case 'socializer':
	sobolnk='ekstreme.com/socializer/?url='+sobourl+'&title='+sobotitle;
	break;	
	case 'magnolia':
	sobolnk='ma.gnolia.com/bookmarklet/add?url='+sobourl+'&title='+sobotitle+'&description='+sobotitle;
	break;	
	case 'stumbleupon':
	sobolnk='www.stumbleupon.com/refer.php?url='+sobourl+'&title='+sobotitle;
	break;	
	case 'rawsugar':
	sobolnk='www.rawsugar.com/tagger/?turl='+sobourl+'&tttl='+sobotitle;
	break;	
	case 'squidoo':
	sobolnk='www.squidoo.com/lensmaster/bookmark?'+sobourl;
	break;	
	
	
    }
    window.open('http://'+sobolnk);
}
function sobo_link(type,title, hint, png, width, height)
{
	var type_text;
	if(type=='sobo')
	  type_txt = 'bookmarken';
	else if(type=='news')
	  type_txt = 'eisntellen';
	
    document.write('<A TARGET=\"_blank\" CLASS=extra REL=\"nofollow\"'+
        ' TITLE=\"Diesen Artikel '+type_txt+' bei '+title+'\"' +
        ' HREF=\"http://'+title+'\"'+
        ' ONMOUSEOVER="sobo_info(\''+hint+'\',\''+type+'\');\"'+
        ' ONMOUSEOUT=\"sobo_info(\'\',\''+type+'\');\" STYLE=\"padding: 0 2px;\"'+
        ' ONCLICK=\"sobo_url(\''+png+'\');return false;\">'+
        '<IMG SRC=\"images/sobo/'+png+'.png\" ALT=\"'+hint+'\"'+
        ' WIDTH='+width+' HEIGHT='+height+
        ' BORDER=0></A>');
}
function sobo_links(type)
{
	
  if(type=='sobo') {
	  sobo_link(type,'www.Mister-wong.de', 'Mister Wong', 'wong', '18', '18');
	  sobo_link(type,'www.Linkarena.com', 'Linkarena', 'larena', '18', '18');
	  sobo_link(type,'www.Google.com', 'Google', 'google', '18', '18');
	  sobo_link(type,'Del.icio.us', 'Del.icio.us', 'delicious', '18', '18');
	  sobo_link(type,'www.Folkd.com', 'Folkd', 'folkd', '18', '18');
	  sobo_link(type,'www.Yahoo.com', 'Yahoo', 'yahoo', '18', '18');
	  sobo_link(type,'www.Furl.net', 'Furl', 'furl', '18', '18');
	  sobo_link(type,'www.Blinklist.com', 'Blinklist', 'blinklist', '18', '18');
	  document.write('<br>');
	  sobo_link(type,'www.Reddit.com', 'Reddit', 'reddit', '18', '18');
	  sobo_link(type,'www.FeedMeLinks.com', 'FeedMeLinks', 'feedmelinks', '18', '18');
	  sobo_link(type,'www.NewsVine.com', 'NewsVine', 'newsvine', '18', '18');
	  sobo_link(type,'www.Ekstreme.com', 'Ekstreme', 'socializer', '18', '18');
	  sobo_link(type,'Ma.Gnolia.com', 'Ma.Gnolia', 'magnolia', '18', '18');
	  sobo_link(type,'www.StumbleUpon.com', 'StumbleUpon', 'stumbleupon', '18', '18');
	  sobo_link(type,'www.RawSugar.com', 'RawSugar', 'rawsugar', '18', '18');
	  sobo_link(type,'www.Squidoo.com', 'Squidoo', 'squidoo', '18', '18');
	  
  } else if(type=='news') {
	  sobo_link(type,'www.Yigg.de', 'Yigg', 'yigg', '18', '18');  
	  sobo_link(type,'www.Webnews.de', 'Webnews', 'webnews', '18', '18');
	  sobo_link(type,'digg.com', 'Digg', 'digg', '18', '18');
	  sobo_link(type,'www.Lufee.de', 'Lufee', 'lufee', '23', '19');
	  sobo_link(type,'tausendreporter.stern.de', 'Tausendreporter', 'tausend', '18', '18');
	  sobo_link(type,'www.Wikio.de', 'Wikio', 'wikio', '22', '19');
	  sobo_link(type,'www.Technorati.com', 'Technorati', 'technorati', '18', '18');
  }
}
function sobo()
{
  document.write(
    '<TABLE WIDTH=\"100%\" CELLSPACING=10 BORDER=0 CELLPADDING=10'+
    ' STYLE=\"clear: both; margin: 0;\">'+
    '<TR><TD WIDTH=\"50%\" ALIGN=center STYLE=\"white-space: nowrap;\">'+
	'<SPAN ID=infosobo>Diesen Artikel bookmarken bei ...</SPAN><br>');
	
  sobo_links('sobo');
  document.write(
    '</TD><TD WIDTH=\"50%\" ALIGN=center STYLE=\"white-space: nowrap;\">'+
	'<SPAN ID=infonews>Diesen Artikel einstellen bei ...</SPAN><br>');
  sobo_links('news');
  document.write('</TD></TR></TABLE>');
}