﻿function Anthem_PreCallBack() {
    var loading = document.createElement("div");
    var x = (posRight()- 128)/2 + 'px';
    var y = (posBottom()/2) + 'px';
    loading.id = "loading";
    loading.style.color = "black";
    //loading.style.backgroundColor = "FFFFCC";
    loading.style.paddingLeft = "5px";
    loading.style.paddingRight = "5px";
    loading.style.position = "absolute";
    loading.style.left = x;
    loading.style.top = y;
    loading.style.filter='alpha(opacity=50)'; // IE
	loading.style.opacity='0.50'; // Firefox
    loading.style.zIndex = "9999";
    loading.innerHTML = "<img src='/imagens/load_site_voxcards2.gif'>";
    //loading.innerHTML = "<span class='fonte11' style='vertical-align:middle;'> Processando...</span>";
    //loading.innerHTML = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='100' height='100'><PARAM NAME='movie' VALUE='/flash/load_site_voxcards3.swf'><PARAM NAME='quality' VALUE='high'><param name='wmode' value='opaque'><embed src='/flash/loading_ajax.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' wmode='opaque' type='application/x-shockwave-flash' width='100' height='100'></embed></OBJECT>";
    document.body.appendChild(loading);
}
function Anthem_CallBackCancelled() {
    alert("Your call back was cancelled!");
}
function Anthem_PostCallBack() {
    var loading = document.getElementById("loading");
    document.body.removeChild(loading);
}

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false;

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE);

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0;
var tempY = 0;

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  return true;
}
//MJ, 2006-2-18
function PostInfo(strMessage){
    var loading = document.createElement("div");
    //var x = (posRight()-170) + 'px';
    //var y = (posTop()+2) + 'px';
    //alert(tempX + ' ' + tempY);
    var x = tempX + 15 + 'px';
    var y = tempY + 'px';
    loading.id = "loading";
    loading.style.color = "black";
    //loading.style.backgroundColor = "000000";
    //loading.style.background-image = "url(gifs/bgMsg.gif)"
    loading.style.paddingLeft = "5px";
    loading.style.paddingRight = "5px";
    loading.style.position = "absolute";
    //loading.style.left = x;
    //loading.style.top = y;
    //loading.style.width = "270px";
    loading.style.zIndex = "9999";
    
    loading.style.top = posTop();
    loading.style.width = pageWidth() - 10 + "px";
    loading.style.height = pageHeight() + "px";
    
    loading.style.filter='alpha(opacity=80)'; // IE
	loading.style.opacity='0.80'; // Firefox
    //loading.innerHTML = "<img src='/gifs/info.gif'><span class='fonte11' style='vertical-align:middle;'> "+ strMessage +"</span>";
    loading.innerHTML = "<div style='background-image:url(/gifs/bgMsg2.gif); text-align:center;position:absolute; top:" + ((pageHeight()-60)/2) + "px; left:" + (posLeft()+ ((pageWidth()-300)/2)) + "px; width:265px; height:89px; font-weight:bold; padding:10px 10px 10px 10px;'><span style='font-family: verdana; font-size:12px; color:#000000;'>" + strMessage + "</span></div><br><br>"
    document.body.appendChild(loading);
    setTimeout("HideInfo()", 3000);
}
//MJ, 2006-2-18
function HideInfo(){
    var loading = document.getElementById("loading");
    document.body.removeChild(loading);
}
