
function checklogin()
{
	if(admin_form.uname.value.length==0)
	{
		alert("Enter User Name");
		admin_form.uname.focus();
		return false;
	}
	else if(admin_form.upass.value.length==0)
	{
		alert("Enter Password");
		return false;
		admin_form.upass.focus();
	}
	else
	{
		return true;
	}
}

function show(sid)
{
	//alert(sid);
	//document.getElementById(sid).style.background="#ccccFF";
	document.getElementById("tb"+sid).style.visibility="visible";
}
function showchild(sid)
{
	//alert(sid);
	sid.style.background="#E7F7E8";
	//document.getElementById("tb"+sid).style.visibility="visible";
}
function hidechild(sid)
{
	//alert(sid);
	sid.style.background="";
	//document.getElementById("tb"+sid).style.visibility="visible";
}
function hide(sid)
{
	document.getElementById("tb"+sid).style.visibility="hidden";
	//document.getElementById(sid).style.background="";
}


var image=new Array("images/building.jpg",
                    "images/building2.jpg"                
                    )
                
//variable that will increment through the images
var num=0

// set the delay between images
var timeDelay
 
//preload the images in the cache so that the images load faster
//create new instance of images in memory 

var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
   imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}


function image_effects()
{
     //var selobj = document.getElementById('slidehow_transition');
     //var selIndex = selobj.selectedIndex;
     //set the transition to the number selected in the list
    // slideShow.filters.revealTrans.Transition=selIndex
	     slideShow.filters.revealTrans.Transition=13

     slideShow.filters.revealTrans.apply()
     slideShow.filters.revealTrans.play()
  
}

//function to get the previous image in the array
function previous_image()
{  
  //code to execute only when the automatic slideshow is disabled 
   if (slideshow.checked==false)
   {
    if (num>0)
    {
       num--
       image_effects()
       //set the SRC attribute to let the browser load the preloaded images 
       document.images.slideShow.src=image[num] 
     }
    if (num==0)
    {  //if first image is displayed
       num=image.length
       num--
       image_effects()
       document.images.slideShow.src=image[num] 
    } 
  }  
}

//function to get the next image in the array
function next_image()
{ 
  //code to execute only when the automatic slideshow is disabled 
  if (slideshow.checked==false)
  {
    if (num<image.length)
    {
       num++
       //if last image is reached,display the first image
       if (num==image.length) 
       num=0
       image_effects()
        //set the SRC attribute to let the browser load the preloaded images 
       document.images.slideShow.src=image[num]   
    }
  } 
}

//for automatic Slideshow of the Images
function slideshow_automatic()
{ 
    if (num<image.length)
     {
       num++
       //if last image is reached,display the first image
       if (num==image.length) 
       num=0
       image_effects()
       //sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
       timeDelay=setTimeout("slideshow_automatic()",4000) 
       document.images.slideShow.src=image[num]   
     }
}


