<!--
/*======================================================================/*
// InstantForum.NET - Global Menu File									//
// (c) Ryan Healey © 2004 InstantASP Limited.							//
//																		//
// http://www.instantasp.co.uk/											//
// sales@instantasp.co.uk												//
\*======================================================================*/

// Get browser information

var if_userAgent = navigator.userAgent.toLowerCase();
var opera = (if_userAgent.indexOf('opera') != -1); // is opera
var ns4 = (document.layers) ? true : false; // is netscape 4
var ie4 = (document.all && !document.getElementById) ? true : false; // is IE 4
var ie5 = (document.all && document.getElementById) ? true : false; // is IE 5+
var ns6 = (!document.all && document.getElementById) ? true : false; // is netscape 6

/* ----------------------------------------------------------- */
// Build Search Link 
/* ----------------------------------------------------------- */

function if_InitSearchLink(strForumSkin) {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" title="Search" class="smllinks"><img src="';
	strLink += strForumSkin;
	strLink += 'navigation_search.gif" border="0" align="absmiddle">Suche</a>';}
	else {
	strLink += '<a href="search.aspx" title="Search" class="smllinks"><img src="';
	strLink += strForumSkin;
	strLink += 'navigation_search.gif" border="0" align="absmiddle">Suche</a>';}
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Search Menu
/* ----------------------------------------------------------- */

function if_InitSearch(strForumSkin) {
 
	var tableCode = '';
	tableCode += '<form name="mnu_search" method="get" action="search.aspx">'
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Search All Forums</td></tr>'
	tableCode += '<tr><td nowrap class="ForumsBody1">'
	tableCode += '<input type="text" class="FormInputText" size="18" name="query">&nbsp;'
	tableCode += '<input type="image" align="absmiddle" ToolTip="Search Forums..." alt="Suche im Forum" border="0" src="'
	tableCode +=  strForumSkin + 'button_go.gif"></a></td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="search.aspx?forumid=ok&adv=1" class="smlLinks">Erweiterte Suche</a></td></tr>'
	tableCode += '</table>'
	tableCode += '</td></tr>'
	tableCode += '</table></form>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Recent Posts Link 
/* ----------------------------------------------------------- */

function if_InitRecentTopicsLink() {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" title="Recent Topics" class="smllinks">Letzte Beitr&auml;ge</a>&nbsp;|&nbsp;';}
	else {
	strLink += '<a href="miscellaneous.aspx?show=misc24" title="Recent Topics" class="smllinks">Letzte Beitr&auml;ge</a>&nbsp;|&nbsp;';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Recent Posts Menu
/* ----------------------------------------------------------- */

 function if_InitRecentPosts() {
 
	var tableCode = '';
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'		
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Select View...</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="miscellaneous.aspx?forumid=ok&show=lastvisit" class="smlLinks">Posts since my last visit</a>'
	tableCode += '</td></tr><tr><td class="ForumsBody1">'
	tableCode += '<a href="miscellaneous.aspx?forumid=ok&show=misc12" class="smlLinks">Beitr&auml;ge der letzten 12 Stunden</a>'
	tableCode += '</td></tr><tr><td class="ForumsBody1">'
	tableCode += '<a href="miscellaneous.aspx?forumid=ok&show=misc24" class="smlLinks">Beitr&auml;ge der letzten 24 Stunden</a>'
	tableCode += '</td></tr><tr><td class="ForumsBody1">'
	tableCode += '<a href="miscellaneous.aspx?forumid=ok&show=misc48" class="smlLinks">Beitr&auml;ge der letzten 48 Stunden</a>'
	tableCode += '</td></tr></table>'		
	tableCode += '</td></tr>'
	tableCode += '</table>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Author Name Link 
/* ----------------------------------------------------------- */

function if_InitAuthorNameLink(strAuthorName, intAuthorID) {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" class="smllinks"><b>' + strAuthorName + '</b></a>';}
	else {
	//ash user.aspx funzt net -> forumid=ok rausgenommen
	strLink += '<a href="userinfo.aspx?forumid=ok&id=' + intAuthorID + '" class="smllinks"><b>' + strAuthorName + '</b></a>';
	//strLink += '<a href="userinfo.aspx?id=' + intAuthorID + '" class="smllinks"><b>' + strAuthorName + '</b></a>';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Author Link Menu
/* ----------------------------------------------------------- */

 function if_InitAuthorName(intAuthorID) {
 
	var tableCode = '';
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'		
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="userinfo.aspx?id='
	tableCode += intAuthorID
	tableCode += '&forumid=ok" class="smlLinks">Zeige das Profil des Mitgliedes</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?MemberID='
	tableCode += intAuthorID
	tableCode += '&Task=AddBuddy&forumid=ok" class="smlLinks">Hinzuf&uuml;gen zur Freundesliste</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?MemberID='
	tableCode += intAuthorID
	tableCode += '&Task=doPM&forumid=ok" class="smlLinks">Sende eine private Mitteilung</a>'
	tableCode += '</td></tr>'
	//PR 11958
	/*tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?MemberID='
	tableCode += intAuthorID
	tableCode += '&Task=doEmail&forumid=ok" class="smlLinks">Sende dem Mitglied eine Email</a>'
	tableCode += '</td></tr>'*/
	tableCode += '</table></td></tr>'
	tableCode += '</table>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Control Panel Link 
/* ----------------------------------------------------------- */

function if_InitControlPanelLink() {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" class="smllinks"><b>Einstellungen</b></a>&nbsp;|&nbsp;';}
	else {
	strLink += '<a href="profile" class="smllinks"><b>Einstellungen</b></a>&nbsp;|&nbsp;';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Control Panel Menu
/* ----------------------------------------------------------- */

 function if_InitControlPanel() {
 
	var tableCode = '';
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'		
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += '<a href="profile.aspx?forumid=ok" class="HeaderTxt">Einstellungen</a></td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="contact.aspx?forumid=ok" class="smlLinks">Contact</a> / '
	tableCode += '<a href="personal.aspx?forumid=ok" class="smlLinks">Personal Info</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="signature.aspx?forumid=ok" class="smlLinks">Signatur</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="avatar.aspx?forumid=ok" class="smlLinks">Avatar</a> / '
	tableCode += '<a href="photo.aspx?forumid=ok" class="smlLinks">Foto</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logininfo.aspx?forumid=ok" class="smlLinks">Registrations Details</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumGroupHeader">'
	tableCode += 'Your Controls'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="customize.aspx?forumid=ok" class="smlLinks">Forum Einstellungen</a>'
	tableCode += '</td></tr>'

	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="forumsubscriptions.aspx?forumid=ok" class="smlLinks">Forum</a> / '
	tableCode += '<a href="subscriptions.aspx?forumid=ok" class="smlLinks">Beitrags Beschreibung</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="privatemessages.aspx?forumid=ok&Folder=InBox" class="smlLinks">PM erhaltene Mitteilungen</a> / '
	tableCode += '<a href="privatemessages.aspx?forumid=ok&Folder=SentItems" class="smlLinks">PM gesendete Mitteilungen</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="buddies.aspx?forumid=ok" class="smlLinks">Freundesliste</a> / '
	tableCode += '<a href="ignore.aspx?forumid=ok" class="smlLinks">Ignore List</a>'
	tableCode += '</td></tr>'
	tableCode += '</table>'
	tableCode += '</td></tr></table>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Forum Options Link
/* ----------------------------------------------------------- */

function if_InitForumOptionsLink() {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" class="HeaderTxt" '
	strLink += 'tooltip="Forum Optionen anzeigen">Forum Optionen</a>';}
	else {
	strLink += '';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Forum Options Menu
/* ----------------------------------------------------------- */

 function if_InitForumOptions() {
 
	var tableCode = '';
	var intForumID = if_getQueryStringParameter(window.top.location, 'forumid');
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'		
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Forum Optionen</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&Task=doPost" class="smlLinks">Erstelle neues Thema</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&Task=doForumSub" class="smlLinks">Forum abonnieren</a>'
	tableCode += '</td></tr>'
	tableCode += '</table></td></tr>'
	tableCode += '</table>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Forum Search Link
/* ----------------------------------------------------------- */

function if_InitForumSearchLink() {
	
	var strLink = '';
	var intForumID = if_getQueryStringParameter(window.top.location, 'forumid');
	if (ie4 || ie5 || ns6) {	
	strLink += '<a href="javascript:void(\'\');" class="HeaderTxt" '
	strLink += 'tooltip="Im Forum suchen">Suche im Forum</a>';}
	else {
	strLink += '<a href="search.aspx?forumid=' + intForumID + '&fid=' + intForumID + '" class="HeaderTxt" '
	strLink += 'tooltip="Suche im Forum">Suche im Forum</a>';}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Forum Search Menu
/* ----------------------------------------------------------- */

function if_InitForumSearch(strForumSkin) {
 
	var tableCode = '';
	var intForumID = if_getQueryStringParameter(window.top.location, 'forumid');
	tableCode += '<form name="mnu_search" method="get" action="search.aspx">'
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Suche im Forum</td></tr>'
	tableCode += '<tr><td nowrap class="ForumsBody1">'
	tableCode += '<input type="hidden" class="FormInputText" value="' + intForumID + '" name="fid">'
	tableCode += '<input type="text" class="FormInputText" size="18" name="query">&nbsp;'
	tableCode += '<input type="image" ToolTip="Search Forum..." alt="Suche im Forum..." align="absmiddle" border="0" src="'
	tableCode +=  strForumSkin + 'button_go.gif"></a></td></tr>'
	tableCode += '</table>'
	tableCode += '</td></tr>'
	tableCode += '</table></form>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Topic Options Link
/* ----------------------------------------------------------- */

function if_InitTopicOptionsLink() {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" class="HeaderTxt" '
	strLink += 'tooltip="Zeige Beitrags Optionen">Beitrag Optionen</a>';}
	else {
	strLink += '';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Topic Options
/* ----------------------------------------------------------- */

 function if_InitTopicOptions() {
 
	var tableCode = '';
	var intForumID = if_getQueryStringParameter(window.top.location, 'forumid');
	var intMessageID = if_getQueryStringParameter(window.top.location, 'messageid');
	var intTopicPage = if_getQueryStringParameter(window.top.location, 'topicpage');
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'		
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Optionen</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&MessageID='
	tableCode += intMessageID
	tableCode += '&TopicPage='
	tableCode += intTopicPage
	tableCode += '&Task=doReply" class="smlLinks">Sende Antwort an den Beitrag</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&MessageID='
	tableCode += intMessageID
	tableCode += '&TopicPage='
	tableCode += intTopicPage
	tableCode += '&Task=doTopicSub" class="smlLinks">Thema abonnieren</a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="logon.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&MessageID='
	tableCode += intMessageID
	tableCode += '&TopicPage='
	tableCode += intTopicPage
	tableCode += '&Task=doEmailTopic" class="smlLinks">Sende den Beitrag per Email </a>'
	tableCode += '</td></tr>'
	tableCode += '<tr><td class="ForumsBody1">'
	tableCode += '<a href="javascript:if_wOpen(\'printtopic.aspx?ForumID='
	tableCode += intForumID
	tableCode += '&MessageID='
	tableCode += intMessageID
	tableCode += '\',\'700\',\'500\'\,\'1\',\'1\',\'1\',\'1\',\'1\',\'1\')" class="smlLinks">Druckansicht</a>'
	tableCode += '</td></tr>'
	tableCode += '</table></td></tr>'
	tableCode += '</table>';	
	return tableCode;

}

/* ----------------------------------------------------------- */
// Build Topic Rating Link
/* ----------------------------------------------------------- */

function if_InitTopicRatingLink() {
	
	var strLink = '';
	if (ie4 || ie5 || ns6) {
	strLink += '<a href="javascript:void(\'\');" class="HeaderTxt" '
	strLink += 'tooltip="Bewerte den Beitrag...">Bewerte den Beitrag</a>';}
	else {
	strLink += '';
	}
	
	document.write(strLink);
	
}

/* ----------------------------------------------------------- */
// Build Topic Rating Menu
/* ----------------------------------------------------------- */

function if_InitTopicRating(strForumSkin) {
 
	var tableCode = '';
	var intForumID = if_getQueryStringParameter(window.top.location, 'forumid');
	var intMessageID = if_getQueryStringParameter(window.top.location, 'messageid');
	var intTopicPage = if_getQueryStringParameter(window.top.location, 'topicpage');
	tableCode += '<form name="mnu_search" method="get" action="shwmessage.aspx">'
	tableCode += '<table width="100%" class="ForumsBackGroundTable" cellspacing="0" cellpadding="0">';
	tableCode += '<tr><td>'
	tableCode += '<input type="hidden" name="ForumID" value="' + intForumID + '">'
	tableCode += '<input type="hidden" name="MessageID" value="' + if_removeBookmark(intMessageID) + '">'
	tableCode += '<input type="hidden" name="TopicPage" value="' + intTopicPage + '">'
	tableCode += '<table width="100%" cellspacing="1" cellpadding="7">'
	tableCode += '<tr><td class="ForumsHeader">'
	tableCode += 'Beitrag bewerten</td></tr>'
	tableCode += '<tr><td nowrap class="ForumsBody1" valign="top">'
	tableCode += '<table width="100%" cellpadding="0" cellspacing="0">'
	tableCode += '<tr><td><img border="0" src="'
	tableCode +=  strForumSkin + 'misc_rating5.gif">'
	tableCode += '</td><td align="right" class="SmallTxt"> Sehr guter Beitrag'
	tableCode += '<input type="radio" class="RadButton" name="RateVal" checked value="5">'
	tableCode += '</td></tr>'
	tableCode += '<tr><td><img border="0" src="'
	tableCode +=  strForumSkin + 'misc_rating4.gif">'
	tableCode += '</td><td align="right" class="SmallTxt"><nobr> Guter Beitrag'
	tableCode += '<input type="radio" name="RateVal" value="4">'
	tableCode += '</nobr></td></tr>'
	tableCode += '<tr><td><img border="0" src="'
	tableCode +=  strForumSkin + 'misc_rating3.gif">'
	tableCode += '</td><td align="right" class="SmallTxt"><nobr> Durchschnittlicher Beitrag'
	tableCode += '<input type="radio" name="RateVal" value="3">'
	tableCode += '</nobr></td></tr>'
	tableCode += '<tr><td><img border="0" src="'
	tableCode +=  strForumSkin + 'misc_rating2.gif">'
	tableCode += '</td><td align="right" class="SmallTxt"><nobr> Schlechter Beitrag'
	tableCode += '<input type="radio" name="RateVal" value="2">'
	tableCode += '</nobr></td></tr>'
	tableCode += '<tr><td><img border="0" src="'
	tableCode +=  strForumSkin + 'misc_rating1.gif">'
	tableCode += '</td><td align="right" class="SmallTxt" ><nobr> Sehr schlechter Beitrag'
	tableCode += '<input type="radio" name="RateVal" text="test" value="1">'
	tableCode += '</nobr></td></tr>'
	tableCode += '</table></td></tr>'
	tableCode += '<tr><td align="center" class="ForumsBody1">'
	tableCode += '<input type="submit" class="FormButton" value="Bewerten"></td></tr>'
	tableCode += '</table>'
	tableCode += '</td></tr>'
	tableCode += '</table></form>';			
	return tableCode;

}

/* ----------------------------------------------------------- */
// Helper funtion returns a query string value for the drop down menus
/* ----------------------------------------------------------- */

function if_getQueryStringParameter(queryString, parameterName) {

	var parameterName = parameterName + "="; 
	queryString = queryString + "";
	queryString = queryString.toLowerCase();
	
	if (queryString.length > 0) {

		begin = queryString.indexOf(parameterName); 
	
			if (begin != -1) { 
				begin += parameterName.length; 
				end = queryString.indexOf("&", begin);
				if (end == -1) {end = queryString.length;}
				return unescape(queryString.substring(begin, end));
			}
			
	return "1"; 
	
	} 
	
}

//-->