
var req;
function callPage(pageUrl, divElementId, loadinglMessage, pageErrorMessage) {
     document.getElementById(divElementId).innerHTML = loadinglMessage;
     try {
     req = new XMLHttpRequest(); /* e.g. Firefox */
     } catch(e) {
       try {
       req = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */
       } catch (e) {
         try {
         req = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */
         } catch (E) {
          req = false;
         } 
       } 
     }
     req.onreadystatechange = function() {responsefromServer(divElementId, pageErrorMessage);};
     req.open("GET",pageUrl,true);
     req.send(null);
  }

function responsefromServer(divElementId, pageErrorMessage) {
   var output = '';
   if(req.readyState == 4) {
      if(req.status == 200) {
         output = req.responseText;
         document.getElementById(divElementId).innerHTML = output;
         } else {
         document.getElementById(divElementId).innerHTML = pageErrorMessage+"\n"+output;
         }
      }
  }
  
	
	// JScript File
	
	var slideShowSpeed = 5000	
	var Pic = new Array()
	Pic[0] = 'imgs/inti.JPG'
	Pic[1] = 'imgs/logosello2.jpg'
	Pic[2] = 'imgs/ROSE.JPG'
	Pic[3] = 'imgs/logofinca.png'
	Pic[4] = 'imgs/wffsa.jpg'
	Pic[5] = 'imgs/latinflor.jpg'
	Pic[6] = 'imgs/logowely.jpg'
	Pic[7] = 'imgs/Hosalogo.JPG'
	Pic[7] = 'imgs/denmar.JPG'
	var t
	var t2
	var j = 0
	var p = Pic.length
	var preLoad = new Array()
	for (i = 0; i < p; i++){
	    preLoad[i] = new Image()
	    preLoad[i].src = Pic[i]
	}	
    function runSlideShow(){
          if (document.all){
              document.images.SlideShow.style.filter="blendTrans(duration=2)"
              document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
              document.images.SlideShow.filters.blendTrans.Apply()
          }
          document.images.SlideShow.src = preLoad[j].src
          if (document.all){
              document.images.SlideShow.filters.blendTrans.Play()
          }
          j = j + 1
          if (j > (p-1)){
             j=0 
          }
          t = setTimeout('runSlideShow()', slideShowSpeed)
    }	    
    function GetXmlHttpObject() {
	   var xmlHttp=null;
	   try  { // Firefox, Opera 8.0+, Safari
	     xmlHttp=new XMLHttpRequest();
	   }
	   catch (e) {  // Internet Explorer
	      try {
	        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	      }
	      catch (e) {
	        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	      }
	   }
	   return xmlHttp;
}
function hideare() {  
    document.getElementById("runslide").style.visibility="hidden"    
}

function goto() {
     X=document.move.gotopage.value
     window.location=X
}
function activeTab(tab)
{   
	document.getElementById("tab1").className = "";
	document.getElementById("tab2").className = "";
	document.getElementById("tab3").className = "";
	document.getElementById("tab4").className = "";
	document.getElementById("tab5").className = "";
	document.getElementById("tab6").className = "";
	document.getElementById("tab7").className = "";
	document.getElementById("tab8").className = "";
	document.getElementById("tab9").className = "";
	document.getElementById("tab10").className = "";
	document.getElementById("tab11").className = "";
	document.getElementById("tab12").className = "";
	document.getElementById("tab13").className = "";
	document.getElementById("tab14").className = "";
	document.getElementById("tab15").className = "";
	document.getElementById("tab16").className = "";
	document.getElementById("tab"+tab).className = "active";
	if(tab == 1) // If your tabs are more, then you can use 'switch' condition instead of 'if' condition for better practice
	{callPage('agapanthus.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 2){
	callPage('alstromeria.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 3){
	callPage('ammimajus.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 4){
	callPage('campanula.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 5){
	callPage('carnations.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');		
	}else if(tab == 6){
	callPage('delphinium.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 7){
	callPage('eucalyptus.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 8){
	callPage('gerbera.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 9){
	callPage('gysophilia.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 10){
	callPage('hyperium.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 11){
	callPage('limonium.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 12){
	callPage('raffines.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 13){
	callPage('snapdragon.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 14){
	callPage('spiders.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 15){
	callPage('statice.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else
	callPage('sunflower.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');	
	
}
function activeTab2(tab)
{   
	document.getElementById("tab1").className = "";
	document.getElementById("tab2").className = "";
	document.getElementById("tab3").className = "";
	document.getElementById("tab4").className = "";
	document.getElementById("tab5").className = "";
	document.getElementById("tab6").className = "";
	document.getElementById("tab7").className = "";
	document.getElementById("tab8").className = "";
	document.getElementById("tab9").className = "";
	document.getElementById("tab10").className = "";
	document.getElementById("tab11").className = "";
	document.getElementById("tab12").className = "";
	document.getElementById("tab"+tab).className = "active";
	if(tab == 1) // If your tabs are more, then you can use 'switch' condition instead of 'if' condition for better practice
	{callPage('orientalwhite.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 2){
	callPage('orientalpink.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 3){
	callPage('orientaldark.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 4){
	callPage('orientalyellow.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 5){
	callPage('lared.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');		
	}else if(tab == 6){
	callPage('laorange.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 7){
	callPage('lapeach.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 8){
	callPage('lapink.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 9){
	callPage('ladarkpink.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 10){
	callPage('layellow.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 11){
	callPage('asiatic.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else
	callPage('lanovelty.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');	
	
}
function activeTab3(tab)
{   
	document.getElementById("tab1").className = "";
	document.getElementById("tab2").className = "";
	document.getElementById("tab3").className = "";
	document.getElementById("tab4").className = "";
	document.getElementById("tab5").className = "";
	document.getElementById("tab6").className = "";
	document.getElementById("tab7").className = "";
	document.getElementById("tab8").className = "";
	document.getElementById("tab9").className = "";
	document.getElementById("tab10").className = "";
	document.getElementById("tab"+tab).className = "active";
	if(tab == 1) // If your tabs are more, then you can use 'switch' condition instead of 'if' condition for better practice
	{callPage('red.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 2){
	callPage('darkpink.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 3){
	callPage('mediumpink.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 4){
	callPage('white.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 5){
	callPage('cream.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');		
	}else if(tab == 6){
	callPage('lavender.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 7){
	callPage('yellow.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 8){
	callPage('green.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else if(tab == 9){
	callPage('orange.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');
	}else
	callPage('peach.html', 'content', '<img src=\"imgs/loading.gif\" /> Content is loading, Please Wait...', 'Error in Loading page <img src=\"imgs/error_caution.gif\" />');	
	
}