
function changePage(Source){
	document.getElementById('contentIframe').src=Source; 
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {

			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_page_over = newImage("images/home-page-over.jpg");
		preloadFlag = true;
	}
}

SlideShow=new Object()
function dia(Pic) {
//alert(Pic);
if(SlideShow.t!=null){clearTimeout(SlideShow.t)};

SlideShow.t = 0;
SlideShow.j = 0;
SlideShow.p = Pic.length;

SlideShow.preLoad = new Array();
for (i = 0; i < SlideShow.p; i++){
   SlideShow.preLoad[i] = new Image()
   SlideShow.preLoad[i].src = Pic[i]
}
document.getElementById('DIVslideshow').style.display='block';
runSlideShow();
}


function runSlideShow(){

   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=0.5)";
      //document.images.SlideShow.style.filter="blendTrans(duration=3)";
      document.images.SlideShow.filters.blendTrans.Apply()   ;   
   }
   
   document.images.SlideShow.src = SlideShow.preLoad[SlideShow.j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   SlideShow.j = SlideShow.j + 1;
   if (SlideShow.j > (SlideShow.p-1)) SlideShow.j=0;
   SlideShow.t = setTimeout('runSlideShow()', 5000);
}

function stopSlideshow(){
 if(SlideShow.t!=null){clearTimeout(SlideShow.t)};
 document.getElementById('DIVslideshow').style.display='none';
}

function goBack(){
 if(SlideShow.t!=null){clearTimeout(SlideShow.t)};
 SlideShow.j = SlideShow.j - 2;
 if(SlideShow.j<0){SlideShow.j=0}
 
 runSlideShow();
}

function goNext(){
 if(SlideShow.t!=null){clearTimeout(SlideShow.t)}; 
 SlideShow.j = SlideShow.j + 1;
 if (SlideShow.j > (SlideShow.p-1)) SlideShow.j=0;
 runSlideShow();
}



