/* Copyright 2004,2005,2006,2007 Xcess Company, http://www.xcess.info */
var xi_posx=0;
var xi_posy=0;
var xi_events=0;
var xi_timerout=0;
var xi_offset=20;
var xi_position='';
function xi_on(i1,i2,tmr,cnt,xiposition,xioffset,xi_cssext,xi_loadingtxt){ xi_position = xiposition; xi_offset=xioffset;
var div_main=document.createElement("div"); div_main.setAttribute('id', 'div_main'); if (xi_cssext!='') {div_main.className=xi_cssext;}div_main.style.position='absolute'; div_main.style.left='-1000px'; div_main.style.top='-1000px'; if (cnt==''){ div_main.innerHTML = '<img src="'+i2+'" onload="activate();" />';}else{ div_main.innerHTML = cnt; xi_events++;}document.body.appendChild(div_main); var div_loading=document.createElement("div"); div_loading.setAttribute('id', 'div_loading'); if (xi_cssext!='') {div_loading.className=xi_cssext;}div_loading.innerHTML = xi_loadingtxt; div_loading.style.position='absolute'; div_loading.style.left='-1000px'; div_loading.style.top='-1000px'; document.body.appendChild(div_loading); xi_events++; document.getElementById(i1).onmousemove=xi_fmouse; xi_timerout=0; act_timer = window.setTimeout("activate();xi_timerout=1;",tmr);}function xi_off(i1){ if (xi_events!=0){ xi_events=0; document.getElementById(i1).onmousemove=""; window.clearTimeout(act_timer); document.body.removeChild(document.getElementById("div_main")); if (document.getElementById("div_loading")){document.body.removeChild(document.getElementById("div_loading"));}xi_es=0;}}function activate(){ xi_events++; if (xi_events==3){ document.body.removeChild(document.getElementById("div_loading")); pos_div_main();}}function pos_div_main(){ if (document.getElementById("div_main")){ div_main_c = document.getElementById("div_main"); div_main_c.style.left = xi_getx(div_main_c.offsetWidth)+"px"; div_main_c.style.top = xi_gety(div_main_c.offsetHeight)+"px";}}function pos_div_loading(){ if (document.getElementById("div_loading")){ div_loading_c = document.getElementById("div_loading"); div_loading_c.style.left = xi_getx(div_loading_c.offsetWidth)+"px"; div_loading_c.style.top = xi_gety(div_loading_c.offsetHeight)+"px";}}function xi_getx(xi_width){ switch(xi_position){ case 'Top':return xi_posx-(xi_width/2); case 'Bottom':return xi_posx-(xi_width/2); case 'TopRight':return xi_posx+xi_offset; case 'Right':return xi_posx+xi_offset; case 'BottomRight':return xi_posx+xi_offset; case 'BottomLeft':return xi_posx-xi_width-xi_offset; case 'Left':return xi_posx-xi_width-xi_offset; case 'TopLeft':return xi_posx-xi_width-xi_offset; default: return 10;}}function xi_gety(xi_height){ switch(xi_position){ case 'TopLeft':return xi_posy-xi_height-xi_offset; case 'Top':return xi_posy-xi_height-xi_offset; case 'TopRight':return xi_posy-xi_height-xi_offset; case 'BottomLeft':return xi_posy+xi_offset; case 'Bottom':return xi_posy+xi_offset; case 'BottomRight':return xi_posy+xi_offset; case 'Right':return xi_posy-(xi_height/2); case 'Left':return xi_posy-(xi_height/2); default: return 10;}}function xi_fmouse(e){ var DocRef; if(e){ xi_posx = e.pageX; xi_posy = e.pageY;}else { xi_posx = event.clientX; xi_posy = event.clientY; if(document.documentElement && document.documentElement.clientWidth)DocRef = document.documentElement; elseDocRef = document.body; xi_posx = xi_posx+DocRef.scrollLeft; xi_posy = xi_posy+DocRef.scrollTop;}if ((xi_events==1 || xi_events==2) && (xi_timerout==1)){ pos_div_loading();}if (xi_events==3){ pos_div_main();}}
