
function toggleTextOut(e,txtval){if(e.value=="")e.value=txtval;}
function toggleTextIn(e,txtval){if(e.value==txtval)e.value="";else e.select();}
function trimAll(sString){while(sString.substring(0,1)==' '){sString=sString.substring(1,sString.length);}
while(sString.substring(sString.length-1,sString.length)==' '){sString=sString.substring(0,sString.length-1);}
return sString;}
$(document).ready(function(){$(".swap").hover(function(){if($(this).attr("src").indexOf("-on")==-1){var newSrc=$(this).attr("src").replace(".gif","-on.gif");$(this).attr("src",newSrc);}},function(){if($(this).attr("src").indexOf(".gif")!=-1){var oldSrc=$(this).attr("src").replace("-on.gif",".gif");$(this).attr("src",oldSrc);}});$("#breadcrumb").find("a").each(function(){$("#navigation").find("a[href='"+this.href+"']").parent("li").addClass("current");$("#navigation").find("a[href='"+this.href+"']").find("img").trigger("mouseover");$("#navigation").find("a[href='"+this.href+"']").find("img").removeAttr("onmouseout");});$("#navigation li:not(.current) ul").hide();$("#wrap_heardOfACSOther").attr("style","display:none");$('#breadcrumb a:last').addClass('last');$(".event-desc").bind("mouseout",function(event){event.stopPropagation();});});function spamFreeEmailLink(user,domain,tag){if(tag){document.write('<a  target="_blank" href="'+'mailto:'+user+'@'+domain+'">'+user+'@'+domain+'</a>');}else{document.write(user+'@'+domain);}}
function AllowOnly(e,type,allow_space){if(allow_space==null)allow_space=false;else allow_space=true;if(e.charCode==0)return true;var unicode=e.charCode?e.charCode:e.keyCode;if(unicode==13)return true;if(allow_space&unicode==32)
return true;switch(type)
{case'NUM_ONLY':if(unicode<48||unicode>57)return false;else return true;case'MOBILE_NUM_ONLY':if(unicode<39||unicode>57)return false;else return true;case'ALPHA_ONLY':if(unicode<65||unicode>90)
if(!(unicode>=97&&unicode<=122))
return false;else
return true;case'ALPHA_NUM_ONLY':if(unicode>=65&&unicode<=90)
return true;if(unicode>=97&&unicode<=120)
return true;if(unicode>=48&&unicode<=57)
return true;else
return false;}}
function searchboxValidate(msg){sb=document.getElementById('txtSearch').value;if(sb==msg||sb==""){document.getElementById('txtSearch').value=msg;document.getElementById('txtSearch').focus();return false;}
return true;}
function GetData(id){var content=document.getElementById(id);if(content==null)
return("");return(content.innerHTML);}
function Print(printPage,id,title){if(title=='')
title=document.title;var url=printPage+"?id="+id+"&amp;title="+title
var p=window.open(url,"print","width=570, height=600, left=100, top=100, location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no, fullscreen=no");}
function showEventPopUp(){$("a.link").mouseover(function(e){var offset=$("#quickCalender").offset();var popHeight=$(this).next("div").css("height");var x=e.pageX-offset.left-53;popHeight=parseInt(popHeight)-35;var y=e.pageY-offset.top-popHeight;$(this).next("div").css({left:x+"px",top:y+"px",postion:"absolute"});$(this).next("div").show();});$("html").bind("mouseout",function(event){$('.event-desc').hover(function(){},function(){$(this).hide();});event.stopPropagation();});}
function ifLicense(val){if(val=='Yes'){$("#group_licenseDateOfExpiry").css("display","");}else{$("#group_licenseDateOfExpiry").css("display","none");}}
function ifMarried(val){if(val=='Married'){$("#spouse-details").css("display","");}else{$("#spouse-details").css("display","none");}}
function ifOther(val){if(val=='Other'){$("#wrap_heardOfACSOther").css("display","");}else{$("#wrap_heardOfACSOther").css("display","none");}}
function getFields(val){var htmlContent='';for(i=1;i<=val;i++)
{$(".wrapElement"+i).css("display","");$("#child-details"+i).css("display","");}}