//Function to jump to another forum
function ForumJump(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}


//Function to open preview post window
function OpenPreviewWindow(targetPage, formName){
	
	now = new Date  
	
	//Open the window first 	
   	openWin('','preview','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=400')
   		
   	//Now submit form to the new window
   	formName.action = targetPage + "?ID=" + now.getTime();	
	formName.target = "preview";
	formName.submit();
}
function toggleMenu(id) {


 /* And, hide all "on" state tabs */
 document.getElementById('nav_patronen').src='/images/nav_patronen.jpg'; 
 document.getElementById('nav_winkel').src='/images/nav_winkel.jpg';
 document.getElementById('nav_home').src='/images/nav_home.jpg';
 document.getElementById('nav_forum').src='/images/nav_forum.jpg';



 /* If there is an "on" state tab, display it */
 if (id != 'null') {

	  var currImgId = 'nav_'+id;

	  var newImgSrc = '/images/' + currImgId+'over.jpg';
	  var x = document.getElementById(currImgId).src;
	  document.getElementById(currImgId).src=newImgSrc;
 }
 
  if (currentTopMenu.length > 0) {
	  var currImgId = 'nav_'+currentTopMenu;
	  var newImgSrc = '/images/' + currImgId+'over.jpg';
	  var x = document.getElementById(currImgId).src;
	  document.getElementById(currImgId).src=newImgSrc;
 }
 
}
