function checkState() {
	var st = document.F_SELECTSTATE2.STATE.value;;
	if(document.F_SELECTSTATE2.STATE.value=="") {
		alert("Select State!");
		return false;
	} else {
		var actionValue;
		
			actionValue="/"+st;
		
		with(document.F_SELECTSTATE2) {
			action=actionValue;
		}
	}
}

function myFunc(e){
	var key;
	if(window.event)
		key = window.event.keyCode; //IE
	else
		key = e.which; //firefox
	if(key==13){
		var st = document.F_SELECTSTATE2.STATE.value;
		if(document.F_SELECTSTATE2.STATE.value=="") {
			alert("Select State!");
		} else {
			var actionValue;
			
				actionValue="/"+st;
			
			with(document.F_SELECTSTATE2) {
				action=actionValue;
				submit();
			}
		}
	}
}


function showStates(data){
	if(data==1){
		document.getElementById('showstate').style.display='inline';
		document.getElementById('showcookie').style.display='none';
	}else{
		document.getElementById('showstate').style.display='none';
		document.getElementById('showcookie').style.display='inline';
	}

}
function changeState(){
        stateName=document.F_SELECTSTATE2.STATE.value;
        if(stateName !=''){
                top.location.href='/'+stateName;
        }else{
                alert("Please select the state");
                return;
        }
}
