Argonaft,
$(function() {
var $arr = ["mobile_phone", "email", "first_name", "pcode", "province", "city", "street", "house"];
function inputvalue(arr) {
for (index = 0; index < arr.length; ++index) {
var value = getCookie(arr[index]);
if (value !== null) {
alert(value);
$("input[id=" + arr[index] + "]").val(value)
}
}
}
function getCookie(cookie_name) {
var results = document.cookie.match("(^|;) ?" + cookie_name + "=([^;]*)(;|$)");
if (results) return unescape(results[2]);
else return null
}
inputvalue($arr)
});