var $j = jQuery.noConflict(); function crossfader() { //might be nice to rewrite this function so it uses prototype and scriptaculous //in line with the rest of the platform var useBSNns; if (useBSNns) { if (typeof(bsn) == "undefined") bsn = {} var _bsn = bsn; } else { var _bsn = this; } _bsn.Crossfader = function (divs, fadetime, delay ) { this.nAct = -1; this.aDivs = divs; for (var i=0;i -1) { document.getElementById( this.aDivs[this.nOldAct] ).style.opacity = 1 - op; document.getElementById( this.aDivs[this.nOldAct] ).style.filter = "alpha(opacity="+(100 - ieop)+")"; } if (this.nTime == this.nDur) { clearInterval( this.nID2 ); if (this.nOldAct > -1) document.getElementById( this.aDivs[this.nOldAct] ).style.visibility = "hidden"; var p=this; this.nID1 = setInterval(function() { p._newfade() }, this.nDelay); } } _bsn.Crossfader.prototype._easeInOut = function(t,b,c,d) { return c/2 * (1 - Math.cos(Math.PI*t/d)) + b; } } function imagefader() { //Put the Redirect forms into an array var form_id=new Array; if (document.getElementById('home_page_4')) { form_id[0]=document.getElementById('home_page_4'); } var cf = new Crossfader( new Array('cf1','cf2','cf3'), 1000, 5000 ); } function imagedisplay() { $('cf1').toggleClassName("displayimage"); $('cf2').toggleClassName("displayimage"); $('cf3').toggleClassName("displayimage"); } // this code print the text in search box function showHideTextInSearchbox() { var textToDisplay = "Search site"; // this test to be displayed if($('searchfield').value == "") $('searchfield').value = textToDisplay; $('searchfield').observe('click', function(event) { if(this.value == textToDisplay) // if user clicks on search box, default text will go { this.value = ""; } }); $('searchfield').observe('blur', function(event) { if(this.value == "") // if user clicks outside the search box, default text will reappear. { this.value = textToDisplay; } }); } // for hiding left menu document.observe("dom:loaded", function() { if($('menu').down("ul")) { $('contentarea').removeClassName('fwidth'); if($('headercontent')){ $('headercontent').removeClassName('fhtag'); } } else{ $('contentarea').addClassName('fwidth'); if($('headercontent')){ $('headercontent').addClassName('fhtag'); } } }); function miscellaneous(){ if(!!$('sp_registration_main') || !!$('sp_registration_email')){ $('country').selectedIndex='1'; $('preferredName').focus(); } if(!!$('sendactivationemail')){ $$('form#sendactivationemail label').each(Element.hide); } } function updateHeader(){ if(!!$$('div[id^="registration_"]')){ var par=get_param('action'); if(par=="reminder"){ $$("ul#breadcrumblinks>li>h1")[0].innerHTML="Change Password"; }else if(par=="logout"){ $$("ul#breadcrumblinks>li>h1")[0].innerHTML="Sign Out"; } } } function updateHeaderSignin(){ if(!!$('registration_login_form')){ $$("div#headercontent>h1")[0].innerHTML="Please sign in or register"; } } function updateSigninRedirectUrl(){ var formObs=[$('owa_signin_registration') ,$('owalogin_registration'),$('owa_minilogin_registration')]; if(!!$('owa_signin_registration') || !!$('owalogin_registration') || !!$('owa_minilogin_registration')){ formObs.each(function(frm){ var inp=frm.getInputs(); inp[0].focus(); frm.observe('submit',function(ev){ if(!ev.stopped){ev.stop();} inp[3].value+="&login="+inp[0].value+"&error=true"; frm.submit(); }); }); } } function equalHeight(group) { tallest = 0; group.each(function(c) { thisHeight = c.offsetHeight; if(thisHeight > tallest) { tallest = thisHeight; } }); group.invoke('setStyle', {height: tallest + 'px'}) } Event.observe(window, 'load', function() { equalHeight($$('.column_ht .intro')); }); $j(document).ready(function() { var errorText = $j.trim($j('#errordetails ul li').text()); if( errorText == "The Login and Email address already exists within the Cegedim OWA service. Please sign in or try a different Login and Email address"){ $j('#errordetails h3').hide(); } }); $j(document).ready(function() { var errorText1 = $j.trim($j('#errordetails ul li').text()); if( errorText1 == "This Login already exists within the Cegedim OWA service. Please try a different Login"){ $j('#errordetails h3').hide(); } }); $j(document).ready(function() { var errorText2 = $j.trim($j('#errordetails ul li').text()); if( errorText2 == "This email address already exists within the Cegedim OWA service. Please try a different email address"){ $j('#errordetails h3').hide(); } }); var toCall=new Array; toCall[0]=imagedisplay; toCall[1]=crossfader; toCall[2]=imagefader; toCall[3]=showHideTextInSearchbox; toCall[4]=equalHeight; toCall[5]=updateSigninRedirectUrl; toCall[6]=updateHeader; toCall[7]=miscellaneous; toCall[8]=updateHeaderSignin;