<!--
/********************************************************************************
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. 
This may be used freely as long as this msg is intact!
********************************************************************************
Browsercheck:*/
ie=document.all?1:0
n=document.layers?1:0

/*********************************************************************************
These are the variables you have to set:
*********************************************************************************/

//The speed of the timeout between each scroll.
timSpeed=50

//The height of the container (change this when it scrolls to much or to little)
contHeight=100

/*********************************************************************************
This is the object constructor function, which applies 
methods and properties to the crossbrowser layer object
*********************************************************************************/
function makeScrollObj(obj,nest){
        nest=(!nest) ? '':'document.'+nest+'.'                                                                          
        this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')                                                    
        this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')                                                  
        this.top=b_gettop                                                                               
        return this
}
//Getting the top for the top method
function b_gettop(){
        var gleft=(n) ? eval(this.css.top):eval(this.css.pixelTop);
        return gleft;
}
//Variables
var scrollTim;
//var active=0;
var active;
/*********************************************************************************
The scroll function. Checks what way to scroll and checks if the
layer is not already on top or bottom.
*********************************************************************************/
function scroll(speed,active){
        clearTimeout(scrollTim)
        way=speed>0?1:0
        if((!way && oScroll[active].top()>-oScroll[active].scrollHeight+contHeight) ||(oScroll[active].top()<0 && way)){
                oScroll[active].css.top=oScroll[active].top()+speed
                scrollTim=setTimeout("scroll("+speed+","+active+")",timSpeed)
        }
}
//Clears the timeout so the scroll stops, this is called onmouseout.
function noScroll(){
        clearTimeout(scrollTim)
}
/*********************************************************************************
Initilizes the page, makes a oScroll Array and calls the object constructor.
Here you can add as many scrollObjects as you want
*********************************************************************************/
function scrollInit(){
        oScroll=new Array()
        //oScroll[0]=new  makeScrollObj('mesg1','mesg')
        //oScroll[0].css.visibility='hidden'
        oScroll[1]=new  makeScrollObj('action1','action')
        //oScroll[1].css.visibility='hidden'
        //oScroll[2]=new  makeScrollObj('news1','news')
        //oScroll[2].css.visibility='hidden'		
        //oScroll[3]=new  makeScrollObj('view1','view')
        //oScroll[3].css.visibility='hidden'				
        //oScroll[4]=new  makeScrollObj('release1','release')
        //oScroll[4].css.visibility='hidden'
}
/*********************************************************************************
Executes the scrollInit function on pageload.
*********************************************************************************/
//onload=scrollInit;



function toggle(idName) {
		if(idName == "all"){
			for(i=1; i<20; i++){
				which = "faq" + i;
				target = document.all(which);
				if(!target){
					continue;
				}
				if (target.style.display == "") {
					target.style.display = "none";
				}else {
					target.style.display = "";
				}
			}
			return;
		}

		target = document.all(idName);
		if (target.style.display == "none") {
			target.style.display = "";
		}else {
			target.style.display = "none";
		}
	}



function RandomImageLinkLong(images,urls,iparams)
{
 imageSet = new Array();
 urlSet = new Array();
 si = 0; 
 ci=0;
 cc=0;
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
 si = 0; 
 ci=0;
 cc=0;
 ei = urls.length;
  for (i=1;i<ei && cc <=ind ;i++) {
    if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') {
      urlSet[cc] = urls.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  document.writeln("<img "+iparams+" src="+imageSet[ind]+">");
  //document.writeln("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
  //document.writeln("<a href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\"></a>");
  //document.writeln("<a href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" ></a>");
}

function RandomImageLink(images,urls)
{
  RandomImageLinkLong(images,urls,"border=0");
}

<!--
<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
 
Pic[0] = 'gif/headline/bphoto1.jpg'
Pic[1] = 'gif/headline/bphoto2.jpg'
Pic[2] = 'gif/headline/bphoto3.jpg'


// this part is for head image fade in and fade out effect
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}

function initArray(){
	 this.length=initArray.arguments.length
	 for(var i=0;i<this.length;i++)
	 this[i+1]=initArray.arguments[i]  }


function popcal(vCaption, vField, vDate){ 
    var nW = window.open("", "calendar", 
        "resizable=no,scrollbars=no,width=150,height=140"); 
    nW.location.href = "popcal.asp?caption=" + 
        escape(vCaption) + "&field=" + vField + "&date=" + vDate; 
    nW = null; 
} 

function calforboth(vC, vF, vD, vF1, vD1){ 
    var nW = window.open("", "calendar", 
        "resizable=no,scrollbars=no,width=150,height=140"); 
    nW.location.href = "popcal.asp?caption=" + 
        escape(vC) + "&field=" + vF + "&date1=" + vD + "&field1=" + vF1; 
    nW = null;
}



//  End -->

