
//here you place the ids of every element you want.
var ids=new Array('post-entry','cforms');

function switchid(id){	
	hideallids();
	showdiv(id);
	document.getElementById('footer').style.bottom = 0;
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

$(document).ready(function(){
	
	var footerHeight = 0;

	$('#footer div.block').each(function(){
		if($(this).height() > footerHeight){
			footerHeight = $(this).height();
		}
	});

	$('#footer div.block').css({height: footerHeight});
	
	$('#primaryNav').superfish({ 
	    pathLevels:    1,                  // the number of levels of submenus that remain open or are restored using pathClass 
	    delay:         800,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing 
	    autoArrows:    false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
	    dropShadows:   false,               // completely disable drop shadows by setting this to false 
	    disableHI:     false              // set to true to disable hoverIntent detection 
	});
	$('#cforms a.back').prependTo('#cforms2form p.cf-sb');
	
});
