function sel(url){ var sel = $("input[name=sel]").val(); if(sel==""){ return false; } var url1=encodeURIComponent(url+"_s"+sel+".html"); window.location.href=/gcal/zcbgc/url1;/index.html }