function AJAX_QUICKLOOK(SG) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "BUILDQL?task=ajaxresp&QLSGIN="+ encodeURIComponent(SG);
	//  
	htmltarget = document.getElementById("QL_AJAX"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

function AJAX_ADDFAVORITE(SG) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Add Favorite-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "ADDFAV?task=ajaxresp&SGIN="+ encodeURIComponent(SG);
	//  
	htmltarget = document.getElementById("favSuccess"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
} 

function AJAX_VADDFAVORITE(SG) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Add Favorite-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "VADDFAV?task=ajaxresp&SGIN="+ encodeURIComponent(SG);
	//  
	htmltarget = document.getElementById("vFavSuccess"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
} 

function AJAX_RESPONSE(htmltarget, response ){
	// display the div at the proper position 
	htmltarget.innerHTML = response;
}

function AJAX_VO_DESCRIPTION(SG,SCIN) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "AJDESCRIPTION?task=ajaxresp&SGIN=" + encodeURIComponent(SG) + "&SCIN=" + encodeURIComponent(SCIN);
	//  
	htmltarget = document.getElementById("tabcontents"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "<img src='/images07/transparent.gif' height='300px'";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

function AJAX_VO_FEATURES(SG,SCIN) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "AJFEATURES?task=ajaxresp&SGIN=" + encodeURIComponent(SG) + "&SCIN=" + encodeURIComponent(SCIN);
	//  
	htmltarget = document.getElementById("tabcontents"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "<img src='/images07/transparent.gif' height='300px'";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

function AJAX_VO_COLORS(SG,SCIN) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================
	hideElement('tabcolorcontents');
	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "AJCOLORS?task=ajaxresp&SGIN=" + encodeURIComponent(SG) + "&SCIN=" + encodeURIComponent(SCIN);
	//  
	htmltarget = document.getElementById("tabcolorcontents"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "<img src='/images07/transparent.gif' height='300px'";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

function AJAX_VO_MANUALS(SG,SCIN) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "AJMANUALS?task=ajaxresp&SGIN=" + encodeURIComponent(SG) + "&SCIN=" + encodeURIComponent(SCIN);
	//  
	htmltarget = document.getElementById("tabcontents"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "<img src='/images07/transparent.gif' height='300px'";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

function AJAX_VO_ACCESSORIES(SG,SCIN) { 
	// GOOGLE ANALYTICS Tracking
	//==========================
	trackid = "Quicklook-" + SG;
	_uacct = "UA-1493450-1";
	_udn="jacuzzi.com";
	urchinTracker(trackid);
	//==========================

	// pass the query the user has typed. 
	// Also, pass the id for a div to update, and the function to call to update this div. 
	var myurl = "AJACCESSORIES?task=ajaxresp&SGIN=" + encodeURIComponent(SG) + "&SCIN=" + encodeURIComponent(SCIN);
	//  
	htmltarget = document.getElementById("tabcontents"); 
	// Clear prior HTML prevent blink
	htmltarget.innerHTML = "<img src='/images07/transparent.gif' height='300px'";

	// Issue URL request and load response into target HTML : 
	AJAX_Update(myurl, htmltarget, AJAX_RESPONSE); 
	
} 

var _ms_AJAX_Request_ActiveX = ""; // Holds type of ActiveX to instantiate

function AJAX_Update(url, obj, func)
{
  if (!url) return false;  // Don't run if missing the url parm. 
 
  // code for Mozilla, etc.
	if (window.XMLHttpRequest)
  {
  	var xmlhttp=new XMLHttpRequest();
  }
	
	// code for IE
	else if (window.ActiveXObject)
   {
      // Instantiate the latest MS ActiveX Objects
      if (_ms_AJAX_Request_ActiveX) 
	  {
         xmlhttp = new ActiveXObject(_ms_AJAX_Request_ActiveX);
      } 
	  else 
			{
				// loops through the various versions of XMLHTTP to ensure we're using the latest
	    	var versions = ["Msxml2.XMLHTTP.7.0", "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP",
                       "Microsoft.XMLHTTP"];
         	for (var i = 0; i < versions.length ; i++)
			{
         	 try 
			 {
		   	      // try to create the object
		   	      // if it doesn't work, we'll try again
		   	     // if it does work, we'll save a reference to the proper one to speed up future instantiations
               xmlhttp  = new ActiveXObject(versions[i]);
               if (xmlhttp) 
			   {
                 _ms_AJAX_Request_ActiveX = versions[i];
                 break;
               }
             }
             catch (objException) 
 			 {
                  // trap -  try next one
             } 
           }
        }
	}
    if (!xmlhttp) return false;
   if (func) 
    xmlhttp.onreadystatechange = function(){
      if (xmlhttp.readyState != 4) return;
      if (xmlhttp.status == 200)
        func(obj, xmlhttp.responseText);
      else 
        alert("An error occurred" + http.status);
  };
    else
      xmlhttp.onreadystatechange = function() { return; }
  // Do the actual request:   
		 xmlhttp.open('GET', url, true);
     xmlhttp.send(null);
	  
  
		return false;
}

