function pde_init()
{

/* CSS class names, change if needed */
	var mp='pde_nav';
	var hp='pde_hide';
	var sp='pde_show';
	var pp='pde_parent';
	var pa='pde_active';
	var cu='current';
	
	var d,uls,i;
	if(!document.getElementById && !document.createTextNode){return;}

/* navigation ID, change if needed */
	d=document.getElementById('nav');

	if (!d){return;}
	pde_addclass(d,mp)
	uls=d.getElementsByTagName('ul');
	for (i=0;i<uls.length;i++)
	{
		if(pde_checkcurrent(uls[i]))
		{
			pde_addclass(uls[i].parentNode.firstChild,pa);
		} else {
			pde_addclass(uls[i],hp);
			pde_addclass(uls[i].parentNode.firstChild,pp);
			uls[i].parentNode.firstChild.onclick=function()
			{
				pde_swapclass(this,pp,pa);
				pde_swapclass(this.parentNode.getElementsByTagName('ul')[0],hp,sp);
				return false;
			}
		}
	}
	function pde_checkcurrent(o){
		if(pde_check(o.parentNode,cu)){return true;}
		for(var i=0;i<o.getElementsByTagName('li').length;i++)
		{
			if(pde_check(o.getElementsByTagName('li')[i],cu)){return true;}
		}
		return false;
	}
	function pde_swapclass(o,c1,c2)
	{
		var cn=o.className
		o.className=!pde_check(o,c1)?cn.replace(c2,c1):cn.replace(c1,c2);
	}
	function pde_addclass(o,c)
	{
		if(!pde_check(o,c)){o.className+=o.className==''?c:' '+c;}
	}
	function pde_check(o,c)
	{
	 	return new RegExp('\\b'+c+'\\b').test(o.className);
	}
}
window.onload=function(){
	pde_init();	
	runSlideShow();
	FP_preloadImgs(/*url*/'images/Emergencybtnhover.gif', /*url*/'images/SearchBtnHover.gif', /*url*/'images/E-newsBtnHover.gif', /*url*/'images/EmergencyBtnHover');
	}


	// This is the Slide Show for the Main Page


// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;
// 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] = 'PhotoShow/cub1.jpg'
Pic[1] = 'PhotoShow/cub2.jpg'
Pic[2] = 'PhotoShow/cub3.jpg'

// do not edit anything below this line
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);
}
// this is the swap image for the hover buttons FP generated this code
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function FP_swapImgRestore() {//v1.0
 var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) {
  var elm=doc.$imgSwaps[i]; if(elm) { elm.src=elm.$src; elm.$src=null; } } 
  doc.$imgSwaps=null; }
}

	


	

