	function process_login(){
		var username = document.getElementById('logid');
		var password = document.getElementById('logpw');
		var smlogin = document.getElementById('smlogin');
		if(username.value == ''){
			alert('Error: User name can not be blank.  Please try again.');
			username.focus();
			return false;
		}
		if(password.value == ''){
			alert('Error: Password can not be blank.  Please try again.');
			password.focus();
			return false;
		}
		smlogin.submit();
	}
	
	function loginfail(){
		var username = document.getElementById('logid');
		username.focus();
	}
	
	function selproduct_onchange(){
		var selproduct = document.getElementById('selproduct');
		ifr.location.href = 'lookup_builds.asp?type=' + selproduct.value;	
	}
	
	function populate_build(str){
		if (str != ''){
			var temp_array = str.split("|");
			var selbuild = document.getElementById('selbuild');
			
			selbuild.options.length = 0;
			for (i=0;i<temp_array.length;i++){
				selbuild.options[i] = new Option(temp_array[i],temp_array[i]);
			}
		}
	}
	
	function changestate(mode,id){
		if(mode == 'on'){
			document.getElementById('menu'+id).style.backgroundImage = 'url(images/new/topbar_greybar_bgon.gif)';
			document.getElementById('menu'+id).className = 'topNavOn';
		} else {
			document.getElementById('menu'+id).style.backgroundImage = 'url(images/new/topbar_greybar_bg.gif)';
			document.getElementById('menu'+id).className = 'topNav';
		}
	}
	
	function go(id){window.location.href = id + '.asp';}
	
	function populate_contactvia(){
		var email = document.getElementById('rbemail');
		var phone = document.getElementById('rbphone');
		var lbl = document.getElementById('spcontactmethod');
		var contactinfo = document.getElementById('contactinfo');
		var contactvia = document.getElementById('contactvia');
		var ext = document.getElementById('divext');
		
		if(email.checked){
			lbl.innerHTML = 'E-mail Address';
			contactvia.value = 'E';
			ext.style.display = 'none';
		} else {
			lbl.innerHTML = 'Phone Number';
			contactvia.value = 'P';
			ext.style.display = 'inline';
		}
		contactinfo.focus();
	}
	
	function checkemail(strng){
		var emailFilter= /^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$/; //you@yourdomain.com
		if (!(emailFilter.test(strng))){return false;} else {return true;} 
	}
	
	function userexists(){
		var username = document.getElementById('txtusername');
		alert('Error: User Name already exists.  Please choose a different User Name to continue.');
		username.value = '';
		username.focus();
	}
	
	function emailexists(){
		var email = document.getElementById('txtemail');
		alert('Error: There is already an account associated with the provided e-mail address.');
		email.value = '';
		email.focus();
	}
		