function dropDown(){
	$('dropDown').toggle();
	
	var items = $$('#dropDown ul li');
	
	for(i=0; i<items.length; i++){
		this.item = items[i].id;
		var _this = this;
		Event.observe(item, 'click', function(_this){
			$('lob').value = _this.target.id;
			$('dropDown').hide();
		});
	}
}

function moveOnMax(field,nextFieldID){
  if(field.value.length >= field.maxLength){
    $(nextFieldID).focus();
  }
}

function getAQuote(){

	if($F('lob') == 'Automobile'){
		var url = 'auto-iframe.html';
	}
	else if($F('lob') == 'Home/Condo/Tenants'){
		var url = 'home-iframe.html';
	}
	else if($F('lob') == 'Motorcycle'){
		var url = 'motorcycle-iframe.html';
	}
	
	if(url != null){
		Lightview.show({
		    href: url,
		    rel: 'ajax',
		    options: {
		      autosize: true,
		      topclose: true,
		      ajax: {
		      	evalScripts: true,
		        onComplete: function() {
		          // once the request is complete we observe the form for a submit
		          $('ajaxForm').observe('submit', submitAjaxFormDemonstration);
		        }
		      }
		    }
		  });
	}
	else
	{
	
	}
}

var headerLoader = Class.create({

	//ARRAY OF THUMBS
	headerArray: ['pic1', 'pic2', 'pic3', 'pic4', 'pic5'],
	
	initialize: function(headerContainer){

		var r = this.randomXToY(1, 4);

		$(''+headerContainer+'').removeClassName('pic1');
		$(''+headerContainer+'').addClassName(''+this.headerArray[r]+'');		
	},
	
	randomXToY: function(minVal,maxVal,floatVal)
	{
		var randVal = minVal+(Math.random()*(maxVal-minVal));
	  	return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
	}
});
