function openfla(img,width,height)
{
url="flash.php?img="+img+"&width="+width+"&height="+height;
window.open(url,"Tent","width=840,height=650,scrollbars=no,resizable=no");
}
function openfla1(img,width,height)
{
url="flash1.php?img="+img+"&width="+width+"&height="+height;
window.open(url,"Tent","width=480,height=520,scrollbars=no,resizable=no");
}
function openwin(img,width,height)
{
url="image.php?img="+img+"&width="+width+"&height="+height;
window.open(url,"Tent","width=600,height=690,scrollbars=yes,resizable=no");
//alert ("test")
}
function openwin1(img,width,height)
{
url="image.php?img="+img+"&width="+width+"&height="+height;
window.open(url,"Tent","width=550,height=600,scrollbars=yes,resizable=no");
//alert ("test")
}
function openslide(pic,picid,picID)
{
url="picture.php?pic=" + pic + "&picid=" + picid + "&picID=" + picID;
window.open(url,"Tent","width=300,height=325,scrollbars=yes,resizable=no");
}
function openslide1(pic,picid,picID,pict,pct)
{
url="pic.php?pic=" + pic + "&picid=" + picid + "&picID=" + picID + "&pict=" + pict + "&pct=" + pct;
window.open(url,"Tent","width=300,height=325,scrollbars=yes,resizable=no");
}
//Script featured on Dynamic Drive (http://www.dynamicdrive.com)
NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

tempBar='';barBuilt=0;ssmItems=new Array();

moving=setTimeout('null',1)

/*function moveOut1() {
if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) {

clearTimeout(moving);moving = setTimeout('moveOut1()', slideSpeed);slideMenu(10)}
else {clearTimeout(moving);moving=setTimeout('null',1);}};*/

function moveOut() {
if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) {

clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed);slideMenu(10)}
else {clearTimeout(moving);moving=setTimeout('null',1);}};
function moveBack() {clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
function moveBack1() {
if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE && ssm.pixelLeft>(-menuWidth)) {
clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)}
else {clearTimeout(moving);moving=setTimeout('null',1)}}
function slideMenu(num){
if (IE)
{
	ssm.pixelLeft += num;
	document.all.basessm.style.pixelLeft -=num;
	
	
	//alert(ssm.right);
	//alert(ssm.pixelLeft);
}
if (NS||NS6) {ssm.left = parseInt(ssm.left)+num;}
if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}}

function makeStatic() {
/*if (NS||NS6) {winY = window.pageYOffset;}
if (IE) {winY = document.body.scrollTop;}
if (NS6||IE||NS) {
if (winY!=lastY&&winY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));}
else {smooth=0}
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) bssm.pixelTop+=smooth;
if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth
lastY = lastY+smooth;
setTimeout('makeStatic()', 1)}
*/
}

function buildBar() {
if(barText.indexOf('<IMG')>-1) {tempBar=barText}
else{for (b=0;b<barText.length;b++) {tempBar+=barText.charAt(b)+"<BR>"}}
//document.write("<td></td>");
/*document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'" onclick="javascript:moveOut()"  style="cursor:hand"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></TD>')*/}

function initSlide() {
if (NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style;
bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";ssm.visibility="visible";}
else if (IE) {ssm=document.all("thessm").style;bssm=document.all("basessm").style
bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";bssm.visibility = "visible";}
else if (NS) {bssm=document.layers["basessm1"];
bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"];
bssm2.clip.left=0;ssm.visibility = "show";}
if (menuIsStatic=="yes") makeStatic();}

function buildMenu() {
if (IE||NS6) {document.write('<DIV ID="basessm" style="visibility:hidden;Position : Absolute ;Left : '+XOffset+' ;Top : '+YOffset+' ;Z-Index : 20;width:'+(menuWidth+barWidth+10)+'"><DIV ID="thessm" style="Position : Absolute ;Left : '+(-menuWidth)+' ;Top : 0 ;Z-Index : 20;" >')}
if (NS) {document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT='+XOffset+' visibility="show"><ILAYER name="basessm2"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="'+(-menuWidth)+'" onmouseover="moveOut()">')}
if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><TR><TD>')}
document.write('<table border="1" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth)+'" bgcolor="'+menuBGColor+'">');
for(i=0;i<ssmItems.length;i++) {
document.write('<tr><td bgcolor="'+barBGColor+'" align="right" height="20"><a href="javascript:moveBack();" ><font color="#ffffff"><b>Close</b></font></a>&nbsp;</td></tr><tr>')
document.write('<tr><td bgcolor="'+hdrBGColor+'"><img src='+ssmItems[i][1]+'></td>')
if(ssmItems[i][4]!="no"&&barBuilt==0){buildBar();barBuilt=1}
if(ssmItems[i][4]!="no"){document.write('</TR>')}}

document.write('</table>')
if (NS6){document.write('</TD></TR></TABLE>')}
if (IE||NS6) {document.write('</DIV></DIV>')}
if (NS) {document.write('</LAYER></ILAYER></LAYER>')}
theleft=-menuWidth;
lastY=0;
//setTimeout('initSlide();', 1)
}
function start()
{
if(document.images[0].complete==true)
{
setTimeout('initSlide();', 1);
}
}

//Preloaded slideshow script- By Jason Moon
//For this script and more
//Visit http://www.dynamicdrive.com

// PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY...
var Slides = new Array('images/first.jpg','images/second.jpg','images/third.jpg', 'images/fourth.jpg', 'images/fifth.jpg', 'images/sixth.jpg', 'images/seventh.jpg', 'images/eighth.jpg', 'images/nineth.jpg');

// DO NOT EDIT BELOW THIS LINE!
function CacheImage(ImageSource) { // TURNS THE STRING INTO AN IMAGE OBJECT
   var ImageObject = new Image();
   ImageObject.src = ImageSource;
   return ImageObject;
}

function ShowSlide(Direction) {
   if (SlideReady) {
      NextSlide = CurrentSlide + Direction;
      // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
      document.SlideShow.Previous.disabled = (NextSlide == 0);
      document.SlideShow.Next.disabled = (NextSlide == 
(Slides.length-1));    
 if ((NextSlide >= 0) && (NextSlide < Slides.length)) {
            document.images['Screen'].src = Slides[NextSlide].src;
            CurrentSlide = NextSlide++;
            Message = 'Picture ' + (CurrentSlide+1) + ' of ' + 
Slides.length;
            self.defaultStatus = Message;
            if (Direction == 1) CacheNextSlide();
      }
      return true;
   }
}

function Download() {
   if (Slides[NextSlide].complete) {
      SlideReady = true;
      self.defaultStatus = Message;
   }
   else setTimeout("Download()", 100); // CHECKS DOWNLOAD STATUS EVERY 100 MS
   return true;
}

function CacheNextSlide() {
   if ((NextSlide < Slides.length) && (typeof Slides[NextSlide] == 
'string'))
{ // ONLY CACHES THE IMAGES ONCE
      SlideReady = false;
      self.defaultStatus = 'Downloading next picture...';
      Slides[NextSlide] = CacheImage(Slides[NextSlide]);
      Download();
   }
   return true;
}

function StartSlideShow() {
Slides = new Array('images/first.jpg','images/second.jpg','images/third.jpg', 'images/fourth.jpg', 'images/fifth.jpg', 'images/sixth.jpg', 'images/seventh.jpg', 'images/eighth.jpg', 'images/nineth.jpg');
   CurrentSlide = -1;
   Slides[0] = CacheImage(Slides[0]);
   SlideReady = true;
   ShowSlide(1);
}
                                                                    
           