function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

function WM_readCookie(name) {

	if (document.cookie == '') { 
    
   // there's no cookie, so go no further
    
	return false;

	} else {
    
   // there is a cookie

	var firstChar, lastChar;

	var theBigCookie = document.cookie;

	firstChar = theBigCookie.indexOf(name);
	
   // find the start of 'name'

	if(firstChar != -1)  {
	
   // if you found the cookie

	firstChar += name.length + 1;
	    
   // skip 'name' and '='
	   
	lastChar = theBigCookie.indexOf(';', firstChar);
	    
   // Find the end of the value string (i.e. the next ';').
	    
	if(lastChar == -1) lastChar = theBigCookie.length;
	    
	return unescape(theBigCookie.substring(firstChar, lastChar));

	} else {
	
   // If there was no cookie of that name, return false.
	
	return false;
	
	}

    }
}

// WM_readCookie

function splitString(index)
{
  var usercookie = WM_readCookie('contact');
  var arrayOfStrings = usercookie.split('&');
    document.write(arrayOfStrings[index]);
}


function capitalizeMe(obj) {
        val = obj.value;
        newVal = '';
        val = val.split(' ');
        for(var c=0; c < val.length; c++) {
                newVal += val[c].substring(0,1).toUpperCase() +
val[c].substring(1,val[c].length) + ' ';
        }
        obj.value = newVal;
}
