// Original:  CodeLifter.com (support@codelifter.com) -->
// Web Site:  http://www.codelifter.com -->
// This script and many more are available free online at -->
// The JavaScript Source!! http://javascript.internet.com -->


// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000;

// 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] = 'http://www.edpop.com/image/SS1.jpg'
Pic[1] = 'http://www.edpop.com/image/SS2.jpg'
Pic[2] = 'http://www.edpop.com/image/SS3.jpg'
Pic[3] = 'http://www.edpop.com/image/SS4.jpg'
Pic[4] = 'http://www.edpop.com/image/SS5.jpg'
Pic[5] = 'http://www.edpop.com/image/SS6.jpg'
Pic[6] = 'http://www.edpop.com/image/SS7.jpg'
Pic[7] = 'http://www.edpop.com/image/SS8.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);
}


// *************************************************************************

/*
Document firework script (By Matt Gabbert, mgabbert@usrtoday.com, http://www.nolag.com)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

//set Interval between each firework display, 
var intervals=2000
var sparksOn     = true;
var speed        = 77;
var power        = 1;

//Dont change these values-------
var documentWidth=documentHeight=randomx=randomy=leftcorner=topcorner=0
var ns=(document.layers);
var ie=(document.all);
var sparksAflyin = false;
var allDivs      = new Array(10);
var totalSparks  = 0;
//-------------------------------

function initAll(){
	if(!ns && !ie){
	sparksOn = false;
	return;
	}
setInterval("firework()",intervals)

if (ns)
	document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
	for(dNum=0; dNum<7; ++dNum){
		if(ie)
			allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style');
		else
			allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]');
	}
}

function firework(){
//below code detects the browser dimenions
if (ie){
documentWidth=document.body.clientWidth
documentHeight=document.body.clientHeight
leftcorner=document.body.scrollLeft
topcorner=document.body.scrollTop
}
else if (ns){
documentWidth=window.innerWidth
documentHeight=window.innerHeight
leftcorner=pageXOffset
topcorner=pageYOffset

}
//below code randomly generates a set of coordinates that fall within the dimension
randomx=leftcorner+Math.floor(Math.random()*documentWidth)
randomy=topcorner+Math.floor(Math.random()*documentHeight)


	if(sparksOn){
		if(!sparksAflyin){
			sparksAflyin=true;
			totalSparks=0;
			for(var spark=0;spark<=6;spark++){
				dx=Math.round(Math.random()*50);
				dy=Math.round(Math.random()*50);
				moveTo(spark,randomx,randomy,dx,dy);
			}
		}
	}
}

function moveTo(i,tempx,tempy,dx,dy){
	if(ie){
		if(tempy+80>(document.body.offsetHeight+document.body.scrollTop))
			tempy=document.body.offsetHeight+document.body.scrollTop-80;
		if(tempx+80>(document.body.offsetWidth+document.body.scrollLeft))
			tempx=document.body.offsetWidth+document.body.scrollLeft-80;
	}
	if(tempx>-50&&tempy>-50){
		tempx+=dx;tempy+=dy;	
		allDivs[i].left=tempx;
		allDivs[i].top=tempy;
		dx-=power;dy-=power;
		setTimeout("moveTo("+i+","+tempx+","+tempy+","+dx+","+dy+")",speed)
	}
	else
		++totalSparks
	if(totalSparks==7){
		sparksAflyin=false;
		totalSparks=0;
	}
}
window.onload=initAll


//*******************************************************************************

function XanaWin(which, w, h) {
	popupWin = window.open(which, 'XanaWin', 'scrollbars,width='+w+',height='+h);
	popupWin.focus();
	}
	
function XanaWin2(which, w, h) {
	popupWin = window.open(which, 'XanaWin', 'width='+w+',height='+h);
	popupWin.focus();
	}
	
if (top.location != self.location) 
	{
	top.location = self.location
	}
	
window.defaultStatus="Welcome!";
