<html>

<head>
<script>

function SampleObject ()
{
    this.name="SampleObject";
    this.id="0";
    this.age="";
    this.date="";
}

</script>

</head>

<body>

<script>

var x = new SampleObject();

x.age="22";
x.date="01/01/2002";

for (val in x)
{
    document.write( "name = " +val+ "<br>value = " +x[val]+ "<br>");
}
</script>

</body>

</script>

</html>