﻿// DIV HOVER CODE
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}

var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo

if(ie){
    Ex = "event.x"
    Ey = "event.y"
    topColor = "#808080"
    subColor = "#C0C0C0"
}

if(ns){
    Ex = "e.pageX"
    Ey = "e.pageY"
    window.captureEvents(Event.MOUSEMOVE)
    window.onmousemove=ShowToolTips
    topColor = "#808080"
    subColor = "#C0C0C0"
}

function MoveToolTip(layerName, FromTop, FromLeft, e){
    if(ie){eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + document.documentElement.scrollTop + 240))}
    //if(ns){eval(doc + layerName + sty + ".top = "  +  eval(FromTop))}
    eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 220))
}

function ReplaceContent(layerName){

    if(ie){document.all[layerName].innerHTML = ContentInfo}
    if(ns){

        with(document.layers[layerName].document) 
        { 
           open(); 
           write(ContentInfo); 
           close(); 
        }
    }
}

function Activate(){initialize=1}
function deActivate(){initialize=0}

function ShowToolTips(e){
  if(initialize){
    MoveToolTip("QToolTip2", Ey, Ex, e)
    eval(doc + "QToolTip2" + sty + ".visibility = 'visible'")
  }
  else{
    MoveToolTip("QToolTip2", 0, 0)
    eval(doc + "QToolTip2" + sty + ".visibility = 'hidden'")
  }
}

function EnterContent(layerName, TContent, num){

    ContentInfo = 	'<table border="0" cellspacing="0" cellpadding="0">'+
				    '<tr><td valign="middle">'+
					    '<table border="0" width="150" cellspacing="0" cellpadding="0">'+
					    '<tr><td width="100%" valign="middle" align="left" class="smallText"><strong>'+TContent+'</strong><br/>There are <strong>'+num+'</strong> jobs listed for this country.<br/>Click to view job listing &raquo;</td></tr>'+
					    '</table>'+
				    '</td></tr>'+
				    '</table>';
    ReplaceContent(layerName)
}
