function close_registration_popup_overlay(pid){hide_overlay();setTimeout(function(){close_popup_registration(pid)},700)}function close_popup_registration(pid){var dive=document.getElementById('registration_panel_popup_'+pid);dive.style.display='none';document.getElementById('all_classes_'+pid).style.display='none';hide_overlay()}function register_for_course(product_id,type_id){go_to_top();new Ajax.Updater('available_classes_for_this_product','/product/get_available_schedules?pid='+product_id+'&type='+type_id,{asynchronous:false,evalScripts:true,onComplete:function(){document.getElementById('busy_indicator').style.display='none';show_overlay();var dive=document.getElementById('registration_panel_popup_'+product_id);dive.style.display='block';document.getElementById('all_classes_'+product_id).style.display='block'}})}function add_loading_msg_on_links(container){var con=document.getElementById(container);if(con){var tags=con.getElementsByTagName('a');for(var i=0;i<tags.length;i++){if(tags[i].onclick==undefined){tags[i].onclick=function(){show_loading("")}}else{tags[i].onmouseup=function(){show_loading("Please wait")}}}}}function show_overlay(){document.getElementById('overlay').style.display='block'}function hide_overlay(){new Effect.toggle('overlay','appear')}function showOrHideAllDropDownsDiv(display){var elements=document.documentElement.getElementsByTagName('select');for(var i=0;i<elements.length;i++){elements[i].parentNode.style.display=display}}function show_alert(msg,heading){document.getElementById('popup_heading_text').innerHTML=heading;document.getElementById('popup_message').innerHTML=msg;show_overlay();document.getElementById('popup').style.display='block'}function popclose(){hide_overlay();document.getElementById('popup').style.display='none'}