  var surl;
  var stitle;
  var stags;
function replace1(sr,pattern,replace) {
  while ((ir=sr.indexOf(pattern))!=-1) {
    sr=sr.substr(0,ir)+replace+sr.substr(ir+pattern.length,sr.length);
  }
  return(sr);
}
function addLink(url,name,title) {
  url=replace1(url,"$1",encodeURIComponent(surl));
  url=replace1(url,"$2",encodeURIComponent(stitle));
  url=replace1(url,"$3",encodeURIComponent(stags));
  stagsc=replace1(stags," ",",");
  url=replace1(url,"$4",encodeURIComponent(stagsc));

  document.write("<a href=\""+url+"\"><img src=\"images/social/"+name+".gif\" border=\"0\" title=\"Bookmark bei: "+title+"\"></a> ");
}
function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
function addSocial(url,title,tags) {
  surl=url; // $1
  stitle=title; // $2
  stags=tags; // $3 space seperated

  //addLink("javascript:addbookmark($2,$1)","icon_firefox","Firefox Lesezeichen");
  addLink("http://thomaspfeifer.net/atom.xml","icon_rss","RSS-Newsfeed");
  addLink("http://ekstreme.com/socializer/?url=$1&title=$2","icon_socializer","Socializer");
  addLink("http://www.mister-wong.de/index.php?action=addurl&amp;bm_url=$1&amp;bm_notice=&amp;bm_description=$2&amp;bm_tags=$3","icon_mrwong","Mr Wong");
  addLink("http://del.icio.us/post?url=$1&title=$2","icon_delicious","del.icio.us");
  addLink("http://yigg.de/neu?exturl=$1&exttitle=$2","icon_yigg","YiGG");
  addLink("http://digg.com/submit?phase=2&url=$1&title=$2","icon_digg","Digg");
  addLink("http://www.icio.de/login.php?popup=1&url=$1&title=$2","icon_icio","Icio.de");
  addLink("http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk=$1=&labels=$4&title=$2","icon_google","Google Bookmarks");
  addLink("http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL=$1&title=$2","icon_oneview","Oneview");
  addLink("http://iq.lycos.de/lili/my/add?url=$1","icon_lycosiq","Lycos IQ");
  addLink("http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url=$1&Title=$2","icon_blinklist","Blinklist");
  addLink("http://www.webnews.de/einstellen?url=$1&title=$2","icon_webnews","Webnews");

  //addBookmark(title,url);
}

// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use
var popbackground="white" //specify backcolor or background image for pop window
var windowtitle="Image Window"  //pop window title
function detectexist(obj){
return (typeof obj !="undefined")
}
function jkpopimage(imgpath, popwidth, popheight, textdescription){
function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}
getpos()
var winattributes='width='+(popwidth+18)+',height='+(popheight+40)+',resizable=yes,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
}
jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth+30, popheight+90)

jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+textdescription+'</title><body '+bodyattribute+'><img src="'+imgpath+'" style="margin-bottom: 0px"><br><center>'+textdescription+'</center></body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}


