function JumpLinksReplaceImage(obj,file)
{
obj.firstChild.firstChild.src="images/" + file ;
}
function OpenPokerNickname()
{
		var w = 793;
        var h = 517;
        var LocationString = "http://www.pokernickname.com/";
        var l = 1; //(window.screen.width-w)/2;
        var t = 1; //(window.screen.height-h)/2;
        window.open(LocationString,"contactUsWnd","status=no,toolbar=no,menubar=no,location=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h)        

}

function show_popup()
{
  if (!isPopup())
  {
      var popElem = document.getElementById("messageDiv");
      if (popElem)
      {
       Drag.init(popElem);
       
       var w = 340;
       var LocationString;
       var lf = (window.screen.width-w)/2-110;
       var t = "820px";
       popElem.style.top = t;
       popElem.style.left = lf + "px";
       popElem.style.display = "block";
       popElem.style.visibility = "visible"; 
       popElem.focus();
       setPopupStatus();       
     }
   }
}
function closePopup()
{
    var elemCl=document.getElementById("messageDiv");
    if (elemCl)
    {
      elemCl.style.display="none";
    }
}

function isPopup()
{
    if( getCookie("showPopup") )
        return true;
    return false;
}

function setPopupStatus()
{
    setCookie("showPopup","1","/");
}

function setCookie(name,value)
{
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var path = (argc > 2) ? argv[2] : null;
    var expires = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;

    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain))
}

function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) 
			return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
    
}
