// (c)2008 Martin Ouellet

var s;var g;var s_FP;var g_FP;var domReady=false;var domReadyFP=false;var s_LOG;var g_LOG;var domReadyLOG=false;window.onload=function(){domReady=true;domReadyFP=true;domReadyLOG=true;};

function dialogForgotPassword(url)
{if(!domReadyFP)
return;hideObjects()
var width=550;var height=168;var SAFARI=false;if(navigator.vendor)
{if(navigator.vendor.indexOf("Apple")!=-1)
{SAFARI=true;}}
if(SAFARI)
{var left=parseInt(parseInt(window.innerWidth)/2)-(width/2);var top=parseInt(parseInt(window.innerHeight)/2)-(height/2);}
else
{var left=parseInt(parseInt(document.body.clientWidth)/2)-(width/2);var top=parseInt(parseInt(document.body.clientHeight)/2)-(height/2);}
if(s_FP&&g_FP)
{g_FP.style.left=left;g_FP.style.top=top;s_FP.style.visibility="visible";g_FP.style.visibility="visible";return;}
s_FP=document.body.appendChild(document.createElement("div"));s_FP.id="ForgotPassword";s_FP.style.border="none";s_FP.style.backgroundColor="#333333";s_FP.style.position="absolute";s_FP.style.width=document.body.scrollWidth;s_FP.style.height=document.body.scrollHeight;s_FP.style.left=0;s_FP.style.top=0;s_FP.style.zIndex="99999992";s_FP.style.filter="alpha(opacity=80)";s_FP.style.mozopacity="0.8";s_FP.style.opacity="0.8";s_FP.style.display="block";g_FP=document.body.appendChild(document.createElement("div"));g_FP.id="ForgotPasswordDialog";g_FP.style.border="2px outset";g_FP.style.backgroundColor="#FFFFFF";g_FP.style.position="absolute";g_FP.style.width=width;g_FP.style.height=height;g_FP.style.left=left;g_FP.style.top=top;g_FP.style.float="left";g_FP.style.zIndex="99999993";g_FP.innerHTML="<iframe style='width:550;height:168;border:none;' scrolling='no' src='"+url+"'></iframe>"+"<a style='text-decoration:none;' href='#' onclick='g_FP.style.visibility=\"hidden\";s_FP.style.visibility=\"hidden\";showObjects();'>"+" <div style='top:1px;right:5px;position:absolute;color:white;'>"+"  <table style='border:none;padding:0px;'>"+"   <tr>"+"    <td><img src='/images/button_closelogin.gif' border='0'></td>"+"  </tr>"+"  </table>"+" </div></a>";}

function dialogChangeCity(url)
{
    if(!domReady)
        return;
    hideObjects();
    var width=600;var height=380;var SAFARI=false;if(navigator.vendor)
    {if(navigator.vendor.indexOf("Apple")!=-1)
    {SAFARI=true;}}
    if(SAFARI)
    {
        var left=parseInt(parseInt(window.innerWidth)/2)-(width/2);
        var top=parseInt(parseInt(window.innerHeight)/2)-(height/2);
    }
    else
    {   var left=parseInt(parseInt(document.body.clientWidth)/2)-(width/2);
        var top=parseInt(parseInt(document.body.clientHeight)/2)-(height/2);
    }
    if(s&&g)
    {
        g.style.left=left;g.style.top=top;
        s.style.visibility="visible";g.style.visibility="visible";
        return;
    }
    s=document.body.appendChild(document.createElement("div"));
    s.id="ChangeCity";s.style.border="none";
    s.style.backgroundColor="#333333";
    s.style.position="absolute";s.style.width=document.body.scrollWidth;
    s.style.height=document.body.scrollHeight;s.style.left=0;
    s.style.top=0;s.style.zIndex="99999990";
    s.style.filter="alpha(opacity=80)";s.style.mozopacity="0.8";
    s.style.opacity="0.8";s.style.display="block";
    
    g=document.body.appendChild(document.createElement("div"));
    g.id="ChangeCityDialog";g.style.border="2px outset";
    g.style.backgroundColor="#FFFFFF";g.style.position="absolute";
    g.style.width=width;g.style.height=height;
    g.style.left=left;g.style.top=top;g.style.float="left";g.style.zIndex="99999991";
    
    g.innerHTML="<iframe style='width:600;height:380;border:none;' scrolling='no' src='"+
    url+"'></iframe>"+"<a style='text-decoration:none;'"+
    " href='#' onclick='g.style.visibility=\"hidden\";s.style.visibility=\"hidden\";'>"+
    " <div style='top:1px;right:5px;position:absolute;color:white;'>"+
    "  <table style='border:none;padding:0;'>"+
    "   <tr>"+"    <td><img src='/images/button_closelogin.gif' border='0'></td>"+
    " </tr>"+" </table>"+" </div></a>";
}

function dialogLogIn(url)
{if(!domReadyLOG)
return;hideObjects()
var width=550;var height=168;var SAFARI=false;if(navigator.vendor)
{if(navigator.vendor.indexOf("Apple")!=-1)
{SAFARI=true;}}
if(SAFARI)
{var left=parseInt(parseInt(window.innerWidth)/2)-(width/2);var top=parseInt(parseInt(window.innerHeight)/2)-(height/2);}
else
{var left=parseInt(parseInt(document.body.clientWidth)/2)-(width/2);var top=parseInt(parseInt(document.body.clientHeight)/2)-(height/2);}
if(s_LOG&&g_LOG)
{g_LOG.style.left=left;g_LOG.style.top=top;s_LOG.style.visibility="visible";g_LOG.style.visibility="visible";return;}
s_LOG=document.body.appendChild(document.createElement("div"));s_LOG.id="LogIn";s_LOG.style.border="none";s_LOG.style.backgroundColor="#333333";s_LOG.style.position="absolute";s_LOG.style.width=document.body.scrollWidth;s_LOG.style.height=document.body.scrollHeight;s_LOG.style.left=0;s_LOG.style.top=0;s_LOG.style.zIndex="99999994";s_LOG.style.filter="alpha(opacity=80)";s_LOG.style.mozopacity="0.8";s_LOG.style.opacity="0.8";s_LOG.style.display="block";g_LOG=document.body.appendChild(document.createElement("div"));g_LOG.id="LogInDialog";g_LOG.style.border="2px outset";g_LOG.style.backgroundColor="#FFFFFF";g_LOG.style.position="absolute";g_LOG.style.width=width;g_LOG.style.height=height;g_LOG.style.left=left;g_LOG.style.top=top;g_LOG.style.float="left";g_LOG.style.zIndex="99999995";g_LOG.innerHTML="<iframe style='width:550;height:168;border:none;' scrolling='no' src='"+url+"'></iframe>"+"<a style='text-decoration:none;' href='#' onclick='g_LOG.style.visibility=\"hidden\";s_LOG.style.visibility=\"hidden\";showObjects();'>"+" <div style='top:1px;right:5px;position:absolute;color:white;'>"+"  <table style='border:none;padding:0;'>"+"   <tr>"+"    <td><img src='/images/button_closelogin.gif' border='0'></td>"+"  </tr>"+"  </table>"+" </div></a>";}

function showObjects()
{
    var objects=document.getElementsByTagName('object');
    for(var i=0;i<objects.length;i++)
        objects[i].style.display='block';
}

function hideObjects()
{
    var objects=document.getElementsByTagName('object');
    for(var i=0;i<objects.length;i++)
        objects[i].style.display='none';
}