﻿// from the w3c
function getElement(aID){ 
  return ((document.getElementById) ? document.getElementById(aID)
                                    : document.all[aID]);
} 

function updateGoogleStats_Email()
{
    var objIFrame = getElement('email_iframe');
    if (!objIFrame)
    {
        var body = document.body;
        objIFrame = document.createElement('iframe');
        objIFrame.id = "email_iframe";
        objIFrame.frameBorder = 0;
        body.appendChild(objIFrame);
    }
    
    objIFrame.src = '/google_email_tracking.html?q=' + Math.floor(Math.random()*1001);
}

function resizeframe(frameID)
{
   var xpos = (document.body.clientWidth - 600) / 2;
   var ypos = (document.body.clientHeight - 400) / 2;   
   
   var fm = document.getElementById(frameID);

   fm.style.left = xpos;
   fm.style.top = ypos;
   fm.style.display = "block";
}