var navigationContentID='';

function ShowMeContent(link) {
	
	content=$(navigationContentID);
	if (content) {
		showHover();
		var myAjax = new Ajax.Request(
				link,
				{method: 'post', onComplete: LoadContent}
		);
	}
}

function LoadContent(originalRequest) {
		text=originalRequest.responseText;
		$(navigationContentID).innerHTML=text;
		
		var cartreplace='';
		cartreplace=$('cartreplace').value;
		if ((cartreplace!=0)||(cartreplace!='')) cartreplace='('+cartreplace+')'; else cartreplace='';
		$('cartcount_id').innerHTML=cartreplace;
		
	}
	
function showHover() {
	if (!$(navigationContentID)) return false;
	/*var hover = document.createElement('div');
	hover.setStyle({
		//width: $(navigationContentID).getWidth()+'px',
		//height: $(navigationContentID).getHeight()+'px',
		backgroundColor: "#000",
		opacity: 0.4,
		background: "#C0C0C0 url(images/loading.gif) center center no-repeat",
		position: 'absolute',
		marginTop: '-'+$(navigationContentID).getHeight()+'px'
	});
	$(navigationContentID).appendChild(hover);*/
}
	
function FLSearch(search) {

	ShowMeContent(fl_link+'&search='+search);
	
}

function EnableRegMember(enable) {
	//alert('test');
	if (!enable) {
		if ($('flogpass')) $('flogpass').style.display='none';
		if ($('fcomment')) $('fcomment').style.display='block';
	} else {
		if ($('flogpass')) $('flogpass').style.display='block';
		if ($('fcomment')) $('fcomment').style.display='none';
	}
	
	
}


function echoInfo() {

}

function isAdmin() {
	var search = document.cookie.search('admin=of_course');
	if (search > 0) return true;
	return false;
}