function getCookie(NameOfCookie)
{ if (document.cookie.length > 0) 
{ begin = document.cookie.indexOf(NameOfCookie+"="); 
if (begin != -1) 
{ begin += NameOfCookie.length+1; 
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); } 
}
return null; 
}



function setCookie(NameOfCookie, value, expiredays) 
{ var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}



function delCookie (NameOfCookie) 
{ if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

}
function DoTheCookieStuff() 
{
PicPath=getCookie('PicPath');
PicTitle=getCookie('PicTitle');
document.write('<html dir="rtl"><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1256"><title>'+PicTitle+'</Title><meta name="Microsoft Theme" content="ripple-sci 1011, default"><meta name="Microsoft Border" content="tlb, default" dir="rtl"></head><body><p style="text-align: center"><img src='+PicPath+' align="center"><br><font size="5" color=red face="Arial"><b>'+ PicTitle +'</b></p></font></br></Body>');
//alert(PicPath + '	' + PicTitle);
}

