// vancouver scout JavaScript Libraries


// Basic image rollovers

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v3.0

  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); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



if (document.images) {

   hometop_f2 = new Image(121 ,25); hometop_f2.src = "images/hometop_f2.gif";

   hometop_f1 = new Image(121 ,25); hometop_f1.src = "images/hometop.gif";

   leadertop_f2 = new Image(119 ,25); leadertop_f2.src = "images/leadertop_f2.gif";

   leadertop_f1 = new Image(119 ,25); leadertop_f1.src = "images/leadertop.gif";

   grouptop_f2 = new Image(120 ,25); grouptop_f2.src = "images/grouptop_f2.gif";

   grouptop_f1 = new Image(120 ,25); grouptop_f1.src = "images/grouptop.gif";

   activitytop_f2 = new Image(121 ,25); activitytop_f2.src = "images/activitytop_f2.gif";

   activitytop_f1 = new Image(121 ,25); activitytop_f1.src = "images/activitytop.gif";

   faqtop_f2 = new Image(120 ,25); faqtop_f2.src = "images/faqtop_f2.gif";

   faqtop_f1 = new Image(120 ,25); faqtop_f1.src = "images/faqtop.gif";

}



// Image preloader

function loadImg() {

MM_preloadImages('images/hometop_f2.gif','images/leadertop_f2.gif','images/grouptop_f2.gif','images/activitytop_f2.gif','images/faqtop_f2.gif')

}



// The menu cascade function

var Open = ""

var Closed = ""



function preload(){

   if(document.images){

      Open = new Image(11,8)    

      Closed = new Image(11,8)

      Open.src = "images/arrow_down.gif"

      Closed.src = "images/plus.gif"

   }

}



function showhide(what,what2){

   if (what.style.display=='none'){

      what.style.display='';

      what2.src=Open.src

   } else {

      what.style.display='none'

      what2.src=Closed.src

   }

}



// Right side top menu

if (document.images) {

   contact_us_f2 = new Image(76 ,20); contact_us_f2.src = "images/contact_us_f2.gif";

   contact_us_f1 = new Image(76 ,20); contact_us_f1.src = "images/contact_us.gif";

}



// Bottom menu

if (document.images) {



}



// Basic window popup function.

function ShowPopUp(page,wid,ht){

   window.open(page,"PopUp","resizable=0,scrollbars=0,width="+wid+",height="+ht);

}

// Basic window popup function 2.

function ShowPopUp2(page,wid,ht){

   window.open(page,"PopUp","resizable=1,scrollbars=1,toolbar=1,width="+wid+",height="+ht);

}


// Very quick and dirty inline Help popup help thing



Xoffset=-10;    // modify these values to ...

Yoffset= 20;    // change the popup position.



var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers

var ns6=document.getElementById&&!document.all

var ie4=document.all

function helpPop(msg,bak){

var content="<table width=\"150\" border=\"1\" bordercolor=\"#f6f6f6\" cellpadding=\"2\" cellspacing=\"0\" "+"bgcolor=\""+bak+"\"><td align=\"left\" class=\"bodytext\">"+msg+"</td></table>";

yyy=Yoffset;

 if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}

 if(ns6){document.getElementById("helper").innerHTML=content;skn.display=''}

 if(ie4){document.all("helper").innerHTML=content;skn.display=''}

}



function get_mouse(e){

var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;

skn.left=x+Xoffset;

var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;

skn.top=y+yyy;

}



function kill(){

yyy=-1000;

if(ns4){skn.visibility="hidden";}

else if (ns6||ie4)

skn.display="none"

}