$(function() {
	a = (window.location.href.indexOf('step')!=-1) ? window.location.href.substring(window.location.href.indexOf('step'),window.location.href.indexOf('step')+5) : 0;
	$(".steps").hide();
	if (a != 0) {
		$("#"+a).show();
		$("#step0").addClass('open');
	}
	else {
		$("#step0").show(); 
		$("#step0").addClass('open'); 
	}
});


function concatLocation() {
 //var colObj=document.form_steps.Locations;
 //var str='';
 //for(i=0;i<colObj.length;i++){ if(colObj[i].value!='') str+=','+colObj[i].value; }
 //document.form_steps.concatLocations.value = str.substring(1);
 //document.getElementById('movie').src='/images/map3.swf?areaid_list='+str;
 //document.getElementById('movie').childNodes.item('movie').value='/images/map3.swf?areaid_list='+str;
}

var counter = 0;

$(function() {
	$(".next,.skip").click(function() {
		var curr = $(this).parents(".steps");
  		var next = $(this).parents(".steps").next(".steps");
			if($(this).parents().is('.open')) {
				s='_'+counter;
				
				concatLocation();
				$(this).parents('.steps,.open').find('.form_steps').submit();
				counter++;
			}
			next.toggle();
			next.addClass('open');
			curr.toggle();
			curr.removeClass('open');
			return false;
	});
  
	$(".previous").click(function() {
  	var curr_dd = $(this).parents(".steps").prev();
		
    if (curr_dd.css("display") != "block") {
			curr_dd.toggle();
			$(this).parents(".steps").toggle();
			counter--;
      return false;
		}
	});
});



  $(function() {
    $("#rentReg div:odd").addClass("even ");
    $("#rentReg div:even").addClass("odd graytxt");
    $("#rentReg div:even input").addClass("full pinktxt center");
  });