Need help while writing cooking in javascript :

This will work fine
document.cookie = 'mycookie=hello;expires=Fri, 17 Dec 2010 10:00:00 GMT';

but if ; (semicolon) is appearing in value of cookie then it terminates the cookie for ex :

document.cookie = 'mycookie=hello;after semicolon it wont work;expires=Fri, 17 Dec 2010 10:00:00 GMT';

in above example you can see cookie value contains ; inside it after hello and I think this is creating problem

what I am trying to do is as below :
I am writing no. of values in one cookie
Write cookie 1st time : o/p : name_1 | last_2 | dob_3
Write cookie 2nd time with more values: o/p : name_1;name_2 | last_2;name_2 | dob_3;dob_3

Now when I am writing cooking and in between this if ; (semicolon) appears in value of cookie then I think it is not writing cookie completely coz it is termination cookie when he finds 1st ; (semicolon)..

can anyone help me how to write that ; inside cookie