function setCookieForToday(name, value){
var dtToday = new Date();
dtToday.setDate(dtToday.getDate() + 2);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + dtToday.toGMTString() + ";";
}

function replace(string,text,by) 
{
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0))
{
  return string;
}

    var i = string.indexOf(text);

if ((!i) && (text != string.substring(0,txtLength)))
{
  return string;
}
    
if (i == -1)
{
  return string;
}

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
{
  newstr += replace(string.substring(i+txtLength,strLength),text,by);
}

    return newstr;
}

/* setCookie */
function setCookie(name,value,expiredays)
{
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

/* GETCOOKIE */
function getCookie(name)
{
var nameOfCookie = name + "=";
var x = 0;
while (x <= document.cookie.length)
{
  var y = (x+nameOfCookie.length);
  if (document.cookie.substring( x, y ) == nameOfCookie)
  {
   if ((endOfCookie=document.cookie.indexOf(";",y)) == -1)
   {
    endOfCookie = document.cookie.length;
   }
   return unescape(document.cookie.substring(y,endOfCookie));
  }

  x = document.cookie.indexOf(" ",x) + 1;
  if (x == 0)
  {
   break;
  }
}
return "";
}

var x =0
var y=0
drag = 0
move = 0
window.document.onmousemove = mouseMove;window.document.onmousedown = mouseDown;window.document.onmouseup = mouseUp;window.document.ondragstart = mouseStop
function mouseUp() {move = 0}
function mouseDown() {if (drag) 
{clickleft = window.event.x - parseInt(dragObj.style.left);clicktop = window.event.y - parseInt(dragObj.style.top);dragObj.style.zIndex += 1;move = 1}}
function mouseMove() {if (move) {dragObj.style.left = window.event.x - clickleft;dragObj.style.top = window.event.y - clicktop}}
function mouseStop() {window.event.returnValue = false}
function Show(divid) {divid.filters.blendTrans.apply();divid.style.visibility = "visible";divid.filters.blendTrans.play();}
function Hide(divid) {divid.filters.blendTrans.apply();divid.style.visibility = "hidden";divid.filters.blendTrans.play(); } 
