thisImg = "";
nxtImg = "";
anImg  = "";
function nextImg(){

		// document.getElementById("prvCell").innerHTML = '<a href="javascript:;" onclick="prevImg()"><img src="imgs/arrawLeft.png" width="18" height="17" border="0" /></a>';

		 imgObject = document.getElementsByTagName("table");
		 for( i=0 ; i < imgObject.length ; i++  ){
			 
			 if(imgObject[i].id.indexOf("prod_") > -1 &&  imgObject[i].style.display == "block" ){
				 id = 	imgObject[i].id.replace("prod_","");
				 thisId =  eval(id);
				 id = eval(id)+1;
				 if( document.getElementById("prod_"+id) ){
					//	if( !document.getElementById("prod_"+(id+1)) )document.getElementById("nxtCell").innerHTML = "";
						imgObject[i].style.display = "none";
						if( document.getElementById("prodId_"+thisId) )document.getElementById("prodId_"+thisId).style.display = "none";
						
						webLinks = document.getElementsByTagName("a");
						for( j = 0 ; j < webLinks.length ; j++  ){
							    if( webLinks[j].getAttribute("title") == "link_"+thisId )webLinks[j].onclick =  function(){}
								if( webLinks[j].getAttribute("title") == "link_"+id ){
										webLinks[j].onclick =  function(){  return hs.expand(this, { captionOverlay: { position: 'rightpanel', width: '220px'} }); }
								   	}
							}
						
							
						nxtImg = document.getElementById("prod_"+id);
						nxtImg.style.display = "block";
						if( document.getElementById("prodId_"+id) )document.getElementById("prodId_"+id).style.display = "block";
						if(document.all){imgObject[i].style.filter='Alpha(opacity=0)';}
						else { imgObject[i].style.opacity = 0; }
						animatedShow();
						break;
						}else{ 
					//	document.getElementById("nxtCell").innerHTML = "";
						     }
					}
			}
		}
//--------------------------------------

//--------------------------------------
function prevImg(){
	
	//	 document.getElementById("nxtCell").innerHTML = '<a href="javascript:;" onclick="nextImg()"><img src="imgs/arrawRight.png" width="18" height="17" border="0" /></a>';
		 imgObject = document.getElementsByTagName("table");
		 for( i=0 ; i < imgObject.length ; i++  ){
			 
			 if(imgObject[i].id.indexOf("prod_") > -1 &&  imgObject[i].style.display == "block" ){
				 id = 	imgObject[i].id.replace("prod_","");
				 thisId =  eval(id);
				 id = eval(id)-1;
				 if( document.getElementById("prod_"+id) ){
					//	if( !document.getElementById("prod_"+(id - 1)) )document.getElementById("prvCell").innerHTML = "";
						imgObject[i].style.display = "none";
						if( document.getElementById("prodId_"+thisId) )document.getElementById("prodId_"+thisId).style.display = "none";
						
						webLinks = document.getElementsByTagName("a");
						for( j = 0 ; j < webLinks.length ; j++  ){
							    if( webLinks[j].getAttribute("title") == "link_"+thisId )webLinks[j].onclick =  function(){}
								if( webLinks[j].getAttribute("title") == "link_"+id ){
										webLinks[j].onclick =  function(){  return hs.expand(this, { captionOverlay: { position: 'rightpanel', width: '220px'} }); }
								   	}
							}

						
						
						if(document.all){imgObject[i].style.filter='Alpha(opacity=0)';}
						else { imgObject[i].style.opacity = 0; }

						nxtImg = document.getElementById("prod_"+id);
						nxtImg.style.display = "block";
						if( document.getElementById("prodId_"+id) )document.getElementById("prodId_"+id).style.display = "block";
						animatedShow();
						}else{
						//		document.getElementById("prvCell").innerHTML = "";
								}
					}
			}
		}

//--------------------------------------
		
showTime = "";
op  = 0;
function animatedShow(  ){
	
				op = op + 20;
				if(document.all){nxtImg.style.filter='Alpha(opacity='+op+')';}
				else { op2 = op /100 ; nxtImg.style.opacity = op2; }
				if( op == 100){nxtImg = "" ; op = 0; clearTimeout(showTime);}
				else {showTime = setTimeout("animatedShow()",100);}
	
		}
function printProd(){
	
		
				 imgObject = document.getElementsByTagName("input");
				 for( i=0 ; i < imgObject.length ; i++  ){
		 			 if(imgObject[i].id.indexOf("prodId_") > -1 &&  imgObject[i].style.display == "block" ){
									 id = 	imgObject[i].value;
									 id = eval(id);
									
									window.open ("./products/popup.php?prodi="+id,"printPage","scrollbars =1,width=750,height=600"); 

						 		}
						} 
		
		}
function printProd2(id){
	
		
				window.open ("./products/popup.php?prodi="+id,"printPage","scrollbars =1,width=750,height=600"); 
		
		}		
//-------------------------------------------------------------------
thisImg2 = "";
nxtImg2 = "";
anImg2  = "";
function nextImg2(mainImg){

cot = "'";
		 document.getElementById("prvImgCell").innerHTML = '<a href="javascript:;" onclick="prevImg2('+cot+''+mainImg+''+cot+')" class="nxtArraw">Previous</a>';
		 imgObject = document.getElementsByTagName("img");
		 for( i=0 ; i < imgObject.length ; i++  ){
			 
			 if(imgObject[i].id.indexOf(mainImg) > -1 &&  imgObject[i].style.display == "block" ){
				 id = 	imgObject[i].id.replace(mainImg,"");
				 id = eval(id)+1;
				 if( document.getElementById(mainImg+id) ){
						 if(!document.getElementById(mainImg+(id+1)) )document.getElementById("nxtImgCell").innerHTML = "";	
						imgObject[i].style.display = "none";
						nxtImg2 = document.getElementById(mainImg+id);
						nxtImg2.style.display = "block";
						if(document.all){imgObject[i].style.filter='Alpha(opacity=0)';}
						else { imgObject[i].style.opacity = 0; }
						animatedShow2();
						break;
						}else{
							
							document.getElementById("nxtImgCell").innerHTML = "";
							}
					}
			}
		}
//--------------------------------------
function prevImg2(mainImg){
	cot = "'";
		 document.getElementById("nxtImgCell").innerHTML = '<a href="javascript:;" onclick="nextImg2('+cot+''+mainImg+''+cot+')" class="nxtArraw">Next</a>';
		 imgObject = document.getElementsByTagName("img");
		 for( i=0 ; i < imgObject.length ; i++  ){
			 
			 if(imgObject[i].id.indexOf(mainImg) > -1 &&  imgObject[i].style.display == "block" ){
				 id = 	imgObject[i].id.replace(mainImg,"");
				 id = eval(id)-1;
				 if( document.getElementById(mainImg+id) ){
					 if(!document.getElementById(mainImg+(id-1)) )document.getElementById("prvImgCell").innerHTML = "";	
						imgObject[i].style.display = "none";
						if(document.all){imgObject[i].style.filter='Alpha(opacity=0)';}
						else { imgObject[i].style.opacity = 0; }

						nxtImg2 = document.getElementById(mainImg+id);
						nxtImg2.style.display = "block";
						animatedShow2();
						}else{
							document.getElementById("prvImgCell").innerHTML = "";	
							 }
					}
			}
		}

//--------------------------------------
		
showTime = "";
op2  = 0;
function animatedShow2(  ){
	
				op2 = op2 + 20;
				if(document.all){nxtImg2.style.filter='Alpha(opacity='+op2+')';}
				else { op22 = op2 /100 ; nxtImg2.style.opacity = op22; }
				if( op2 == 100){nxtImg2 = "" ; op2 = 0; clearTimeout(showTime2);}
				else {showTime2 = setTimeout("animatedShow2()",100);}
	
		}
