function openTutorial(anchor) {
    var winWidth = '350';
	var args = '';
        args += "height="+(screen.availHeight-50)+",";
        args += "width="+winWidth+",";
        args += "screenx="+(screen.availWidth-winWidth-25)+",";
        args += "screeny=0,";
        args += "left="+(screen.availWidth-winWidth-25)+",";
        args += "top=0,";
        args += "scrollbars=1,";
        args += "resizable=1,";
        args += "toolbar=0,";
        args += "status=0,";
   
	var win = window.open(anchor, "Tutorial", args);
	return false;
}

function EmbedFlash(path, height, width, flashvars)
{
  var obj = "<object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" quality=\"high\" ";
  if(height.length > 0)
      obj += "height=\"" + height + "\" ";
  
  if(width.length > 0)
      obj += "width=\""+ width + "\" ";
  
  obj += "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" VIEWASTEXT>\r\n";
    
  document.write( obj)
  document.write( "<param name=\"flashvars\" value=\"" + flashvars + "\" />\r\n" );
  document.write( "<param name=\"movie\" value=\"" + path + "\" />\r\n" );
  document.write( "<param name=\"src\" value=\"" + path + "\" />\r\n" );
  document.write( "<param name=\"quality\" value=\"high\" />\r\n" );
  document.write( "<embed src=\"" + path + "\" quality=\"high\" flashvars=\"" + flashvars + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" menu=\"false\" height=\"" + height + "\" width=\"" + width + "\" />\r\n" );
  document.write( "</object>\r\n" );
}

function doClear(inputField)
{
  if (inputField.value == inputField.defaultValue) 
  {
    inputField.value = "";
    inputField.style.color = "black";
  }
}

function fbs_click(){
    u=location.href;
    t=document.title;
    window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','menubar=1,resizable=1,width=626,height=436');
    return false;
}

function enableMail(did)
{
    var didText = "";
    if(did.innerHTML.toLowerCase().indexOf('img') > 1)
    {
        //didText = did.innerHTML.toLowerCase().replace('<img src="/images/at_icon.png" border="0">','@');
        didText = did.innerHTML.toLowerCase().replace(/(<([^>]+)>)/ig,'@');
        did.innerHTML = '<a href="mailto:'+ didText +'">'+ didText + '</a>';
    }
    //alert(did.innerHTML.toLowerCase());
}

function openBorgerDkArtikel()
{
    $('#borgerDk-artikelContent').slideDown('slow', function() {
    document.getElementById('borgerDk-artikelOpen').style.display = 'none';
    document.getElementById('borgerDk-artikelClose').style.display = 'block';
    document.getElementById('borgerDk-artikelCloseBottom').style.display = 'block';
    });

}

function closeBorgerDkArtikel()
{
    $('#borgerDk-artikelContent').slideUp('slow', function() {
    document.getElementById('borgerDk-artikelOpen').style.display = 'block';
    document.getElementById('borgerDk-artikelClose').style.display = 'none';
    document.getElementById('borgerDk-artikelCloseBottom').style.display = 'none';
    });

}
