/*--------------Holdlink()---------------*/
function holdlink(menu_id, submenu_id){
	if(menu_id =='home'){
	document.getElementById(menu_id+'link').style.display='none';
	document.getElementById(menu_id+'linkShow').style.display='';
	} else
	document.getElementById(menu_id).className='current';
}
/*--------------Holdlink()---------------*/

/*--------------------------popup() ----------------------------*/
function requestinfo()
{
	var NewWin3;
	NewWin3=window.open("requestinfo.htm",'NewWin1','height=470,width=420,top=10,left=150,location=no,status=no,toolbar=no,menubar=no,scrollbars=no');
	NewWin3.focus();
}
/*--------------------------popup() ----------------------------*/

/*------------include function---------------------*/
function include_file(id, url) {
	
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
  if (req) {
    // Synchronous request, wait till we have it all
	req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } 
}
/*------------include function---------------------*/


/*---------------------Photo Gallery Functions-------------------------
var images_tot=10;
var image_per_page = 5;
var image_start=0;
var image_scroll_no = 5;
var image_scroll_height = 515;
var image_scroll_active=false;*/

	var currentImage = 0;
	var totalImages = 5;
	var viewSize = 5;
	var scroll_active=0;
	var imagewidth =560;
	var nextimage=5;
	
function moveToPrevious()
{
  if(currentImage > 0 && scroll_active==0)
  {
	scroll_active=1;
	new Effect.Move('imageBoxInside', { x: imagewidth, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage=currentImage-nextimage;
	setTimeout('scroll_active=0;',1000);
  }
  
}
function moveToNext()
{
  if(currentImage < totalImages-viewSize  && scroll_active==0)
  {
	scroll_active=1;
	new Effect.Move('imageBoxInside', { x: -imagewidth, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage=currentImage+nextimage;
	setTimeout('scroll_active=0;',1000);
  }
}

function changeImg(path) {
	if(document.getElementById('bigimg').src!='images/photogallery/photo_gallery_big'+path+'.jpg') {
	imgPreloader = new Image();
	// once image is preloaded, resize image container
	document.getElementById('bigimg').style.display="none";
	document.getElementById('loading_img').style.display="";
	imgPreloader.onload=function(){
	document.getElementById('loading_img').style.display="none";
	document.getElementById('bigimg').src='images/photogallery/photo_gallery_big'+path+'.jpg';
	//document.getElementById('bigimg').style.display="";
	new Effect.Appear('bigimg',{ duration: 0.7, from: 0.0, to: 1.0});
	imgPreloader.onload=function(){};
	imgPreloader.src="";
	}
	imgPreloader.src='images/photogallery/photo_gallery_big'+path+'.jpg';
	}
}

/*---------------------Photo Gallery Functions-------------------------*/
