function fnMMMouseOver( p_oObject )
{
	oLink = p_oObject;
	if( p_oObject.tagName == "TD" )
	{
		oLink = p_oObject.firstChild;
	}
	
	oImage = oLink.firstChild;
	p_oObject.style.backgroundColor   = "#E02841";
	oLink.style.backgroundColor = "#E02841";
}

function fnMMMouseOut( p_oObject )
{
	oLink = p_oObject;
	if( p_oObject.tagName == "TD" )
	{
		oLink = p_oObject.firstChild;
	}
	
	oImage = oLink.firstChild;
	p_oObject.style.backgroundColor   = "";
	oLink.style.backgroundColor = "";
}

function fnMMClick( p_strChapter, p_strParams )
{
	self.document.location = '/scanclub.de/index.php?' + p_strParams + '&c=' + p_strChapter;
}

function fnResizeContent( )
{
	var oLayer     = document.getElementById( "content" );
	var oLayerMM   = document.getElementById( "mm" );
	var oLayerInfo = document.getElementById( "info" );
	var oLayerFill = document.getElementById( "fill" );
	
	if( oLayer ) {
		var iClientWidth  = 0;
		var iClientHeight = 0;
		
		if( window.innerWidth )
		{
			iClientWidth  = window.innerWidth  - ( oLayerMM.style.width + oLayerInfo.style.width ) - 550;
			iClientHeight = window.innerHeight - ( oLayerMM.style.height + oLayerInfo.style.height ) + 200;
			oLayer.style.width  = iClientWidth  + 'px';
			oLayer.style.height = iClientHeight + 'px';
		} else {
			iClientWidth  = document.body.offsetWidth - ( oLayerMM.offsetWidth + oLayerInfo.offsetWidth );
			iClientHeight = oLayerMM.offsetHeight  - oLayerFill.offsetHeight;
			oLayer.style.width  = iClientWidth - 40;
			oLayer.style.height = iClientHeight;
		}
	}
}

function fnAddArticle( p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=ad_article&id=-1';	
}

function fnEditArticle( p_strID, p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=ad_article&id=' + p_strID;	
}

function fnDeleteArticle( p_strID, p_strText, p_strParams )
{
	if( confirm( "Wollen Sie den Artikel '" + p_strText + "' wirklich löschen?" ) )
	{
		self.document.location = 'index.php?' + p_strParams + '&c=ad_article_delete&id=' + p_strID;	
	}
}

function fnBuyArticle( p_strID, p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=shop_article_add&id=' + p_strID;
}

function fnShopDeleteArticle( p_strID, p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=shop_delete&id=' + p_strID;	
}

function fnEditUser( p_strID, p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=ad_user_edit&id=' + p_strID;	
}

function fnDeleteUser( p_strID, p_strParams )
{
	if( confirm( "Wollen Sie den User wirklich löschen?" ) )
	{
		self.document.location = 'index.php?' + p_strParams + '&c=ad_user_delete&id=' + p_strID;	
	}
}

function fnAddCandidate( p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=ad_candidate&id=-1';
}

function fnChangeProfile( p_strID, p_strParams )
{
	self.document.location = 'index.php?' + p_strParams + '&c=ad_profile_questions&id=' + p_strID;
}

