function checkpassword(){
    username = document.insertUser.userName.value;
    if (username.length > 10){
     	window.alert("User name should be less than 10 characters");
     	return false;
    }
	password = document.insertUser.password.value;
    confirmpassword = document.insertUser.retype.value;
    if (password.length > 10){
     	window.alert("Password should be less than 10 characters");
     	return false;
    }    
    if (password == confirmpassword) {
        //window.alert("MATCH");
        //return true;
    }else{
        window.alert("Password did not match in confirm password field");
        return false;
    }
}


function imagePopup(url) {
	window.open (url,
	"imagePopup",
	"status=0, toolbar=0, menubar=0, directories=0, resizable=0, scrollbars=1, height=800, width=900");
}

           function getStates(){
    //window.alert("came here");
    var x = document.shippingInfo.cmbcountry.value;
    //window.alert(x);
    document.shippingInfo.action ="ManageCart.do?cartAction=getStates&countryCode=" + x;
	document.shippingInfo.submit();
    
     }
     
     
function changeRegion(){
                //window.alert("HELLO");
                var x = "<%=request.getContextPath()%>/changeRegion.do?forceRegion=true";                
                document.forms["regForm"].action ="changeRegion.do";
                //window.alert(x);
                document.forms["regForm"].submit();
}
     
     
