/*
* RHG
* standard.js
*
* Author: Holger M. Stangl
* Date: Dezember 2007
*/


function hoverTsEffect( id, action, linkIt )
{
	if ( action == 1 )
	{
		var element = document.getElementById(id);
		element.style.backgroundColor = "#dcdddf";
		element.style.cursor = "pointer";
		element.style.color = "#368dda";
	}
	else if ( action == 2 )
	{
		var element = document.getElementById(id);
		element.style.backgroundColor = "#fff";
		element.style.cursor = "none";
		element.style.color = "#464646";
	}
}

function hoverMarginalTsEffect( id, action, linkIt )
{
	if ( action == 1 )
	{
		var element = document.getElementById(id);
		element.style.cursor = "pointer";
		element.style.color = "#368dda";
	}
	else if ( action == 2 )
	{
		var element = document.getElementById(id);
		element.style.cursor = "none";
		element.style.color = "#464646";
	}
}

function goTo( url )
{
	document.location = url;
}


function showTeaserArchive ( id )
{
	document.getElementById( 'ts_a_' + id ).href = "javascript:hideTeaserArchive('" + id + "');";
	document.getElementById( 'ts_a_' + id ).className = "open";
	document.getElementById( 'ts_text_' + id ).style.display = "block";
}

function hideTeaserArchive ( id )
{
	document.getElementById( 'ts_a_' + id ).href = "javascript:showTeaserArchive('" + id + "');";
	document.getElementById( 'ts_a_' + id ).className = "";
	document.getElementById( 'ts_text_' + id ).style.display = "none";
}


function showTeaserEvents ( id )
{
	document.getElementById( 'ts_' + id ).style.display = "none";
	document.getElementById( 'dtl_' + id ).style.display = "block";
}

function hideTeaserEvents ( id )
{
	document.getElementById( 'dtl_' + id ).style.display = "none";
	document.getElementById( 'ts_' + id ).style.display = "block";
	goTo( '#anchor_' + id );
}


function openWindow(placement,url,name,width,height)
{
    
	if (placement=='top')
    {
    	var x=(screen.width - screen.width);
   		var y=(screen.height - screen.height);
    }
    else if (placement=='center')
    {
    	var x=((screen.width - width) / 2);
    	var y=((screen.height - height) /2);
    }
    
	var popupWindow = window.open(url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+width+',height='+height+',left='+x+',top='+y);
	popupWindow.focus();
	
}