Hi,
So I've spent quite a while looking at this with a puzzled expression and come to the conclusion that I'd be better off asking someone for help and going to bed while waiting..

The code is all located below, basically what I want to happen is have the document write the form and have the input box and submit do the job of the prompt box
WARNING: the prompt that you'll see will save a cookie named c_name

Thanks for any help you may be able to offer, I'm stumped (To quote Stephen K Amos, I'm a "Jack of all trades, Master of **** all")
Code:
<html>
<head>
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 ;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return ""
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}

function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
  {
  alert('Welcome again '+username+'!');
  }
else 
  {
  username=prompt('Please enter your name:',"");
  if (username!=null && username!="")
    {
    setCookie('username',username,365);
    }
  }
}

</script>
<style type="text/css">
input.name {color:#CCCFFF;}
</style>
</head>
<body onLoad="checkCookie()">

<form name='name'>
What's your name?
<input type="text" id="cartId" value="Joobleblob Doe" onclick="this.value='';this.onclick=null;" class="name"><br>
<input type='submit' value='Submit' />
</form> 
</body>