﻿// JScript File

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_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_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;
}

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];}
}
var swidth=200;
var sheight=280;
var sbcolor="#ccffcc";

var sspeed=4;
var restart=1;
var rspeed=sspeed;

function goup()
{
	if(sspeed!=rspeed*8)
	{
		sspeed=sspeed*2;
		restart=sspeed;
	}
}
function start()
{
	if(document.getElementById)
	{
		ns6marquee(document.getElementById('slider'));
		}
	else if(document.all)
		{
		iemarquee(slider);
		}
	else if(document.layers)
		{
		ns4marquee(document.slider1.document.slider2);
		}
}
function iemarquee(whichdiv)
{
	iediv=eval(whichdiv);
	iediv.style.pixelTop=sheight;
	sizeup=iediv.offsetHeight;
	ieslide();
}
function ieslide()
{
	if(iediv.style.pixelTop>=sizeup*(-1))
	{
		iediv.style.pixelTop-=sspeed;
		setTimeout("ieslide()",100);
	}
	else
	{
		iediv.style.pixelTop=sheight;
		ieslide();
	}
}
function ns4marquee(whichlayer)
{
	ns4layer=eval(whichlayer);
	ns4layer.top=sheight;
	ns4layer.document.close();
	sizeup=ns4layer.document.height;
	ns4slide();
}
function ns4slide()	
{
	if(ns4layer.top>=sizeup*(-1))
	{
		ns4layer.top-=sspeed;
		setTimeout("ns4slide()",100);
	}
	else
	{
		ns4layer.top=sheight;
		ns4slide();
	}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv);
ns6div.style.top=sheight + 'px';
sizeup=ns6div.offsetHeight;
ns6slide();
}

function ns6slide(){
if(parseInt(ns6div.style.top)>=sizeup*(-1)){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed + 'px';
setTimeout("ns6slide()",100);
}
else{
ns6div.style.top=sheight +'px';
ns6slide();
}
}


function ShowHideTxtDiv()
{
    var div = document.getElementById("hideTxtDiv");
    if (div.style.display == "none")
    {
        div.style.display="";
    }
    else
    {
        div.style.display = "none";
    }
}
function ShowHideContentDiv(divId)
{
 var div = document.getElementById(divId);
    if (div.style.display == "none")
    {
        div.style.display="";
    }
    else
    {
        div.style.display = "none";
    }
}

var buttonId;
function menuBntGrow(bntId)
{
    buttonId = bntId;
    growImg = document.getElementById(bntId);
    if (growImg.height < 24)
    {
        growImg.height +=2;
        timer=setTimeout('menuBntGrow(buttonId)',1);
    }
    else
    {
    clearTimeout('timer');
    }
}
timer2 = null;
var s_buttonId;
function menuBntShrink(bntId)
{
    s_buttonId = bntId;
    growImg = document.getElementById(bntId);
    if (growImg.height >= 21)
    {
        growImg.height -=2;
        timer2=setTimeout('menuBntShrink(s_buttonId)',1);
    }
    else
    {
    clearTimeout('timer2');
    //s_buttonId ="";
    }
}      



function getURLParam(strParamName){
 var strReturn = "";
 var strHref = window.location.href;
 if ( strHref.indexOf("?") > -1 ){
   var strQueryString = strHref.substr(strHref.indexOf("?"));
   var aQueryString = strQueryString.split("&");
   for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
   {
     if (aQueryString[iParam].indexOf(strParamName + "=") > -1 )
	 {
       var aParam = aQueryString[iParam].split("=");
       strReturn = aParam[1];
       break;
     }
   }
 }
 return strReturn;
}






function pauseFlash() 
{ 
document.getElementById("mFlash").stop();
} 
function playFlash()
{
document.getElementById("mFlash").play();
}
////////////// equal column script////////////////////////////
var ddequalcolumns=new Object()
//Input IDs (id attr) of columns to equalize. Script will check if each corresponding column actually exists:
ddequalcolumns.columnswatch=["leftImgDiv", "mainSectionDiv"]

ddequalcolumns.setHeights=function(reset){
var tallest=0
var resetit=(typeof reset=="string")? true : false
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null){
if (resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if (document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight
}
}
if (tallest>0){
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"
}
}
}

ddequalcolumns.resetHeights=function(){
this.setHeights("reset")
}

ddequalcolumns.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

ddequalcolumns.dotask(window, function(){ddequalcolumns.setHeights()}, "load")
ddequalcolumns.dotask(window, function(){if (typeof ddequalcolumns.timer!="undefined") clearTimeout(ddequalcolumns.timer); ddequalcolumns.timer=setTimeout("ddequalcolumns.resetHeights()", 200)}, "resize")
///////////////////////////////////////////////////////////////
