//Community Slide Show - the Noles at Irvig Park
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



var photos=new Array()
var photoslink=new Array()
var which=0

//define images. You can have as many as you want:
photos[0]="images/noles/1s.jpg"
photos[1]="images/noles/2s.jpg"
photos[2]="images/noles/3s.jpg"
photos[3]="images/noles/4s.jpg"
photos[4]="images/noles/5s.jpg"
//photos[5]="./images/noles/6s.jpg"
//photos[6]="./images/noles/7s.jpg"

//Specify whether images should be linked or not (1=linked)
var linkornot=1

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]="images/noles/1L.jpg"
photoslink[1]="images/noles/2L.jpg"
photoslink[2]="images/noles/3L.jpg"
photoslink[3]="images/noles/4L.jpg"
photoslink[4]="images/noles/5L.jpg"
//photoslink[5]="./images/noles/6L.jpg"
//photoslink[6]="./images/noles/7L.jpg"


//

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}


function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}



function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}


function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

//function transport(){
//window.open(photoslink[which],'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=465,left = 242,top = 184');

//}

function viewPic(img)
{ 	
    picfile = new Image(); 
    picfile.src =(img); 
    fileCheck(img); 
}

function fileCheck(img)
{ 	
    if( (picfile.width!=0) && (picfile.height!=0) )
    { 
        makeWindow(img); 
    }
    else 
    {
        funzione="fileCheck('"+img+"')"; 
        intervallo=setTimeout(funzione,50); 
    }
}

function makeWindow(img)
{ 	
    ht = picfile.height;
    wd = picfile.width; 

    var args= "height=" + ht + ",innerHeight=" + ht;
    args += ",width=" + wd + ",innerWidth=" + wd;
    if (window.screen) 
    { 
        var avht = screen.availHeight; 
        var avwd = screen.availWidth;
        var xcen = (avwd - wd) / 2; 
		var ycen = (avht - ht) / 2;		
        args += ",left=" + xcen + ",screenX=" + xcen;
        args += ",top=" + ycen + ",screenY=" + ycen + ",resizable=yes"; 	
    }
    //return window.open(img, '', args);
	popwin=window.open("","_blank",args)
popwin.document.open()
popwin.document.write('<html><head><title>'+'The Noles at Irvig Park - D. Stone Builders'+'</title></head><body bgcolor=#DED5B1 scroll=no   topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginheight=0 marginwidth=0 onBlur="self.close()" >  <div style="position: absolute; top:0px;left:0px color=#006666"><a href="javascript:window.close()">  <img src="'+img+'" width="'+wd+'" height="'+ht+'" border="0" alt="Click Image To Close Window"></a></div></body></html>')
popwin.document.close() 
} 
