// group hide/show script ************************************************ var dhtmlgoodies_slideSpeed = 10; // Higher value = faster var dhtmlgoodies_timer = 10; // Lower value = faster var objectIdToSlideDown = false; var dhtmlgoodies_activeId = false; function showHideContent(e,inputId) { if(!inputId)inputId = this.id; inputId = inputId + ''; var numericId = inputId.replace(/[^0-9]/g,''); var answerDiv = document.getElementById('dhtmlgoodies_a' + numericId); objectIdToSlideDown = false; if(!answerDiv.style.display || answerDiv.style.display=='none'){ if(dhtmlgoodies_activeId && dhtmlgoodies_activeId!=numericId){ objectIdToSlideDown = numericId; slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_slideSpeed*-1)); }else{ answerDiv.style.display='block'; answerDiv.style.visibility = 'visible'; slideContent(numericId,dhtmlgoodies_slideSpeed); } }else{ slideContent(numericId,(dhtmlgoodies_slideSpeed*-1)); dhtmlgoodies_activeId = false; } } function slideContent(inputId,direction) { var obj =document.getElementById('dhtmlgoodies_a' + inputId); var contentObj = document.getElementById('dhtmlgoodies_ac' + inputId); height = obj.clientHeight; height = height + direction; rerunFunction = true; if(height>contentObj.offsetHeight){ height = contentObj.offsetHeight; rerunFunction = false; } if(height<=1){ height = 1; rerunFunction = false; } obj.style.height = height + 'px'; var topPos = height - contentObj.offsetHeight; if(topPos>0)topPos=0; contentObj.style.top = topPos + 'px'; if(rerunFunction){ setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer); }else{ if(height<=1){ obj.style.display='none'; if(objectIdToSlideDown && objectIdToSlideDown!=inputId){ document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.display='block'; document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible'; slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed); } }else{ dhtmlgoodies_activeId = inputId; } } } function initShowHideDivs() { var divs = document.getElementsByTagName('DIV'); var divCounter = 1; for(var no=0;no monthLength[month-1]) { alert(errmsg[lang][fieldname]); return false; } return true; } // form checks... function checkContactForm(frm) { lang=frm.Language.value; return checkString(frm.FirstName, lang) && checkString(frm.LastName, lang) && checkEmail(frm.Email, lang) && checkString(frm.Phone, lang) && checkString(frm.Message, lang); } function checkLeisure(frm) { lang=frm.Language.value; result= checkString(frm.FirstName, lang) && checkString(frm.LastName, lang) && checkEmail(frm.Email, lang) && checkString(frm.Phone, lang); result= result && checkSelect(frm.Birthdate_Day, lang) && checkSelect(frm.Birthdate_Month, lang) && checkSelect(frm.Birthdate_Year, lang); result= result && checkDate(frm.Birthdate_Day, frm.Birthdate_Month, frm.Birthdate_Year, "Birthdate", lang); return result; } function checkFlash(version) { var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } return MM_PluginVersion >= version; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { for(var i=7; i>0; i--) { flashVersion = 0; try{ var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i); flashVersion = i; return flashVersion>=version; } catch(e) { } } } return(false); } // ***************** ************** ***************** *******************