function dimTitle() { Effect.Fade('site_title_box', {from:1, to:0.2, duration:0.2}); } function liteTitle() { Effect.Appear('site_title_box', {duration:0.2}); } function dimBlog() { if ($("forum_box")) Effect.Fade('forum_box', {from:1, to:0.2, duration:0.2}); Effect.Fade('forum', {from:1, to:0.2, duration:0.2}); } function liteBlog() { Effect.Appear('forum_box', {duration:0.2}); Effect.Appear('forum', {duration:0.2}); } function dimPhoto() { Effect.Fade('photo_box', {from:1, to:0.2, duration:0.2}); } function litePhoto(noPhotoandAdmin) { Effect.Appear('photo_box', {duration:0.2}); } function dimStory() { Effect.Fade('storyEdit', {from:1, to:0.2, duration:0.2}); Effect.Fade('storyLink', {from:1, to:0.2, duration:0.2}); Effect.Fade('storyTemp', {from:1, to:0.2, duration:0.2}); Effect.Fade('story_box', {from:1, to:0.2, duration:0.2}); $('story').style.display='none'; } function liteStory() { Effect.Appear('storyLink', {duration:0.2}); Effect.Appear('storyTemp', {duration:0.2}); Effect.Appear('storyEdit', {duration:0.2}); Effect.Appear('story_box', {duration:0.2}); $('story').style.display='none'; } function editBlog() { dimRightSidebar(); dimLeftSidebar(); dimTitleBox(); dimPhoto(); dimStory(); } function showBlog() { liteRightSidebar(); liteLeftSidebar(); liteTitleBox(); litePhoto(); liteStory(); } function editStory() { dimTitle(); dimRightSidebar(); dimLeftSidebar(); dimBlog(); dimPhoto(); $('storyEdit').style.display='none'; $('storyTemp').style.display='none'; $('storyLink').style.display='none'; $('story').style.display=''; //show the editor //document.storyForm.storyTxt.focus(); //set focus to editor (gh cant make this work) Effect.Appear('story', {duration:0.2}); } function showStory() { liteTitle(); liteRightSidebar(); liteLeftSidebar(); liteBlog(); litePhoto(); liteStory(); $('storyEdit').style.display=''; $('storyTemp').style.display=''; $('storyLink').style.display=''; $('story').style.display='none'; //hide the editor } function editPhoto() { dimTitle(); dimStory(); dimRightSidebar(); dimLeftSidebar(); dimBlog(); if ($("photoEdit")) {$('photoEdit').style.display='none';} //may not exist if not admin or picture exists $("photoValidate").innerHTML = ""; $('photoDiv').style.display=''; //show the editor } function showPhoto() { liteTitle(); liteStory(); liteRightSidebar(); liteLeftSidebar(); liteBlog(); if ($("photoEdit")) {$('photoEdit').style.display='';} //may not exist if not admin or picture exists $('photoDiv').style.display='none'; //hide the editor } // Toggle home page edit blocks for adding a blog entry function toggleAdd() { target = $("addDiv"); if (target.style.display == "") { target.style.display = "none"; $("forum").style.display = ""; enableButton($('blogAddButton')); liteTitle(); litePhoto(); liteStory(); liteRightSidebar(); liteLeftSidebar(); } else { $("forum").style.display = "none"; disableButton($('blogAddButton')); target.style.display = ""; document.entryForm.subject.focus(); dimTitle(); dimPhoto(); dimStory(); dimRightSidebar(); dimLeftSidebar(); } } //10/31/07 [PMC] on this function we will make the validations after submit the story function isFieldOKIndex(){ var errs = 0; // let's clear any existing messages $("storyValidate").innerHTML=""; // validate fields if (!validateField($('story1'), 'storyValidate', 'nonnull', 'Please enter a story.')) errs += 1; if (errs >= 1) { return false;} return true; } function dimBackdrop() { Effect.Fade("backdrop", {from:1, to:0.2, duration:0.2}); } function liteBackdrop() { Effect.Appear("backdrop", {duration:0.2}); } function dimRightSidebar() { Effect.Fade('info_box', {from:1, to:0.2, duration:0.2}); Effect.Fade('ad_box', {from:1, to:0.2, duration:0.2}); } function liteRightSidebar() { Effect.Appear('info_box', {duration:0.2}); Effect.Appear('ad_box', {duration:0.2}); } function dimLeftSidebar() { Effect.Fade('left-sidebar', {from:1, to:0.2, duration:0.2}); } function liteLeftSidebar() { Effect.Appear('left-sidebar', {duration:0.2}); } function disableButton($button) { $button.disabled = true; } function enableButton($button) { $button.disabled = false; } function showButton($button) { $button.style.display = ""; } function hideButton($button) { $button.style.display = "none"; } function showVideo(request) { showOverlay(500, 400, request.responseText); } function doRefresh() { location.href = location.href; } function hidePopup() { $('userPopup').style.display = "none"; liteRightSidebar(); liteLeftSidebar(); } function displayUserInfo(request) { dimRightSidebar(); dimLeftSidebar(); $('userBody').innerHTML = request.responseText; $('userPopup').style.display = ""; $('userPopup').style.position = "absolute"; //make it so the dialog floats in the viewport not page $('userPopup').style.top = 100; //top offset in viewport $('userPopup').style.left = 200; //left offset in viewport } function blausen(subtopicSelection) { URL = webroot + "/human-atlas/clientNF.html"; id = "videoWindow"; topicSelection = "humanALL"; basefolder=topicSelection; topicMyDoc=topicSelection; subtopicMyDoc=subtopicSelection; w = "330"; h = "440"; scrol = "0"; L = "360"; T = "10"; eval("page" + id + " = window.open(URL, '" + id + basefolder + "', 'toolbar=0,scrollbars='+scrol+',location=0,status=1,menubar=0,resizable=0,width='+w+',height='+h+',screenX='+L+',screenY='+T+',left = '+L+',top = '+T+' ');pagevideoWindow.focus();"); }