var ignore;var m_names=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");function fmaxlength(textval,mlength,elname) {var textvallength=textval.length;mlength=mlength-1;if(textvallength>mlength) {elname.value=elname.value.substr(0,mlength);}}function urlencode(s){s=encodeURIComponent(s);return s.replace(/~/g,'%7E').replace(/%20/g,'+');}function val_url(tval,elname){elname.value="";var ill=/\W/;for(ctr=0;ctr<=tval.length;ctr=ctr+1){chr=tval.charAt(ctr);if(!ill.test(chr)){elname.value=elname.value+chr;}}}function onKeyPressBlockNumbers(e) {var key=window.event?e.keyCode:e.which;var keychar=String.fromCharCode(key);reg=/\w/;return reg.test(keychar);}function check_email(input){error="";var emailFilter=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!(emailFilter.test(input))){error="Please enter a valid email address.\n";}if(error){return false;}else{return true;}}function ChangeColor(tableRow,highLight) {if(highLight) {tableRow.style.backgroundColor='#dcfac9';}else {tableRow.style.backgroundColor='white';}}function rate(rating,app,hover){if(hover==2){rating=current_rating;}else if(!hover){current_rating=rating;do_rate(rating,app);}if(document.getElementById){document.getElementById('rating_div').className="rating rated_"+rating;}else{document.all.rating_div.className="rating rated_"+rating;}}var imgTimeOut;function show_img(what){document.getElementById('imgfloatdiv').style.display="";document.getElementById(what).style.display="";clearTimeout(imgTimeOut);imgTimeOut=setTimeout("hide_img()",5000);}function hide_img(){document.getElementById('imgfloatdiv').style.display="none";document.getElementById('app').style.display="none";document.getElementById('apps').style.display="none";document.getElementById('apply').style.display="none";}function f_clientWidth(){return f_filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0);}function f_clientHeight(){return f_filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0);}function f_scrollLeft(){return f_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0);}function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}function f_filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel))){n_result=n_docel;}return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}function check_return(e){var target=e.target?e.target:e.srcElement;var keyCode=e.keyCode?e.keyCode:e.which;if(keyCode==13&&(!target.type||(target.type!='textarea'))){event.returnValue=false;event.cancel=true;do_submit();}else if(keyCode==220){event.returnValue=false;event.cancel=true;}}function isAlphanumeric(val){var test=/^[0-9a-zA-Z]+$/;if(val.match(test)){return true;}else{return false;}}function countSelected(what,maxNumber){var obj=document.subm_form.elements["subcats[]"];for(var i=0;imaxNumber){var throwAlert=true;var toremove=selectedOptions.shift();obj[toremove].checked=false;}}}function sel(what){var nr=0;var maxnr=2;for(var i=0;imaxnr){alert('you have selected '+nr+' options'+what.value);return false;}}var selectedOptions=[];function strip_tags(str,allowed_tags){var key='',allowed=false;var matches=[];var allowed_array=[];var allowed_tag='';var i=0;var k='';var html='';var replacer=function(search,replace,str){return str.split(search).join(replace);};if(allowed_tags){allowed_array=allowed_tags.match(/([a-zA-Z]+)/gi);}str+='';matches=str.match(/(<\/?[^>]+>)/gi);for(key in matches){if(isNaN(key)){continue;}html=matches[key].toString();allowed=false;for(k in allowed_array){allowed_tag=allowed_array[k];i=-1;if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+'>');}if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+' ');}if(i!=0){i=html.toLowerCase().indexOf('<'+'/'+allowed_tag);}if(i==0){allowed=true;break;}}if(!allowed){str=replacer(html,"",str);}}return str;}function set_xml(){if(window.XMLHttpRequest){var s_xmlhttp=new XMLHttpRequest();}else if(window.ActiveXObject){var s_xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}return s_xmlhttp;}function check_pub_prof(what,user){hide_divs();if(what.checked){function state_Change(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){switch(xmlhttp.responseText){case"SLOW":case"INVALID":alert("An unusual error has occured. Please refresh the page and try again.");break;case"ok":loadimg.style.display="none";placeholder.style.display="";document.getElementById('pub_prof').style.display="";break;case"no_pub_prof":case"pub_cont":case"pub_vis":loadimg.style.display="none";document.subm_form.public.checked=false;document.getElementById(xmlhttp.responseText).style.display="";break;default:alert("Apologies, there was an unusual error. Please refresh the page and try again. If this persists, please send this info to crewspace: "+xmlhttp.responseText);loadimg.style.display="none";document.subm_form.public.checked=false;document.getElementById(xmlhttp.responseText).style.display="";break;}}else{alert("Problem saving data, please try again, or \"Report an Issue\" below ");}loadimg.style.display="none";placeholder.style.display="";}}var loadimg=document.getElementById('loadimg');var placeholder=document.getElementById('placeholder');placeholder.style.display="none";loadimg.style.display="";var xmlhttp=set_xml();if(xmlhttp!=null){var params="u="+user;xmlhttp.onreadystatechange=state_Change;xmlhttp.open("POST",check_url,true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.setRequestHeader("Content-length",params.length);xmlhttp.setRequestHeader("Connection","close");xmlhttp.send(params);}else{alert("Your browser does not support XMLHTTP. Download Firefox or Safari.");loadimg.style.display="none";placeholder.style.display="";}}}function hide_divs(){document.getElementById('no_pub_prof').style.display="none";document.getElementById('pub_vis').style.display="none";document.getElementById('pub_cont').style.display="none";}function populate_day(what){var days=31;var day_obj=document.subm_form.elements[what+"_day"];var month_obj=document.subm_form.elements[what+"_month"];var selected_day=day_obj.value;switch(1*month_obj.value){case 1:case 3:case 5:case 7:case 8:case 10:case 12:days=31;break;case 4:case 6:case 9:case 11:days=30;break;case 2:var leap=(document.subm_form.elements[what+"_year"].value/4);if(Math.ceil(leap)==Math.floor(leap)){days=29;}else{days=28;}break;default:break;}day_obj.options.length=0;for(i=1;i<=days;i++){createOption(day_obj,i,i,(selected_day==i?1:0));}}function createOption(obj,value,inner,issel){var option=document.createElement("option");if(value<10){value="0"+value;}option.value=value;option.innerHTML=inner;if(issel){option.selected="selected";}obj.appendChild(option);}function swap_avail(what){var formEl=document.subm_form;if(what.checked){document.getElementById('avail_divs').style.display="none";}else{document.getElementById('avail_divs').style.display="";}}function do_submit_edit(){var formEl=document.subm_form;if(formEl.name.value.length<2){formEl.name.focus();alert("Please enter your name.");}else if(formEl.year.value.length<2){formEl.year.focus();alert("Please enter the year you started professionally.");}else if(formEl.main.value.length<2){formEl.main.focus();alert("Please enter your main job.");}else if(!formEl.country.value){formEl.country.focus();alert("Please say what country you are based in.");}else if((formEl.country.value=="United States"||formEl.country.value=="Canada")&&!formEl.state.value){formEl.state.focus();alert("Please say what state / province you are based in.");}else if(!formEl.city.value){formEl.city.focus();alert("Please say what city you are based in.");}else if(!formEl.pass.value){formEl.pass.focus();alert("Please say whether you have a valid passport.");}else if(!formEl.int_exp.value){formEl.int_exp.focus();alert("Please say whether you have had international touring experience.");}else if(!formEl.unavail.checked&&check_dates()){}else if(!formEl.maincat.value){formEl.maincat.focus();alert("Please select your main category");}else{formEl.submit();}}function check_dates(){var formEl=document.subm_form;for(i=0;i100){ignore=1;}}else if(to100){ignore=1;}if(!formEl.ignore_avail.checked&&new Date(formEl.start.value)new Date(formEl.end.value)){formEl.end.focus();alert("End of availability must be after the start!");}else{formEl.submit();}}function sel_states(cntry,obj){if(cntry=="Canada"){obj.options.length=0;obj.disabled=false;obj.options[0]=new Option("Select a Province","",true,false);obj.options[1]=new Option("Alberta","Alberta",false,false);obj.options[2]=new Option("British Columbia","British Columbia",false,false);obj.options[3]=new Option("Manitoba","Manitoba",false,false);obj.options[4]=new Option("New Brunswick","New Brunswick",false,false);obj.options[5]=new Option("Newfoundland and Labrador","Newfoundland and Labrador",false,false);obj.options[6]=new Option("Northwest Territories","Northwest Territories",false,false);obj.options[7]=new Option("Nova Scotia","Nova Scotia",false,false);obj.options[8]=new Option("Ontario","Ontario",false,false);obj.options[9]=new Option("Prince Edward Island","Prince Edward Island",false,false);obj.options[10]=new Option("Quebec","Quebec",false,false);obj.options[11]=new Option("Saskatchewan","Saskatchewan",false,false);obj.options[12]=new Option("Yukon","Yukon",false,false);}else if(cntry=="United States"){obj.options.length=0;obj.disabled=false;obj.options[0]=new Option("Select a State","",true,false);obj.options[1]=new Option("Alabama","Alabama",false,false);obj.options[2]=new Option("Alaska","Alaska",false,false);obj.options[3]=new Option("Arizona","Arizona",false,false);obj.options[4]=new Option("Arkansas","Arkansas",false,false);obj.options[5]=new Option("California","California",false,false);obj.options[6]=new Option("Colorado","Colorado",false,false);obj.options[7]=new Option("Connecticut","Connecticut",false,false);obj.options[8]=new Option("Delaware","Delaware",false,false);obj.options[9]=new Option("District Of Columbia","District Of Columbia",false,false);obj.options[10]=new Option("Florida","Florida",false,false);obj.options[11]=new Option("Georgia","Georgia",false,false);obj.options[12]=new Option("Hawaii","Hawaii",false,false);obj.options[13]=new Option("Idaho","Idaho",false,false);obj.options[14]=new Option("Illinois","Illinois",false,false);obj.options[15]=new Option("Indiana","Indiana",false,false);obj.options[16]=new Option("Iowa","Iowa",false,false);obj.options[17]=new Option("Kansas","Kansas",false,false);obj.options[18]=new Option("Kentucky","Kentucky",false,false);obj.options[19]=new Option("Louisiana","Louisiana",false,false);obj.options[21]=new Option("Maine","Maine",false,false);obj.options[21]=new Option("Maryland","Maryland",false,false);obj.options[22]=new Option("Massachusetts","Massachusetts",false,false);obj.options[23]=new Option("Michigan","Michigan",false,false);obj.options[24]=new Option("Minnesota","Minnesota",false,false);obj.options[25]=new Option("Mississippi","Mississippi",false,false);obj.options[26]=new Option("Missouri","Missouri",false,false);obj.options[27]=new Option("Montana","Montana",false,false);obj.options[28]=new Option("Nebraska","Nebraska",false,false);obj.options[29]=new Option("Nevada","Nevada",false,false);obj.options[30]=new Option("New Hampshire","New Hampshire",false,false);obj.options[31]=new Option("New Jersey","New Jersey",false,false);obj.options[32]=new Option("New Mexico","New Mexico",false,false);obj.options[33]=new Option("New York","New York",false,false);obj.options[34]=new Option("North Carolina","North Carolina",false,false);obj.options[35]=new Option("North Dakota","North Dakota",false,false);obj.options[36]=new Option("Ohio","Ohio",false,false);obj.options[37]=new Option("Oklahoma","Oklahoma",false,false);obj.options[38]=new Option("Oregon","Oregon",false,false);obj.options[39]=new Option("Pennsylvania","Pennsylvania",false,false);obj.options[40]=new Option("Rhode Island","Rhode Island",false,false);obj.options[41]=new Option("South Carolina","South Carolina",false,false);obj.options[42]=new Option("South Dakota","South Dakota",false,false);obj.options[43]=new Option("Tennessee","Tennessee",false,false);obj.options[44]=new Option("Texas","Texas",false,false);obj.options[45]=new Option("Utah","Utah",false,false);obj.options[46]=new Option("Vermont","Vermont",false,false);obj.options[47]=new Option("Virginia","Virginia",false,false);obj.options[48]=new Option("Washington","Washington",false,false);obj.options[49]=new Option("West Virginia","West Virginia",false,false);obj.options[50]=new Option("Wisconsin","Wisconsin",false,false);obj.options[51]=new Option("Wyoming","Wyoming",false,false);}else{obj.options.length=0;obj.options[0]=new Option("(US & Canada)","",false,false);obj.disabled=true;}}function toggle(what){var obj=document.getElementById(what);var anch=document.getElementById('toggle');if(obj.style.display=="none"){obj.style.display="";anch.innerHTML="▼ Search options";}else{obj.style.display="none";anch.innerHTML='► Search options';}}function show_help(context){var head;var text;switch(context){case"avail":head="Availability";text=('

This is to let people know when you\'re available for hire.

'+'Click the calendar icons to enter the start and end dates of your peridods of availability. '+'Click the + and - symbols to add more rows.'+'

Keeping the Directory up to date

'+'It\'s very important that the Directory has accurate information, so you\'ll be sent a reminder once a week '+'with a link to confirm that your availability hasn\'t changed.

');break;case"pub":head="Why do I need a Public Profile?";text=('

Non-members can\'t see your Private Crewspace Profile.

'+'If you want the general public to be able to see your Directory listing, then they need to be able contact you with offers of work, right? '+'Then you need to set up your "Public Profile". This is a separate, simplified page based on your normal (private) Crewspace Profile.

'+'Here is an example of a "Public Profile" as seen by a non-member. Click "Contact Rob" if you want to see how it works.

'+'It\s very easy to create, and only takes a moment. If you want your Directory listing to be public then you need to make sure your "Public Profile":'+'

  • is visible to "Everyone"
  • has the "Contact" section shown.


'+'

Non-members can only contact you if the "Contact" section is shown on your "Public Profile", not directly, and only through heavy spam protection.

'+'Click here for more info, or contact crewspace if you need assistance.

');break;case"listpub":head="Why would I want to make my listing public??";text=('

By default your listing is only visible to Crewspace members.

'+'If you want non-members (e.g. management etc.) to be able to see your listing you have to make it Public.'+'Then you need to set up your "Public Profile". This is a separate, simplified page based on your normal (private) Crewspace Profile.

'+'Here is an example of a "Public Profile" as seen by a non-member. Click "Contact Rob" if you want to see how it works.

'+'It\s very easy to create, and only takes a moment. If you want your Directory listing to be public then you need to make sure your "Public Profile":'+'

  • is visible to "Everyone"
  • has the "Contact" section shown.


'+'

Non-members can only contact you if the "Contact" section is shown on your "Public Profile", not directly, and only through heavy spam protection.

'+'Click here for more info, or contact crewspace if you need assistance.

');break;default:break;}document.getElementById('help_head').innerHTML=head;document.getElementById('help_text').innerHTML=text+'

Close

';document.getElementById('help_div').style.display="";document.getElementById('xg_overlay').style.display="";}function hide_help(){document.getElementById('help_div').style.display="none";document.getElementById('xg_overlay').style.display="none";}function show_next_avail(what){if(1||start_array[what].value&&end_array[what].value){document.getElementById('more'+what).style.display="none";document.getElementById('less'+what).style.display="none";document.getElementById('pseudel'+what).style.display="";document.getElementById('avail_div'+(what+1)).style.display="";document.subm_form.no_of_avails.value++;}else{alert("Please fill in these dates first");}}function hide_next_avail(what){document.subm_form.no_of_avails.value--;document.getElementById('more'+(what-1)).style.display="";document.getElementById('less'+(what-1)).style.display="";document.getElementById('pseudel'+(what-1)).style.display="none";document.getElementById('avail_div'+(what-1)).style.display="";document.getElementById('avail_div'+what).style.display="none";}function pseudo_del(what){var avails=document.subm_form.no_of_avails.value;if(ignore>100){ignore=1;}for(i=what;i100){ingnore=1;}while(numZeropad.length100){ingnore=1;}