
function change_link()
{
document.getElementById('blue').style.color='#00479C'
document.getElementById('switch').style.color='#FF9933'
}

function change_link_out()
{
document.getElementById('blue').style.color=''
document.getElementById('switch').style.color=''
}

function displayMenu(){
document.getElementById('hidden_sub_menu').style.display="block";
}

function convert_password_input(){
old_pass = document.getElementById('password_input')
pass = document.createElement('input');
pass.id = 'password_input';
pass.name = 'password';
pass.type = 'password';
pass.size = 18
pass.className='login_input'
old_pass.parentNode.insertBefore(pass,old_pass);
old_pass.parentNode.removeChild(old_pass);
pass.value='';
pass.focus();
}


function numChars(cnt, d_form, d_name, maxLength){
  var curLength=eval('document.'+d_form+'.'+d_name+'.value.length');
  if(curLength==maxLength && cnt!=2){
    var d_focus= new Array(3) 
    d_focus[0]="d_area_code";
	d_focus[1]="d_phone_1";
	d_focus[2]="d_phone_2";
	cnt++
	focusIt=eval('document.'+d_form+'.'+d_focus[cnt]);
    focusIt.focus();
  }
}

function numChars2(cnt, d_form, d_name, maxLength){
  var curLength=eval('document.'+d_form+'.'+d_name+'.value.length');
  if(curLength==maxLength && cnt!=2){
    var d_focus= new Array(3) 
    d_focus[0]="e_area_code";
	d_focus[1]="e_phone_1";
	d_focus[2]="e_phone_2";
	cnt++
	focusIt=eval('document.'+d_form+'.'+d_focus[cnt]);
    focusIt.focus();
  }
}



function show_password(){
document.getElementById('display_password').style.display="none";
document.getElementById('hidden_password').style.display="block";
document.login.password2.focus();
}



function check_checked(number)
{
var num_to_check = number;
var checkbox_choices = 0;



for (counter = 0; counter < get_qoute.select_product.length; counter++)
{

// If a checkbox has been selected it will return true
// (If not it will return false)
if (get_qoute.select_product[counter].checked)
{ checkbox_choices = checkbox_choices + 1; }

}



if (checkbox_choices > number )
{
// If there were more than three selections made display an alert box
msg="You're limited to only three selections.\n"
msg=msg + "You have made " + checkbox_choices + " selections.\n"
msg=msg + "Please remove " + (checkbox_choices-number) + " selection(s)."
alert(msg)
return (false);
}

if (checkbox_choices == number )
{

for (counter = 0; counter < get_qoute.select_product.length; counter++)
{
	if (get_qoute.select_product[counter].checked)
	{}
	else
    get_qoute.select_product[counter].disabled = true
	  
}
}


if (checkbox_choices < number )
{

for (counter = 0; counter < get_qoute.select_product.length; counter++)
{
	if (get_qoute.select_product[counter].checked)
	{}
	else
    get_qoute.select_product[counter].disabled = false
	  
}
}


}


function verify_checked(number){


var num_to_check = number;
var checkbox_choices = 0;

for (counter = 0; counter < get_qoute.select_product.length; counter++)
{
if (get_qoute.select_product[counter].checked)
{ checkbox_choices = checkbox_choices + 1; }

}

if (checkbox_choices < number )
{
alert("please select "+number+" of choices")
return false
}
else
return true  
}


function hide_name()
{

user_name =  document.login.email2.value


if (user_name == "username")
{
document.login.email2.value = "" 
}


}