var width = 0;
var height = 0;
function popup(href) {
	if (!width)
		width = 500;
	if (!height)
		height = 500
	var x_pos = (screen.availWidth / 2) - width/2;
	var y_pos = (screen.availHeight / 2) - height/2;
	
	wnd = window.open(href, "", "toolbar=no,location=yes,status=no,scrollbars=yes,width="+width+",height="+height+",innerheight=700,screenX=100,screenY=100,pageXoffset=100,pageYoffset=100,resizable=yes,left="+x_pos+",top="+y_pos);		
	return void(0);
}

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()
	}
	if (Pic[j] != ''){
		window.status='Loading : '+Pic[j]
		preLoad[j] = new Image()
		preLoad[j].src = Pic[j]
		Pic[j] = ''
		window.status=''
	}
	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)
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
