var IE = document.all ? 1 : 0;
var ns = document.layers ? 1 : 0;
var winW = 630;
var winH = 460;
if (parseInt(navigator.appVersion)>3) { 
  if (navigator.appName=="Netscape") { 
    winW = window.innerWidth;
    winH = window.innerHeight;
  } 
  if (navigator.appName.indexOf("Microsoft")!=-1) { 
    winW = document.body.offsetWidth;
    winH = document.body.offsetHeight;
  } 
} 
function show_coords(name,info) { 
  var AnchorPos = getAnchorPosition(name);
  document.getElementById('floater').style.width='120px';
  document.getElementById('floater-shadow').style.width='120px';
  document.getElementById('floater-shadow2').style.width='120px';
  popup2(info,AnchorPos.x,AnchorPos.y);
} 
function popup2(t,mX,mY) { 
  var f1style=document.getElementById('floater');
  var shadow=document.getElementById('floater-shadow');
  var shadow2=document.getElementById('floater-shadow2');
  t=''+t;
  if(lastT == t && f1style.display=='') return;
  shadow2.innerHTML=shadow.innerHTML=f1style.innerHTML=t; 
  f1style=f1style.style; 
  shadow=shadow.style; 
  shadow2=shadow2.style; 
  shadow2.left=2+(shadow.left=6+(f1style.left=mX > document.body.clientWidth * .6? mX-100:mX+5)); 
  shadow2.top=2+(shadow.top=6+(f1style.top=mY+5)); 
  f1style.filter='alpha(opacity=10)'; 
  f1style.opacity=0.1; 
  shadow2.filter=shadow.filter='alpha(opacity=5)'; 
  shadow2.opacity=shadow.opacity=0.05;
  shadow2.display=shadow.display=f1style.display='';
  visible |= 1; 
  setTimeout('fadein()',20); 
  lastT=t; 
} 
function launch_pk() { 
  myRef = window.open('/training/pk2.html','training','width=420,height=360,toolbar=0,resizable=0');
} 
function launch_vq() { 
  myRef = window.open('/training/vq2.html','training','width=420,height=360,toolbar=0,resizable=0'); 
} 
function launch_review() { 
  myRef = window.open('/training/lv2.html','training','width=420,height=360,toolbar=0,resizable=0'); 
} 
function train_vq() { 
  show_coords('train_vq','<span><img src=/images/pointer-right-up.gif>&nbsp;&nbsp;This is the Verse Queue <a href="JavaScript:launch_vq();" onClick="launch_vq();">Click here to learn more about the Verse Queue</a></span>');
  } 
function train_pk() { 
  show_coords('train_pk','<span><img src=/images/pointer-up.gif>&nbsp;&nbsp;This is the Packages Area <a href="JavaScript:launch_pk();" onClick="launch_pk();">Click here to learn more about Packages</a></span>'); 
} 
function train_review() { 
  show_coords('train_review','<span><img src=/images/pointer-right-up.gif>&nbsp;&nbsp;This is the Life Verses Area <a href="JavaScript:launch_review();" onClick="launch_review();">Click here to learn more about Live Verses</a></span>'); 
} 
function hide_training() { 
  document.getElementById('floater').style.display='none';
  document.getElementById('floater-shadow').style.display='none'; 
  document.getElementById('floater-shadow2').style.display='none'; 
}
var FO;
function setupTutorial () {
 FO = new FlashObject("/MTIntro.swf", "flash", "360", "220" , "1", "#000000");
 FO.addParam("wmode", "transparent");
 setTimeout('FO.write("swfobject-to-replace");',100);
 //FO.write("swfobject-to-replace");
}
function showTutorial()  {$('flash').style.display='block'}
function hideTutorial() {$('flash').style.display='none'}

document.write(
'<DIV id="flash" style="Z-INDEX: 1; POSITION: relative; padding: 10px; display:none;">'+
'  <DIV id="swfobject-to-replace" style="z-index: 3; POSITION: relative;">Loading Flash...'+
'  </div>'+
'  <p align=right><a href="javascript:hideTutorial()">hide tutorial</a></p>'+
'  <hr width="50%" noshade /> <br />'+
'</div>');
setupTutorial();


