// JavaScript Document


function CreateRequestObject() {
	var xmlhttp;
	try {
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
	} catch (e) {
		
	try {
		xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
	} catch (E) {
		xmlhttp = false;
	}
    }// end try catch
	
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
         xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
    }
    return xmlhttp;
};// End function CreateRequestObject






/*
/////////////////// CODE FOR INSIDE HTML ////////////////////

var ajax = CreateRequestObject();


function Run_Ajax(vOne,vTwo) {

	alert("Inside Run_Function = "+vOne+" -"+vTwo);

	ajax.open('GET', '_bounceback.php?varOne='+vOne+'&varTwo='+vTwo);
   	ajax.onreadystatechange = HandleResponse;
    ajax.send(null);
	
};// End function Run_RemoveItem


function Run_AjaxArray(vOne,vTwo) {

	alert("Inside Run_FunctionArray = "+vOne+" -"+vTwo);

	//var ShipCostName = document.forms["cart_form"]["shipcost"].name;
	//var ShipCostValue = document.forms["cart_form"]["shipcost"].value;
	
	//alert("DropDownName = "+ShipCostName+" - DropDownValue = "+ShipCostValue);
	
	ajax.open('GET', '_bounceback.php?varOne='+vOne+'&varTwo='+vTwo);
   	ajax.onreadystatechange = HandleResponse_Array;
    ajax.send(null);

};// End function Run_ShipCost


function HandleResponse() {
    if(ajax.readyState == 4)
	{
    	var respStr = ajax.responseText; //The content data which has been retrieved ***
       	if( respStr )
		{ 
			//alert("Handle Response String = "+respStr);
			RefreshWindow();
		}
    }
};// End function HandleResponse


function HandleResponse_Array() {
	if(ajax.readyState == 4)
	{
        var respStr = ajax.responseText;
        var respArr = new Array();

        if(respStr.indexOf('|' != -1)) 
		{
            respArr = respStr.split('|');
			
			var ddName = respArr[0];
			var ddValue = respArr[1];

			alert("Handle Response Array = "+ddName+" - "+ddValue);
			
			RefreshWindow();
		}
    }
};// End function HandleResponse_Array


function RefreshWindow(){

	//alert("Window Refreshed");
	var sURL = window.location.pathname;
    window.location.replace(sURL);
	
};// End function RefreshWindow

*/
