// JavaScript Document


///////////////  CHAINED MENU SCRIPTS

///////////////  POP UP FUNCTION FOR SPIRIT PACKS 
var newwindow;
function popitupleft(url) {
	newwindow=window.open(url,'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,height=800,width=700,left=200,top=200');
	if (window.focus) {newwindow.focus()}
	return false;}
var newwindow;
function popitupright(url) {
	newwindow=window.open(url,'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,height=800,width=700,left=800,top=200');
	if (window.focus) {newwindow.focus()}
	return false;}
	
var newwindow;
function poptastic(url)
{	newwindow=window.open(url,'name','height=400,width=200');
	if (window.focus) {newwindow.focus()}}


///////////////   MODAL POP UP FUNCTIONS
function MM_openMDialog(theURL,args,features) { //v2.0
  var returnedValue = window.showModalDialog(theURL,args,features);
  eval (returnedValue);}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;}
  
  
//////////////// OUTBOUND LINK TRACKING VIA GOOGLE ANALYTICS
function recordOutboundLink(link, category, action) {
  try {
    var pageTracker=_gat._getTracker("UA-XXXXX-X");
    pageTracker._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100)
  }catch(err){}
}
