// JavaScript Document

function timeimgs(ctr) 
{ // Reusable timer
	thetimer = setTimeout("callImg(" + ctr+ ")", 5000);
	
}

var pp=document.all;
var plink=0;
var pimage=0;
var pspeed=200;

var header_imgs=new Array("header_img/plasti1n.jpg", "header_img/plasti1.jpg","header_img/plasti2.jpg", "header_img/plasti3.jpg","header_img/plasti2n.jpg", "header_img/plasti3n.jpg", "header_img/plasti4n.jpg", 
					"header_img/plasti5n.jpg", "header_img/plasti6n.jpg", "header_img/plasti7n.jpg", "header_img/plasti8n.jpg",  
					"header_img/plasti9n.jpg", "header_img/plasti10n.jpg", "header_img/plasti11n.jpg"); 


var img_array=new Array();
var pp=document.all;
for (i=0;i<header_imgs.length;i++){
img_array[i]=new Image();
img_array[i].src=header_imgs[i];
}

//var testing=(pp)? document.images["header_img"].filters[0].duration*3000 : 0;

function fnheader_img(){
if (!document.images) return;
if (pp) document.images["header_img"].filters[0].apply();
document.images["header_img"].src=img_array[pimage].src;
if (pp) document.images["header_img"].filters[0].play();
plink=pimage;
pimage=(pimage<header_imgs.length-1)? pimage+1 : 0;
setTimeout("fnheader_img()",pspeed+5000);
}



function callImg(ctr)
{
	var pp=new Array("header_img/paris.jpg", "header_img/italy.jpg", "header_img/austria.jpg", "header_img/switzerland.jpg", 
					"header_img/london.jpg", "header_img/singapore.jpg", "header_img/malasyia.jpg", "header_img/bangkok.jpg",  
					"header_img/australia.jpg", "header_img/newzealand.jpg", "header_img/mauritius.jpg", "header_img/kerala.jpg"); 
	
	img1 = new Image();
	ctr=Number(ctr);
	if(ctr>=12)
		ctr=0;
	
	img1.src = pp[ctr];
	ctr++;
	
		if (document.images) 
		{	
			//alert("Document Images   " + img1.src);
			document[0]["header_img"].src = eval("img1.src");
			timeimgs(ctr);
		}
}	
