function updateSwfSize(obj, w, h){
		 var player = document.getElementById('audioplayer_' + obj + '_player');
		 if(player){
		    // alert('player object there => player nr: ' + obj + ' w: ' + w + ' h: ' + h);
			//
			player.width = w;
			player.height = h;
			player.parentNode.width = w + 2;
			player.parentNode.height = h + 2;
		 }
		 // else alert('!!!!!!player object not there => player nr: ' + obj + ' w: ' + w + ' h: ' + h);
}

function check_form(form){
         //
         var bool = true;

         //
         for(var i = 0; i < form.elements.length; i++){
             if(form.elements[i].value == '') bool = false;
         }

         if(!bool) alert('Bitte füllen Sie alle Felder aus!');
         return bool;
}

function showhide(name){
        //
        var e = document.getElementById(name);
        e.style.display = (e.style.display == 'block') ? 'none' : 'block';
}

function poll_set_row(answer_id, poll_id){
         var e = document.getElementById(answer_id + '_' + poll_id);
         if(e){
            if(e.checked == false) {
               set_row_inactive(answer_id, poll_id);
            }
         }
}

function poll_set_checked(id){
         var e = document.getElementById(id);
         if(e){
            // alert(e.checked);
            if(e.checked == true) {
               e.checked = false;
            }
            else e.checked = true;
         }
}

function poll_radio_set_checked(id){
         var e = document.getElementById(id);
         if(e){
            e.checked = true;
         }
}

function poll_set_row_active2(answer_id, poll_id){
         //
         var e = document.getElementById('div2_' + answer_id + '_' + poll_id);
         if(e){
            e.className = 'color';
         }
}


function poll_set_row_active(answer_id, poll_id){
         //
         for(i = 0; i < 60; i++){
             set_row_inactive(i, poll_id);
         }

         //
         var e = document.getElementById('div2_' + answer_id + '_' + poll_id);
         if(e){
            e.className = 'color';
         }

}

function set_row_inactive(answer_id, poll_id){
         var e = document.getElementById('div2_' + answer_id + '_' + poll_id);
         if(e){
            e.className = '';
         }
}



function showvotingdiv()
{
	document.getElementById("voting_win_layer").style.visibility = 'visible';
	return false;
}

function closevotingdiv()
{
	document.getElementById("voting_win_layer").style.visibility = 'hidden';
}

function fullsizeImage(url)
{
	wndShow=window.open(url,'fullsize','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=500,screenX=50,screenY=50,top=50,left=50');
	wndShow.focus();
}

function fullsizeImageFormat(url,el)
{
	var thisImage  = el.firstChild;
	var thisWidth  = thisImage.offsetWidth;
	var thisHeight = thisImage.offsetHeight;

	var setWidth  = 800;
	var setHeight = 500;

	if(thisWidth < thisHeight){
		setWidth  = 600;
		setHeight = 800;
	}

	wndShow=window.open(url,'fullsize','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+setWidth+',height='+setHeight+',screenX=50,screenY=50,top=50,left=50');
	wndShow.focus();
}

function fullsizeImageFormatWithGivenSize(url, el, w, h)
{
	var thisImage  = el.firstChild;
	var thisWidth  = thisImage.offsetWidth;
	var thisHeight = thisImage.offsetHeight;

	var setWidth  = w; //800;
	var setHeight = h; //500;

	if(thisWidth < thisHeight && setWidth > setHeight){
		setWidth  = h; // 600;
		setHeight = w; // 800;
	}

	wndShow=window.open(url,'fullsize','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+setWidth+',height='+setHeight+',screenX=50,screenY=50,top=50,left=50');
	wndShow.focus();
}


function changeTeaserContent(key, cur, qty)
{
	for(i = 1; i <= qty; i++)
    {
    	document.getElementById(key+"_"+i).style.display = 'none';
    }
    document.getElementById(key+"_"+cur).style.display = 'block';
}

function showTooltip(name)
{
	document.getElementById("vip_rel_tooltip").firstChild.data = name;
	document.getElementById("vip_rel_tooltip").style.visibility = 'visible';
}

function hideTooltip()
{
	document.getElementById("vip_rel_tooltip").style.visibility = 'hidden';
}

function pnc_openWin(url,name,popWidth,popHeight,scroll,popLeft,popTop)
{
	leftPos=!isNaN(popLeft) ? popLeft : screen.width ? (screen.width-popWidth)/2 : 20;
	topPos=!isNaN(popTop) ? popTop : screen.height ? (screen.height-popHeight)/2 : 20;
    eval("pnc_"+name+"=window.open('"+url+"','"+name+"','"+",scrollbars="+scroll+",width="+popWidth+",height="+popHeight+",left="+leftPos+",top="+topPos+"');");
    eval("pnc_"+name+".focus()");
}

function topFlopVoting(value,vid)
{
	document.tf_form.tf_val.value = value;
	document.tf_form.tf_v_id.value = vid;
	document.tf_form.submit();
}

function showMoreTrackbacks()
{
	document.getElementById("tb_more").style.display = 'block';
	document.getElementById("tb_more_href").style.display = 'none';
}

function addBookmarkUrl(url, title)
{
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	}
	else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title);
	}
	else if(window.opera && window.print) { // Opera Hotlist
		return true;
	}
}

function setFinderRatingLayer()
{
  var Res =  document.URL.search(eval("/#rated/"));

  if (Res != -1)
  {
  	document.getElementById('rating_form').style.display = 'none';
  	document.getElementById('rating_thanks').style.display = 'block';
  }
}