function checkPostcode(strPostcode) {
	var intCharCodeMin = 65
	var intCharCodeMax = 122
	var intCharCodeMinInside = 90
	var intCharCodeMaxInside = 97

	strPostcode = String(strPostcode)
	if (strPostcode.length < 6)
		return false
	if(strPostcode.length > 7)
		return false
	strPostcode = strPostcode.replace(" ","")
	if (strPostcode.length == 7)
		return false
    if (String(parseInt(strPostcode.substr(0,4))).length != 4)
      return false
    for (i=4;i<6;i++)
		if ( strPostcode.charCodeAt(i)< intCharCodeMin || strPostcode.charCodeAt(i)> intCharCodeMax || (strPostcode.charCodeAt(i) > intCharCodeMinInside && strPostcode.charCodeAt(i) < intCharCodeMaxInside  ))
			return false
	return true
}
