// JavaScript Document
	var currentImage = 8;
	var scroll_image = 8;
	var totalImages = 8;
	var viewSize =8;
	var scroll_active=0;
	var t;
	
	
	
	var hoverPop_path
	//var hoverPop_imageid
	var hoverPop_active;
	var imgtitle;
	var enlarge_path;
	var firstimg=0;
	
	function showOverImgPopup(path,small_path, title)
	{
		hoverPop_path=small_path;
		enlarge_path=path;
		hoverPop_active=1;
		imgtitle=stripslashes(title); 
		//if(designer) imgtitle += ", "+designer;
		$('lightlink').title=title;
		document.getElementById("div_titletext").innerHTML="<strong>"+stripslashes(title)+"</strong>";
		showPop_Img();
	}
	

	function showPop_Img()
	{
		if(hoverPop_active==1) {
			//hoverPop_active=0;	
			//alert(hoverPop_path);
			if(document.getElementById('bigimg').src!=hoverPop_path || firstimg!=1) {
				firstimg=1;
				imgPreloader = new Image();
				
				// once image is preloaded, resize image container=link_url;
				//document.getElementById("div_title").style.display="none";
				//document.getElementById("div_titletext").style.display="none";
				
				document.getElementById('bigimg').style.display="none";
				document.getElementById('changeImg').style.display="none";
				document.getElementById('loading_img').style.display="";
				imgPreloader.onload=function(){
						document.getElementById('loading_img').style.display="none";
						document.getElementById('changeImg').style.display="";
						document.getElementById('bigimg').src=hoverPop_path;
						document.getElementById('lightlink').href=enlarge_path;
						document.getElementById('lightlink').title=imgtitle;
						new Effect.Appear('bigimg',{ duration: 0.5, from: 0.0, to: 1.0});
						imgPreloader.onload=function(){};
						imgPreloader.src="";					

				}
				imgPreloader.src=hoverPop_path;
			}
		}
	}
	function img_over(imgid){
		 if (navigator.appName=="Microsoft Internet Explorer")
			  document.getElementById(imgid).style.filter="alpha(opacity=50)";
		  else
			 document.getElementById(imgid).style.MozOpacity= .5;
	}
	function img_out(imgid){
		if (navigator.appName=="Microsoft Internet Explorer")
			  document.getElementById(imgid).style.filter="alpha(opacity=100)";
		  else
			 document.getElementById(imgid).style.MozOpacity=1;
		//hover_active=0; 
		//hoverPop_active=0;
	}
	
	function moveToPrevious()
	{
	 
		 if(currentImage > 0 && scroll_active==0)
		  {
			scroll_active=1;
			new Effect.Move('sliderPictures', { x: 75, y: 0, transition: Effect.Transitions.sinoidal,duration: .5 });
			currentImage=currentImage-1;
			setTimeout('scroll_active=0;',1000);
		  }
	  
	}
	
	function moveToNext()
	{
		  if(currentImage < totalImages-viewSize  && scroll_active==0)
		  {
			scroll_active=1;
			new Effect.Move('sliderPictures', { x: -75, y: 0, transition: Effect.Transitions.sinoidal,duration: .5 });
			currentImage=currentImage+1;
			setTimeout('scroll_active=0;',1000);
		  }
	}
	var sliderInterval;
	
	// below functions are for scrolling images on horizontally
 	function slideRight(slide_width,site_url,img_type) {
		
		var pict = document.getElementById("sliderPictures");
		var left = pict.style.left;
		left = ((left=="")?0:parseInt(left));
		sliderInterval = setInterval(function(){
			if (left<=(-slide_width)) {
				left=-slide_width;
			} else {
				left=left-3;
			}
			pict.style.left = left+"px";
			
			}, 25);
	}
	
	function slideLeft(site_url,img_type) {
		
		var pict = document.getElementById("sliderPictures");
		var left = pict.style.left;
		left = ((left=="")?0:parseInt(left));
		sliderInterval = setInterval(function(){
			if (left>=0) 
				left=0;
			else 
				left=left+3;
			pict.style.left = left+"px";
			
			}, 25);
	}

	// below functions are for scrolling images on Vertically
	function slideBottom(slide_width,site_url,img_id) {
		var pict = document.getElementById("sliderPictures");
		var top = pict.style.marginTop;
		top = ((top=="")?0:parseInt(top));
		sliderInterval = setInterval(function(){
			if (top==(-slide_width)) 
				top=-slide_width;
			else 
				top=top-3;
			pict.style.marginTop = top+"px";
			if(top==(-slide_width)){
				document.getElementById(img_id+"Down").src=site_url+"images/"+img_id+"DownDis.jpg"
				document.getElementById(img_id+"Down").style.cursor="none";
			} else {
				document.getElementById(img_id+"Up").src=site_url+"images/"+img_id+"Up.jpg"
				document.getElementById(img_id+"Up").style.cursor="pointer";
			}
			}, 25);
	}
	
	function slideTop(site_url,img_id) {
		var pict = document.getElementById("sliderPictures");
		var top = pict.style.marginTop;
		top = ((top=="")?0:parseInt(top));
		sliderInterval = setInterval(function(){
			if(top==0)
				top=0;
			else 
				top=top+3;
			pict.style.marginTop = top+"px";
			if(top==0){
				document.getElementById(img_id+"Up").src=site_url+"images/"+img_id+"UpDis.jpg"
				document.getElementById(img_id+"Up").style.cursor="none";
			} else {
				document.getElementById(img_id+"Down").src=site_url+"images/"+img_id+"Down.jpg"
				document.getElementById(img_id+"Down").style.cursor="pointer";
			}
			}, 25);
	}
	function slideOut() {
		clearInterval(sliderInterval);
	}
	
	// -----------------------------------------------------------------------------------
	//  Equivalent Function for stripslashes
	function stripslashes(str) {
		str=str.replace(/\\'/g,'\'');
		str=str.replace(/\\"/g,'"');
		str=str.replace(/\\\\/g,'\\');
		str=str.replace(/\\0/g,'\0');
		return str;
	}
	
	 