

















          
                    
          
                    
          
                    
             
                     
          
                    
          
                    
          
                    
          
                    
          
                    
          
                    
          
                    
          
                    
           
                    

                    
           
                    
           
                    
          
                    
 
function setFormFieldNamesInSequence(formObj){ 
        var hiddenElem = document.getElementById('MAINTAINED_ORDERED_FORM_FIELDS'); 
        if(hiddenElem == null){                         
                //get the field one by one 
                //and append separated by comma 
                var length = formObj.length; 
                var name = ""; 
        var previousElemName = ""; 
                var once = true; 
                for(var i=0 ; i< length;i++){ 
                        var elemName = formObj.elements[i].name; 
                        if(elemName != previousElemName){ 
                        if(once){ 
                        name = name + elemName ; 
                        once = false; 
                } 
                else{ 
                        name = name +","+elemName ; //separated by comma 
                } 
                        } 
                previousElemName = elemName; 
                }//for 

                //define a new input hidden element 
                var inputElement   = document.createElement("input"); 
                inputElement.type  = "hidden" ; 
                inputElement.name  = "MAINTAINED_ORDERED_FORM_FIELDS"; 
                inputElement.id    = "MAINTAINED_ORDERED_FORM_FIELDS"; 
                inputElement.value = name; //put the value 
                formObj.appendChild(inputElement) ;  //add to the form dynamically 
                //alert(inputElement.value); 
        } 
} 


function checkRequired(){
 var fieldNames = new Array();
 var fieldLabels = new Array();
 var checkRadioNames = new Array();
 var checkRadioLabels = new Array();

 if(!customStateCheck()){
    return false;
 }
 
 if(!customEmailCheck()){
    return false;
 }

 setFormFieldNamesInSequence(document.getElementById("Isotec_Student_Sponsorship"));

 for(var i=0; i<checkRadioNames.length; i++){
    var el = document.getElementById("Isotec_Student_Sponsorship")[checkRadioNames[i]];
    var other = document.getElementById("Isotec_Student_Sponsorship")[checkRadioNames[i]+'_other'];
    var foundChecked = false;
    
    if(el != undefined && el.checked == false && other == undefined) {
	alert(checkedRadioLabels[i] + " is required.");
        return false;
    }
    else if ((el != undefined && el.checked) || (other != undefined && other.value.length > 0)) {
        foundChecked = true;
    }
    else{
        
        for(var j=0; j<el!=undefined && j<el.length; j++){
            if(el[j].checked == true ){
                foundChecked = true;
            } else {
		var o = document.getElementById("Isotec_Student_Sponsorship")[el[j].name+'_other'];
		if (o != null && o.value.length>0) {
			foundChecked = true;
		}
	    }
        }
        
    }
    if(foundChecked == false){
            alert(checkRadioLabels[i] + ' is required.');
            return false;
        }

 }

 for(var i=0; i<fieldNames.length; i++){
    if(document.getElementById("Isotec_Student_Sponsorship")[fieldNames[i]].value == ""){
        alert(fieldLabels[i] + " is required.");
        return false;
    }
 
 }
 
 
 document.getElementById("Isotec_Student_Sponsorship").submit();
}

function customStateCheck(){

    if(document.getElementById("Isotec_Student_Sponsorship")['country_haht'] != null && document.getElementById("Isotec_Student_Sponsorship")['country_haht'].value == 'US'){
    
        if(document.getElementById("Isotec_Student_Sponsorship")['state_haht'] != null && document.getElementById("Isotec_Student_Sponsorship")['state_haht'].value == ''){
            alert("You must select a state.");
            return false;        
        }
    
    
    } 
    
    if(document.getElementById("Isotec_Student_Sponsorship")['state_haht'] != null && document.getElementById("Isotec_Student_Sponsorship")['state_haht'].value != ''){
    
        if(document.getElementById("Isotec_Student_Sponsorship")['province_haht'] != null && document.getElementById("Isotec_Student_Sponsorship")['province_haht'].value != ''){
            alert("You must only choose a state or a province, not both.");
            return false;
        }
    
    }
    return true;
}

function customEmailCheck() {
    if(document.getElementById("Isotec_Student_Sponsorship")['e_mail_address_haht'] != null && document.getElementById("Isotec_Student_Sponsorship")['e_mail_address_haht'].value != ''){
 	if (!document.getElementById("Isotec_Student_Sponsorship")['e_mail_address_haht'].value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.int)|(\.org)|(\.biz)|(\.info)|(\.name)|(\..{2,2}))$)\b/gi)) {
        	alert(" Please enter a valid e-mail address.");
		return false;
	}
    }
    return true;
}

document.write('<form name="Isotec_Student_Sponsorship" id="Isotec_Student_Sponsorship" method="post" action="/webapp/wcs/stores/servlet/FormProcess?storeId=11001&langId=-1 ">'+'<table cellpadding=0 cellspacing=0>'+'<tr><td colspan="2"><hr style="width: 600px;"/></td></tr>'+'<tr><td colspan="2"><div class="formSpacer">&nbsp;</div></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Name"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Student Name :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Name" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Address"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Address :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Address" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_City"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">City :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_City" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_State"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">State :</td></tr></table></label></td><td class="rightFormCol"><select name="IsotecSS_Student_State" class="SigmaFormsAnswer">"<option value="" >AL</option><option value="" >AK</option><option value="" >AZ</option><option value="" >AR</option><option value="" >CA</option><option value="" >CO</option><option value="" >CT</option><option value="" >DE</option><option value="" >DC</option><option value="" >FL</option><option value="" >GA</option><option value="" >HI</option><option value="" >ID</option><option value="" >IL</option><option value="" >IN</option><option value="" >IA</option><option value="" >KS</option><option value="" >KY</option><option value="" >LA</option><option value="" >ME</option><option value="" >MD</option><option value="" >MA</option><option value="" >MI</option><option value="" >MN</option><option value="" >MS</option><option value="" >MO</option><option value="" >MT</option><option value="" >NE</option><option value="" >NV</option><option value="" >NH</option><option value="" >NJ</option><option value="" >NM</option><option value="" >NY</option><option value="" >NC</option><option value="" >ND</option><option value="" >OH</option><option value="" >OK</option><option value="" >OR</option><option value="" >PA</option><option value="" >RI</option><option value="" >SC</option><option value="" >SD</option><option value="" >TN</option><option value="" >TX</option><option value="" >UT</option><option value="" >VT</option><option value="" >VA</option><option value="" >WA</option><option value="" >WV</option><option value="" >WI</option><option value="" >WY</option></select></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Zip_Code"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Zip Code :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Zip_Code" maxlength="10" size="10" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Country"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Country :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Country" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Phone"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Phone :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Phone" maxlength="20" size="20" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Student_Email_Address"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Email Address :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Student_Email_Address" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_University"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">University :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_University" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Faculty_Advisor_Name"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Faculty Advisor Name :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Faculty_Advisor_Name" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Faculty_Advisor_Phone"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Faculty Advisor Phone :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Faculty_Advisor_Phone" maxlength="20" size="20" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Faculty_Advisor_Email_Address"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Faculty Advisor Email Address :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Faculty_Advisor_Email_Address" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Current_Research_Topic"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Current Research Topic :</td></tr></table></label></td><td class="rightFormCol"><textarea cols="50" rows="5" name="IsotecSS_Current_Research_Topic" class="SigmaFormsAnswer"></textarea></td></tr><tr><td valign="top" class="leftFormCol"><label><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Are Stable Isotope Products Used in       Your Research?</td></tr></table></label></td><td class="rightFormCol"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%" valign="top"><table cellpadding="0" cellspacing="0"><tr><td valign="top"><input class="SigmaFormsAnswer" type="checkbox" name="IsotecSS_Stable_Isotopes_Used_in_Research" value="3" /></td><td valign="top"><label class="SigmaFormsAnswer">Yes</label></td></tr></table></td></tr><tr><td width="100%" valign="top"><table cellpadding="0" cellspacing="0"><tr><td valign="top"><input class="SigmaFormsAnswer" type="checkbox" name="IsotecSS_Stable_Isotopes_Used_in_Research" value="3" /></td><td valign="top"><label class="SigmaFormsAnswer">No</label></td></tr></table></td></tr></table></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Which_Products"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">If Yes, Which Products?</td></tr></table></label></td><td class="rightFormCol"><textarea cols="50" rows="5" name="IsotecSS_Which_Products" class="SigmaFormsAnswer"></textarea></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Brief_Description_of_Research"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">A Brief Description of Research :</td></tr></table></label></td><td class="rightFormCol"><textarea cols="50" rows="5" name="IsotecSS_Brief_Description_of_Research" class="SigmaFormsAnswer"></textarea></td></tr><tr><td valign="top" class="leftFormCol"><label for="IsotecSS_Name_of_Technical_Conference"><table cellpadding="0" cellspacing="0" class="SigmaFormsQuestion"><tr><td valign="top"><img src="/images/required_space.gif" width="12" height="9"/></td><td valign="top">Name of Technical Conference :</td></tr></table></label></td><td class="rightFormCol"><input type="text" name="IsotecSS_Name_of_Technical_Conference" maxlength="50" size="40" class="SigmaFormsAnswer" value=""/></td></tr><tr><td colspan="2" class="formsubmit"><input type="button" value="Submit" onclick="javascript:checkRequired();"/></td></tr></table>'+'<input type="hidden" name="user_formid" value="">'+'<input type="hidden" name="email_sendto" value="erich.wudke@sial.com,ben.egleston@sial.com">'+'<input type="hidden" name="url_location" value="/chemistry.html">'+'<input type="hidden" name="egform_name" value="Isotec_Student_Sponsorship">'+'<input type="hidden" name="haht_form_name" value="Isotec_Student_Sponsorship">'+'<input type="hidden" name="page_link" value="http://www.sigmaaldrich.com:4402/chemistry/stable-isotopes-isotec/learning-center/student-application.MainParsys.26607.formInclude.js">'+'<input type="hidden" name="referr_page" value="null">'+'<input type="hidden" name="thank_you_text" value=""></form>');
   