function trimAll(sString) 
{
while (sString.substring(0,1) == ' ')
{
sString = sString.substring(1, sString.length);
}
while (sString.substring(sString.length-1, sString.length) == ' ')
{
sString = sString.substring(0,sString.length-1);
}
return sString;
}

//*******************************************************************************************************//

function getBrowseElement(pg){
	
	var hid = pg - 1;
	
	document.getElementById('add_link'+hid).style.visibility='hidden';
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('browseElementDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_browse_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
}

// =============================================================================================





//*******************************************************************************************************//

function getManualBrowseElement(pg){
	
	var hid = pg - 1;
	
	document.getElementById('manual_add_link'+hid).style.visibility='hidden';
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('manualbrowseElementDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_manual_browse_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
}

// =============================================================================================






function getBrowseElement2(pg){
	
	var hid = pg - 1;
	
	document.getElementById('add_link'+hid).style.visibility='hidden';
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('browseElementDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_browse_element2.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 	
}


//*******************************************************************************************************//











function addBrand() {

				
				//alert(document.getElementById('sub_cat_name'+pg).value)
				//return false
				//var pg = document.passForm.item_name.value
				
				
				
				var name = document.getElementById('brand_name').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('new_brand_message_div');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "name="+name;
	
	
	ajaxRequest22.open("POST", "add_brand.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
	name = trimAll(name)
	
	if (name!="")
	{
	
	document.getElementById('new_brand_but').disabled=true;
	document.getElementById('can_brand_but').disabled=true;
	InitializeTimer2()
	
	//alert (pg)
	
	}
				
}

//*******************************************************************************************************//

var secs2
var timerID2 = null
var timerRunning2 = false
var delay2 = 1000

function InitializeTimer2()
{
    // Set the length of the timer, in seconds
    secs2 = 5
    StopTheClock2()
    StartTheTimer2()
}

function StopTheClock2()
{
    if(timerRunning2)
        clearTimeout(timerID2)
    timerRunning2 = false
}

function StartTheTimer2()
{
	
	
    if (secs2==0)
    {
        StopTheClock2()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:

		getBrand()

    }
    else
    {
        //self.status = secs
        secs2 = secs2 - 1
        timerRunning2 = true
        timerID2 = self.setTimeout("StartTheTimer2()", delay)
		
    }
}

//*******************************************************************************************************//

function getBrand() {

				
				//alert(document.getElementById('sub_cat_name'+pg).value)
				//return false
				//var pg = document.passForm.item_name.value
				
				
				
				//var name = document.getElementById('brand_name').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('getBarndDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	var name = document.getElementById('brand').value;
	//alert(name)
	
	var params = "name="+name;
	
	
	ajaxRequest22.open("POST", "get_brand.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				

				
}





//*******************************************************************************************************//









function addSubCat(pg) {

				
				//alert(document.getElementById('sub_cat_name'+pg).value)
				//return false
				//var pg = document.passForm.item_name.value
				
				
				
				var name = document.getElementById('sub_cat_name'+pg).value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				var id = pg
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('new_subcat_message_div'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg+"&name="+name;
	
	
	ajaxRequest22.open("POST", "add_sub_cat.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
	name = trimAll(name)
	
	if (name!="")
	{
	
	document.getElementById('new_subcat_but'+pg).disabled=true;
	InitializeTimer(pg)
	
	//alert (pg)
	
	}
				
}

//*******************************************************************************************************//
var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer(pg)
{
    // Set the length of the timer, in seconds
    secs = 5
    StopTheClock()
    StartTheTimer(pg)
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer(pg)
{
	
	
    if (secs==0)
    {
        StopTheClock()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:

		//alert(pg)
		getSubCat(pg)
	


        //alert("You have just wasted 10 seconds of your life.")
    }
    else
    {
		
        //self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer("+pg+")", delay)
		
    }
}









//*******************************************************************************************************//






function findItem(passForm) {


				//alert(document.passForm.item_name.value)
				//return false
				var pg = document.passForm.item_name.value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('item_nameDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "find_item.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 


}






//*******************************************************************************************************//






function getSubCat(pg){
	
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('catDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_sub_category.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}





//*******************************************************************************************************//





function getFeature1(pg){
	
	var button = pg - 1;
	document.getElementById('but'+button).style.visibility='hidden';
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('featureDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_feature.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}





//*******************************************************************************************************//





function removeSubCat(pg){
	
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('catDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "remove_sub_category.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}	




//*******************************************************************************************************//






function getSubCatElement(pg){
	
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('subCatElementDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_sub_cat_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}








//*******************************************************************************************************//


function getBrandElement(){
	
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('brandElementDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	var pg ="";
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_brand_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}









//*******************************************************************************************************//



function getVersions(pg){
	
	changeViewBut(pg,'on')
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('versionDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_item_versions.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}

//*******************************************************************************************************//

function changeViewBut(pg,sw){
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('view_but_Div'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg+"&sw="+sw;
	
	
	ajaxRequest22.open("POST", "get_view_but.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}


//*******************************************************************************************************//
function removeVersions(pg){
	
	changeViewBut(pg,'off')
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('versionDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "remove_sub_category.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}












//***********************************************************************************************************//



function getItemContent(){

				var cat = document.getElementById('category').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				getSubCatSelect(cat);
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('itemContentDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat;
	
	
	ajaxRequest22.open("POST", "get_item_content.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}


//*******************************************************************************************************//
function getSubCatSelect(cat){

						
				var ajaxRequest22;  // The variable that makes Ajax possible!

	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('subCatSelectDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat;
	
	
	ajaxRequest22.open("POST", "get_sub_cat_select.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}




//*******************************************************************************************************//

function getItemContent2(){

				var cat = document.getElementById('category').value
				var subcat = document.getElementById('sub_category').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				//getSubCatSelect(cat);
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('itemContentDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat+"&id2="+subcat;
	
	
	ajaxRequest22.open("POST", "get_item_content2.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}






//*******************************************************************************************************//

function getItemContent3(subcat){

				var cat = document.getElementById('category').value
				//var subcat = document.getElementById('sub_category').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				//getSubCatSelect(cat);
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('itemContentDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat+"&id2="+subcat;
	
	
	ajaxRequest22.open("POST", "get_item_content2.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}




//******************************************************************************************************//





function getSpecialElement(){
	
	document.getElementById('special_but').style.visibility='hidden';
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('specialElementDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	var pg ="";
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_special_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}








//**********************************************************************************************************************//







function getCategoryContent(){

				var cat = document.getElementById('category').value
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('categoryContentDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat;
	
	
	ajaxRequest22.open("POST", "get_category_content.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}





//*******************************************************************************************************//



function getSubCategory(pg){
	
	changeViewBut_Cat(pg,'on')
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('subCatDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "get_sub_category_view.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}



//*******************************************************************************************************//


function changeViewBut_Cat(pg,sw){
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('view_but_cat_Div'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg+"&sw="+sw;
	
	
	ajaxRequest22.open("POST", "get_view_but_cat.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}

//*******************************************************************************************************//


function removeSubCat_View(pg){
	
	changeViewBut_Cat(pg,'off')
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('subCatDiv'+pg);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+pg;
	
	
	ajaxRequest22.open("POST", "remove_sub_category.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
	
	
	
}



//*******************************************************************************************************//




function getVersionData(ele,ver) {
	
	
	
				versionDiv.innerHTML = ""
				versionDiv.innerHTML = "<br/><br /><br /><div align='center'><img src='images/loading.gif' border=0/></div><br/><br/><br/><br/><br/><br/><br/>"
				if (ele==1)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('sumTD').style.fontWeight="bold";
					
					document.getElementById('featTD').style.backgroundImage="";
					document.getElementById('featTD').style.fontWeight="";					
					
					document.getElementById('techTD').style.backgroundImage="";
					document.getElementById('techTD').style.fontWeight="";
										
					document.getElementById('priceTD').style.backgroundImage="";
					document.getElementById('priceTD').style.fontWeight="";
					
					document.getElementById('emailTD').style.backgroundImage="";
					document.getElementById('emailTD').style.fontWeight="";
					
					document.getElementById('manualTD').style.backgroundImage="";
					document.getElementById('manualTD').style.fontWeight="";
					
				}
				if (ele==2)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="";
					document.getElementById('sumTD').style.fontWeight="";
					
					document.getElementById('featTD').style.backgroundImage="";
					document.getElementById('featTD').style.fontWeight="";					
					
					document.getElementById('techTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('techTD').style.fontWeight="bold";
					
					document.getElementById('priceTD').style.backgroundImage="";
					document.getElementById('priceTD').style.fontWeight="";
					
					document.getElementById('emailTD').style.backgroundImage="";
					document.getElementById('emailTD').style.fontWeight="";
					
					document.getElementById('manualTD').style.backgroundImage="";
					document.getElementById('manualTD').style.fontWeight="";
					
				}
				if (ele==3)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="";
					document.getElementById('sumTD').style.fontWeight="";
					
					document.getElementById('featTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('featTD').style.fontWeight="bold";
										
					document.getElementById('techTD').style.backgroundImage="";
					document.getElementById('techTD').style.fontWeight="";

					document.getElementById('priceTD').style.backgroundImage="";
					document.getElementById('priceTD').style.fontWeight="";
					
					document.getElementById('emailTD').style.backgroundImage="";
					document.getElementById('emailTD').style.fontWeight="";
					
					document.getElementById('manualTD').style.backgroundImage="";
					document.getElementById('manualTD').style.fontWeight="";
					
				}
				if (ele==4)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="";
					document.getElementById('sumTD').style.fontWeight="";
					
					document.getElementById('featTD').style.backgroundImage="";
					document.getElementById('featTD').style.fontWeight="";
										
					document.getElementById('techTD').style.backgroundImage="";
					document.getElementById('techTD').style.fontWeight="";

					document.getElementById('priceTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('priceTD').style.fontWeight="bold";
					
					document.getElementById('emailTD').style.backgroundImage="";
					document.getElementById('emailTD').style.fontWeight="";
					
					document.getElementById('manualTD').style.backgroundImage="";
					document.getElementById('manualTD').style.fontWeight="";
					
				}
				
				
				if (ele==5)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="";
					document.getElementById('sumTD').style.fontWeight="";
					
					document.getElementById('featTD').style.backgroundImage="";
					document.getElementById('featTD').style.fontWeight="";
										
					document.getElementById('techTD').style.backgroundImage="";
					document.getElementById('techTD').style.fontWeight="";
					
					document.getElementById('priceTD').style.backgroundImage="";
					document.getElementById('priceTD').style.fontWeight="";

					document.getElementById('emailTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('emailTD').style.fontWeight="bold";
					
					document.getElementById('manualTD').style.backgroundImage="";
					document.getElementById('manualTD').style.fontWeight="";
					
					
				}
				
				
				if (ele==6)
				{
					//sumDiv.innerHTML = "<td width='111px' align='center'>ffff"
					document.getElementById('sumTD').style.backgroundImage="";
					document.getElementById('sumTD').style.fontWeight="";
					
					document.getElementById('featTD').style.backgroundImage="";
					document.getElementById('featTD').style.fontWeight="";
										
					document.getElementById('techTD').style.backgroundImage="";
					document.getElementById('techTD').style.fontWeight="";
					
					document.getElementById('priceTD').style.backgroundImage="";
					document.getElementById('priceTD').style.fontWeight="";

					document.getElementById('emailTD').style.backgroundImage="";
					document.getElementById('emailTD').style.fontWeight="";
					
					document.getElementById('manualTD').style.backgroundImage="url(images/bg_prodtab.jpg)";
					document.getElementById('manualTD').style.fontWeight="bold";
					
					
				}
				

				//alert('hello');
				
				//document.getElementById('s_but').disabled=true;
				
				var ajaxRequest22;  // The variable that makes Ajax possible!
				
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('versionDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "ele="+ele+"&ver="+ver;
	
	
	ajaxRequest22.open("POST", "get_version_data.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);
	
	//document.getElementById('new_subcat_but'+pg).disabled=true;


				
}













//******************************************************************************************************************//









function getContentElement(cat){

						
				var ajaxRequest22;  // The variable that makes Ajax possible!

	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('pageContentDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "id="+cat;
	
	
	ajaxRequest22.open("POST", "get_page_content_element.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params); 
				
				
}








//******************************************************************************************************************//









function sendQuoteRequest(fname,sname,email,ver,add_to_list){
	
	document.getElementById('submit').disabled=true;
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('versionDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "fname="+fname+"&sname="+sname+"&email="+email+"&ver="+ver+"&add_to_list="+add_to_list;
	
	
	ajaxRequest22.open("POST", "get_quote_reply.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}













function emailFriend(name,email,ver){
	
	document.getElementById('submit').disabled=true;
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('versionDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "name="+name+"&email="+email+"&ver="+ver;
	
	
	ajaxRequest22.open("POST", "get_email_friend_action.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}

















function getNewsLetterReply(name,email){
	
	//alert (name);
	document.getElementById('submit').disabled=true;
	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('newsletterDiv');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "name="+name+"&email="+email;
	
	
	ajaxRequest22.open("POST", "get_news_letter_reply.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);
	
	
	
	
	

}










//*********************************************************************************************************//










function sendQuote(quote_id,action){
	
	
	
	if(action=="i"){
		
	var agree=confirm("Are you sure you want to ignore?");
    if (agree){
        
		
		
		
		
			document.getElementById('reply'+quote_id).disabled=true;
			document.getElementById('ignore'+quote_id).disabled=true;
			
			var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('quote'+quote_id);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "quote_id="+quote_id+"&action="+action;
	
	
	ajaxRequest22.open("POST", "get_quote_action.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);
		
		
		
		
	}
    else{
        return false; }
		
	}
	else{
		
		
	document.getElementById('reply'+quote_id).disabled=true;
	document.getElementById('ignore'+quote_id).disabled=true;
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('quote'+quote_id);
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "quote_id="+quote_id+"&action="+action;
	
	
	ajaxRequest22.open("POST", "get_quote_action.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}


}







//*************************************************************************************************************//










function getPhoto(photo_id){

	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('photo');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "photo_id="+photo_id;
	
	
	ajaxRequest22.open("POST", "get_photo.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}








//*******************************************************************************************************************//








function getRidePhoto(photo_id){

	
	var ajaxRequest22;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest22 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest22 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest22 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest22.onreadystatechange = function(){
		if(ajaxRequest22.readyState == 4){
			var ajaxDisplay = document.getElementById('photo');
			ajaxDisplay.innerHTML = ajaxRequest22.responseText;
		}
	}
	//var name1 = document.getElementById('name').value;
	
	
	var params = "photo_id="+photo_id;
	
	
	ajaxRequest22.open("POST", "get_photo_ride.php", true);

	//Send the proper header information along with the request
	ajaxRequest22.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest22.setRequestHeader("Content-length", params.length);
	ajaxRequest22.setRequestHeader("Connection", "close");

	ajaxRequest22.send(params);

}
